floobydust wrote:
So, the CHROUT routine in Micromon simply puts a character into the transmit buffer, then turns on the transmit interrupt. This won't work on the bad chip. Modify CHROUT so it just send the character to the W65C51, then execute the delay routine to kill enough time for it to be sent. Don't turn on the Xmit interrupt, as that will hose it up.
Yeah, sorry, I realized this not too long after my post.
I tried modifying CHROUT to be essentially the same routine I've been using this whole time, in other code. Unfortunately I seem to have run into some other issue because now, all of the sudden, it won't boot Micromon correctly any more. Tried reverting back to the code I had that was working but it's still not working.
So, what I did, in order to know it was booting, without the serial port, is just turn on some of the 7-segment LEDs (I just wrote $AA to both of them), and that worked just fine. I just put that at the very beginning of MONITOR. So, I'm not sure... what changed between when it was working and now.
In order to write the ROM, I had to use an Intel Hex file instead of S-Record as the XGecu software doesn't appear to support S-Record. Additionally, I set the "From File Start Addr" to $8000. I'm not really sure if this is correct but it did work at least once before; I did see the $AA pattern on both 7-segment displays.
So, I'm not sure what's gone wrong. Will keep messing with it...
EDIT:
floobydust wrote:
EDIT: Note: If you turn on the Xmit interrupt, it will continue interrupting the CPU endlessly, there's nothing to turn it off.
Could this be the issue I'm having? Are interrupts enabled by the time the code reaches MONITOR? Although, if that were the case I'd think this would've been an issue before?
EDIT2: Nevermind, I don't know what I did wrong before but it's working again. Strange. I could've sworn I did things correctly, the same as I did before and as I just did.
EDIT3: Okay, I am getting serial output... but... well, it's certainly not working correctly. For lack of better words, the data is corrupted somehow. I can see it _trying_ to print out some of the string messages from the source code.
That being said, I haven't modified the hardware at all yet (i.e. remove chips). So, maybe that's part of the problem?
Although it does seem strange that it's failing to print to the serial port correctly as I have been using the serial port with next-to-zero problems this entire time.
EDIT4: Regarding EDIT3, I'm starting to worry that perhaps I messed up the stty settings by trying to use screen? I don't know. Last time I tried to do stuff with stty, I decided i never wanted to touch stty again
But, now the program (moserial) I was using, for the most part, for serial comms isn't working at all. Hmmmm.