1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-08-19 17:29:34 +00:00

Use correct default status and memory mode

This commit is contained in:
Peter Evans 2018-01-21 21:33:12 -06:00
parent c2debec4d3
commit 945bf23f22
3 changed files with 6 additions and 3 deletions

View File

@ -32,6 +32,9 @@ enum status_flags {
#define MOS_NZC (MOS_NEGATIVE | MOS_ZERO | MOS_CARRY)
#define MOS_ZC (MOS_ZERO | MOS_CARRY)
#define MOS_STATUS_DEFAULT (MOS_NEGATIVE | MOS_OVERFLOW | \
MOS_INTERRUPT | MOS_ZERO | MOS_CARRY)
/*
* Here we define the various address modes that are possible. These do
* not map to any significant numbers that are documented for the 6502

View File

@ -252,7 +252,7 @@ apple2_boot(apple2 *mach)
void
apple2_reset(apple2 *mach)
{
mach->cpu->P = MOS_INTERRUPT;
mach->cpu->P = MOS_STATUS_DEFAULT;
mach->cpu->PC = vm_segment_get16(mach->main, 0xFFFC);
mach->cpu->S = 0xff;
@ -261,7 +261,7 @@ apple2_reset(apple2 *mach)
// Switch us back to defaults
apple2_set_bank_switch(mach, BANK_DEFAULT);
apple2_set_memory_mode(mach, MEMORY_DEFAULT);
apple2_set_memory_mode(mach, MEMORY_DEFAULT | MEMORY_SLOTCXROM);
}
/*

View File

@ -163,7 +163,7 @@ mos6502_create(vm_segment *rmem, vm_segment *wmem)
cpu->A = 0;
cpu->X = 0;
cpu->Y = 0;
cpu->P = 0;
cpu->P = MOS_STATUS_DEFAULT;
cpu->S = 0xff;
return cpu;