Code: Select all
RnW ADDRESS DATA STATE
--------------------------------
1 xxxx * IDLE
0 aaaa V IDLE ;aaaa = $4000/$4004
1 xxxx + 1 $8d STA1_1 ;sta $8000
1 xxxx + 2 $00 STA1_2
1 xxxx + 3 $80 STA1_3
0 * A STA1_4
1 xxxx + 4 $A9 LDA1_1 ;lda #V', where V' = V with bits 7 and 6 swapped
1 xxxx + 5 V' LDA1_2
1 xxxx + 6 $8D STA2_1 ;sta aaaa
1 xxxx + 7 LO(aaaa) STA2_2
1 xxxx + 8 HI(aaaa) STA3_3
0 aaaa V' STA2_4
1 xxxx + 9 $A9 LDA2_1 ;lda #A
1 xxxx + 10 A LDA2_2
1 xxxx + 11 $4C JMP_1 ;jmp xxxx+1
1 xxxx + 12 LO(xxxx+1) JMP_2
1 xxxx + 13 HI(xxxx+1) JMP_3
1 xxxx + 1 * IDLE
*using fake write to $8000 to find out the value of accumulator (as shown above)
*or alternatively using stack (which wastes less resources of FPGA).
It works OK, Legend of Zelda and SMB1 are the games that I can hear the difference.
https://www.youtube.com/watch?v=Ma4ftQIuKbc
Sorry, but couln't resist showing this tower structure:
Maybe should I also add real game genie and 60-72 pin converter.