mirror of
https://github.com/pevans/erc-c.git
synced 2025-01-03 00:29:38 +00:00
Use correct default status and memory mode
This commit is contained in:
parent
c2debec4d3
commit
945bf23f22
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user