cbmeeks
Experienced Member
- Joined
- Apr 9, 2018
- Messages
- 53
As the title suggests, I am writing my own custom Apple II emulator. Specifically, I want to target the II+ in the beginning.
I have the basic text page 1 working and I can send some custom assembly language to it and it works. However, once I try to load an actual ROM file, I get nothing but garbage on screen.
I don't think I have a real understanding on how the ROM is structured. For example, it is my understanding that the font glyphs (the actual character data) is located at $F800 and is 1K in size.
When I run my own custom 6502 code, that is fine. But it seems any Apple II ROM I find online doesn't work at all. On one particular ROM, I could see the screen messed up but there were 8 patterns at the top that looked different. On a hunch, I assumed it was "APPLE ][". I then manually patched the character ROM location where "A" was supposed to be and sure enough, the A appeared.
This leads me to think the character data at $F800 is getting clobbered when I import the ROM.
I'm at a total loss on this and I cannot seem to find information on the character ROM, addresses, etc. Everything I find assumes I want to replace a real ROM chip, etc.
Any information would be appreciated.
Thanks.
UPDATE:
I actually found this information on the memory mapping. It seems that $F800 is actually the system monitor. But it was my understanding that the first half of that monitor was the character data. Since the A2 pulls characters from an actual character generator chip, I'm not sure how that would work in an emulator setting.
Sorry, another brain dump here. I found the actual source to the machine monitor and it seems it does start at $F800. The first 1K is definitely code. The second 1K ($FC00+) is also code.
This makes me think that the Apple II actually runs CODE (duh!) from $F800. But the character ROM data isn't actually available directly from the computer. Especially since it comes from a character generator chip. This is so much different than the C64 that I am used to.
Does this seem write? This would explain my my screen looks like garbage after the ROM. It's displaying CODE, crashing, etc.
UPDATE AGAIN!
Disregard this entire question. It seems I was right! Once I imported the char data into a specific buffer and quit pulling from ROM, the emulator started working!!
I have a confession. Grok3 told me the font glyphs came from $F800. I guess that's what I get for listening to a robot. LOL!
Feel free to close this but maybe it would help someone in the future.
I have the basic text page 1 working and I can send some custom assembly language to it and it works. However, once I try to load an actual ROM file, I get nothing but garbage on screen.
I don't think I have a real understanding on how the ROM is structured. For example, it is my understanding that the font glyphs (the actual character data) is located at $F800 and is 1K in size.
When I run my own custom 6502 code, that is fine. But it seems any Apple II ROM I find online doesn't work at all. On one particular ROM, I could see the screen messed up but there were 8 patterns at the top that looked different. On a hunch, I assumed it was "APPLE ][". I then manually patched the character ROM location where "A" was supposed to be and sure enough, the A appeared.
This leads me to think the character data at $F800 is getting clobbered when I import the ROM.
I'm at a total loss on this and I cannot seem to find information on the character ROM, addresses, etc. Everything I find assumes I want to replace a real ROM chip, etc.
Any information would be appreciated.
Thanks.
UPDATE:
I actually found this information on the memory mapping. It seems that $F800 is actually the system monitor. But it was my understanding that the first half of that monitor was the character data. Since the A2 pulls characters from an actual character generator chip, I'm not sure how that would work in an emulator setting.
| $0000 - $00FF | Zero Page |
| $0100 - $01FF | Stack |
| $0200 - $03FF | Mostly Free, Input Buffer, Interrupt Vectors |
| $0400 - $07FF | Lo-res/Text Page1 |
| $0800 - $0BFF | Lo-res/Text Page2 (BASIC programs load here) |
| $0C00 - $1FFF | Free |
| $2000 - $3FFF | Hi-res Page1 |
| $4000 - $5FFF | Hi-res Page2 |
| $6000 - $95FF | Free |
| $9600 - $BFFF | DOS3.3 and Buffers |
| $C000 - $CFFF | Soft Switches, Expansion Card I/O and ROM |
| $D000 - $F7FF | BASIC ROM (can be bankswitched later models) |
| $F800 - $FFFF | Machine Language Monitor ROM (also can be bankswitched) |
Sorry, another brain dump here. I found the actual source to the machine monitor and it seems it does start at $F800. The first 1K is definitely code. The second 1K ($FC00+) is also code.
This makes me think that the Apple II actually runs CODE (duh!) from $F800. But the character ROM data isn't actually available directly from the computer. Especially since it comes from a character generator chip. This is so much different than the C64 that I am used to.
Does this seem write? This would explain my my screen looks like garbage after the ROM. It's displaying CODE, crashing, etc.
UPDATE AGAIN!
Disregard this entire question. It seems I was right! Once I imported the char data into a specific buffer and quit pulling from ROM, the emulator started working!!
I have a confession. Grok3 told me the font glyphs came from $F800. I guess that's what I get for listening to a robot. LOL!
Feel free to close this but maybe it would help someone in the future.
Last edited:
