Quick one today, I worked on the schematic a little more. Still a few unknowns and a couple of holes I’ve not filled in yet, but the schematic is 80% complete. At least to a point where I can get a ROM monitor etc running and know where all the hardware is and have a good certainty I’m not talking in the breeze when I start trying to control the hardware.

I’ve also been working on a simulator for this board using the Musashi 68000 core in C. I’ve built up the address map, and started writting modules to simulate the hardware. This will help me greatly in development as I won’t need to be burning ROMs so often to try things out initially. A ROM monitor would help a lot too, so I’m weighing up options given the time I have for the competition and my already terrible work/life balance.

Here is a snippet of the UART core I’ve written for the simulator, it sets up the internal registers etc of the UART so the firmware can read and write state to configure the registers. The only bit I’ve not successfully worked out yet is the interrupt priorities, there is something wonky on this boards layout I’ve not figured out with the interrupt. But that’s another days problem.

scc2691_core uarts[2];

void scc2691_reset(void)
    for(int i = 0; i < 2; i++) {
        uarts[i].id = i;

        uarts[i].m1 = 0x0;
        uarts[i].m1_flag = 0x0;
        uarts[i].m2 = 0x0;

        uarts[i].csr  = 0x0;
        uarts[i].cr   = 0xA;
        uarts[i].thr  = 0x0;
        uarts[i].acr  = 0x0;
        uarts[i].imr  = 0x0;
        uarts[i].ctur = 0x0;
        uarts[i].ctlr = 0x0;

        uarts[i].sr  = 0x0;
        uarts[i].rhr = 0x0;
        uarts[i].isr = 0x0;
        uarts[i].ctu = 0x0;
        uarts[i].ctl = 0x0;

        uarts[i].cnt_flag = 0;
        uarts[i].cnt_value = 0;

        uarts[i].tx = 0;
        uarts[i].tx_last = time(NULL);

The schematic so far …

AMX board schematic