Hi!
I've recently started playing with Supermon 816 on my system. It looks great and I intend to show it off in a future video. I'm having some issues with the integration though:
1. Are register sizes intended to be fixed when calling getcha/putcha? I found it to be M=1/X=0 in a lot of cases, but I found at least one where it is M=1/X=1. I've wrapped my subroutines with php/plp to ensure known values, but I'm thinking this may be indicative of a bug. I can find the exact spot again if you want.
2. I'm having issues with multiple commands misbehaving (`A`, `M` that I know of). I tracked it to the `getbyte` subroutine, which is doing `lda [addra],y`. However, if you look at `dpymem` for example, Y seems to contain the number bytes per line. Shortly after the call to `getbyte`, Y is decremented. `addra` is also incremented because `getbyte` falls through to `incaddra`. Which means it ends up reading every byte from the same location, the end of the line.
Code:
calling M 008000...
first iteration of the loop is reading from 0x8010
00 9bf6 r b7 LDA [dp],Y
00 9bf7 r 8f
00 008f r 00
00 0090 r 80
00 0091 r 00
00 8010 r 24 <--- here
... next iteration reads from the same location
00 9bf6 r b7 LDA [dp],Y
00 9bf7 r 8f
00 008f r 01 <-- contents of addra have incremented
00 0090 r 80
00 0091 r 00
00 8010 r 24 <-- still reading from 0x8010 since Y has decremented
So this is what I end up seeing
Code:
.m008000
>008000 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24:$$$$$$$$$$$$$$$$
I'll keep digging but in case you have ideas, let me know!