From 99c0c46212f3538958ed23304ce9ceaab3de4be5 Mon Sep 17 00:00:00 2001 From: Paul Warren Date: Sat, 16 May 2020 16:40:15 +1000 Subject: [PATCH] Readme fix --- 6502-monitor.ino | 45 --------------------------------------------- README.md | 4 +--- makerom.py | 24 ------------------------ 3 files changed, 1 insertion(+), 72 deletions(-) delete mode 100644 6502-monitor.ino delete mode 100644 makerom.py diff --git a/6502-monitor.ino b/6502-monitor.ino deleted file mode 100644 index 8f147cb..0000000 --- a/6502-monitor.ino +++ /dev/null @@ -1,45 +0,0 @@ -const char ADDR[] = {22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52}; -const char DATA[] = {39, 41, 43, 45, 47, 49, 51, 53}; -#define CLOCK 2 -#define READ_WRITE 3 - -void setup() { - for (int n = 0; n < 16; n += 1) { - pinMode(ADDR[n], INPUT); - } - for (int n = 0; n < 8; n += 1) { - pinMode(DATA[n], INPUT); - } - pinMode(CLOCK, INPUT); - pinMode(READ_WRITE, INPUT); - - attachInterrupt(digitalPinToInterrupt(CLOCK), onClock, RISING); - - Serial.begin(57600); -} - -void onClock() { - char output[15]; - - unsigned int address = 0; - for (int n = 0; n < 16; n += 1) { - int bit = digitalRead(ADDR[n]) ? 1 : 0; - Serial.print(bit); - address = (address << 1) + bit; - } - - Serial.print(" "); - - unsigned int data = 0; - for (int n = 0; n < 8; n += 1) { - int bit = digitalRead(DATA[n]) ? 1 : 0; - Serial.print(bit); - data = (data << 1) + bit; - } - - sprintf(output, " %04x %c %02x", address, digitalRead(READ_WRITE) ? 'r' : 'W', data); - Serial.println(output); -} - -void loop() { -} diff --git a/README.md b/README.md index f10d903..fc5676e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ # 6502 -Various 6502 related pieces, not 100% sure on licensing, but all the bits are based on the Ben Eater youtube series at: - -()[https://www.youtube.com/watch?v=LnzuMJLZRdU&list=PLowKtXNTBypFbtuVMUVXNR0z1mu7dp7eH] \ No newline at end of file +Various 6502 related pieces, not 100% sure on licensing, but all the bits are based on the Ben Eater youtube series on [youtube](https://www.youtube.com/watch?v=LnzuMJLZRdU&list=PLowKtXNTBypFbtuVMUVXNR0z1mu7dp7eH). \ No newline at end of file diff --git a/makerom.py b/makerom.py deleted file mode 100644 index c8ad430..0000000 --- a/makerom.py +++ /dev/null @@ -1,24 +0,0 @@ -# -# Please see this video for details: -# https://www.youtube.com/watch?v=yl8vPW5hydQ -# -code = bytearray([ - 0xa9, 0xff, # lda #$ff - 0x8d, 0x02, 0x60, # sta $6002 - - 0xa9, 0x55, # lda #$55 - 0x8d, 0x00, 0x60, # sta $6000 - - 0xa9, 0xaa, # lda #$aa - 0x8d, 0x00, 0x60, # sta $6000 - - 0x4c, 0x05, 0x80, # jmp $8005 - ]) - -rom = code + bytearray([0xea] * (32768 - len(code))) - -rom[0x7ffc] = 0x00 -rom[0x7ffd] = 0x80 - -with open("rom.bin", "wb") as out_file: - out_file.write(rom)