mechaniputer
Experienced Member
- Joined
- May 23, 2015
- Messages
- 59
Hi fellow vintage Apple enthusiasts,
I wrote a 6502 emulator from scratch so that it can appear in a coding game I am writing (well also for the challenge). To test it I am emulating the text mode I/O of the Apple 2 and using an Apple 2 ROM.
I am able to run the original Integer basic ROM. The one where you need to do "ctrl+b, enter" to start BASIC from the monitor prompt. For the most part it is working great. However there is a problem with the "LIST" command. It's weird since everything else seems to work. I've attached a screenshot of the error.
It would seem that one of my 6502 instructions probably has an bug in it. I was thinking I could narrow it down by looking at exactly which opcodes are used in the LIST routine. Is anyone familiar with how that part of the code works? I've looked at the disassembly. There is a symbol table containing the names of the various operators, backwards. I'm guessing it scans the tokenized program and looks up the string associated with the tokens from that table somehow. Based on my output, it looks like an offset is wrong or something. I'm not able to make sense of it so I'm hoping that one of you can fill me in on which opcodes to investigate. Thanks in advance for help tracking this down.
-mechaniputer
I wrote a 6502 emulator from scratch so that it can appear in a coding game I am writing (well also for the challenge). To test it I am emulating the text mode I/O of the Apple 2 and using an Apple 2 ROM.
I am able to run the original Integer basic ROM. The one where you need to do "ctrl+b, enter" to start BASIC from the monitor prompt. For the most part it is working great. However there is a problem with the "LIST" command. It's weird since everything else seems to work. I've attached a screenshot of the error.
It would seem that one of my 6502 instructions probably has an bug in it. I was thinking I could narrow it down by looking at exactly which opcodes are used in the LIST routine. Is anyone familiar with how that part of the code works? I've looked at the disassembly. There is a symbol table containing the names of the various operators, backwards. I'm guessing it scans the tokenized program and looks up the string associated with the tokens from that table somehow. Based on my output, it looks like an offset is wrong or something. I'm not able to make sense of it so I'm hoping that one of you can fill me in on which opcodes to investigate. Thanks in advance for help tracking this down.
-mechaniputer