Close

So close...

A project log for GTXL Gigatron clone computer with keyboard

Microcomputer that runs without a CPU

Justin DavisJustin Davis 08/22/2019 at 20:264 Comments

I've updated my Arduino code so that I can stream the ROM code to it and load it into my flash cartridge.  This will hopefully make coding go faster now that I can use the python assembler and not have to write machine code by hand.  I'm still using the ROM v3 code, but I can update to v4 soon. 

I notices in the ROM code it takes quite some time to get through the boot sequence with verifying the memory.  Since I'm still using the Arduino to drive a slower clock to the board, I had to change that to pump up my clock speed.  So after hacking the internal timers to fast PWM mode, I can now get from 7kHz up to 8MHz.  Unfortunately I can't get the exact 6.125MHz I need for video, so at some point I'll have to put the clock chip back in.  

I've found I have 3 LEDs come up in sequence which means the memory checks are succeeding.  The 4th LED does come on, but it blinks at a very high rate.  I had to slow the clock down to see it.  At about 125kHz it's noticable.  It does not do the LED scroll sequence, so it is still having some problem somewhere in the code.  

I also noticed I have to manually issue a reset to the board after it powers up usually to get the code running.  I'm not sure why, but I'll have to look into that.  It's possible my bank switching is powering up at 1 which would start running code in the wrong bank.  I suppose I could add a piece of code at the beginning of the top bank so that if it ever boots there it will bump it over to the correct bank and continue booting.  But I feel like it's REAL close to running.

Discussions

Marcel van Kervinck wrote 08/22/2019 at 21:13 point

I -do- have an idea: Perhaps the PC-High counter update of the far jump instruction isn't working? So with "jmp  y,$00" it goes back to $0000 instead of $0100 (with Y=$01)? That can appear as a flickering 4th LED.

  Are you sure? yes | no

Justin Davis wrote 08/23/2019 at 21:22 point

I wrote a piece of test code to specifically check the jmp instruction.  It seems to be working ok.  It would turn on one LED in the zero-page loop, and then jump to $A500 to turn on a second light, and then jump back.  It kept cycling correctly.  

I loaded the ROM v4 to see if there was a difference, and it seems like there is.  This one turns all the LEDs on in sequence, and then only the 3rd bit is lit up (rightmost).  I noticed this one seemed to get stuck in a loop from address 018B to about 018D and it keeps jumping back.  I need to put a little more work into it to see if those are exactly right, but it's close.  I noticed the 4th bit of the instruction counter never changes, so it's a short loop.

  Are you sure? yes | no

Marcel van Kervinck wrote 08/23/2019 at 21:32 point

There is nothing jumpy there, so it points to an electrical issue, or timing.

  Are you sure? yes | no

Marcel van Kervinck wrote 08/22/2019 at 21:09 point

I can't imagine what causes the 4th led to flicker. But if you can figure out the number of instructions it is ON and the number of instructions it is OFF, my mind can start thinking with you. BTW, you need 6.25 MHz, not 6.125MHz. Might be easier.

  Are you sure? yes | no