mirror of
https://github.com/RyuKojiro/apple1.git
synced 2025-01-15 23:30:46 +00:00
Use only the last mirrored bit of the rom as the reset vector
git-svn-id: svn+ssh://svn.phoenixbox.net/svn/apple1/trunk@9 64f78de7-aa59-e511-a0e8-0002a5492df0
This commit is contained in:
parent
d5b4f0a83b
commit
56fbd9a928
@ -13,8 +13,9 @@
|
||||
#include <unistd.h>
|
||||
#include <dis6502/reverse.h>
|
||||
|
||||
#define ROM_START 0xF000
|
||||
#define ROM_SIZE 0x00FF
|
||||
#define ROM_START 0xF000
|
||||
#define ROM_SIZE 0x00FF
|
||||
#define RESET_VECTOR 0xFF00
|
||||
#define MAX_INSTRUCTION_LEN 32
|
||||
|
||||
void fault(void *ctx, const char *e) {
|
||||
@ -91,8 +92,8 @@ int main(int argc, const char * argv[])
|
||||
}
|
||||
|
||||
// Set the reset vector
|
||||
v6502_write(cpu->memory, v6502_memoryVectorResetLow, ROM_START & 0xFF);
|
||||
v6502_write(cpu->memory, v6502_memoryVectorResetHigh, ROM_START >> 8);
|
||||
v6502_write(cpu->memory, v6502_memoryVectorResetLow, RESET_VECTOR & 0xFF);
|
||||
v6502_write(cpu->memory, v6502_memoryVectorResetHigh, RESET_VECTOR >> 8);
|
||||
|
||||
// Attach PIA
|
||||
pia_map(cpu->memory);
|
||||
@ -100,8 +101,8 @@ int main(int argc, const char * argv[])
|
||||
v6502_reset(cpu);
|
||||
|
||||
while (!faulted) {
|
||||
v6502_step(cpu);
|
||||
//printSingleInstruction(cpu, cpu->pc);
|
||||
v6502_step(cpu);
|
||||
}
|
||||
|
||||
v6502_destroyMemory(cpu->memory);
|
||||
|
Loading…
x
Reference in New Issue
Block a user