Close

Step 3: Add ROM

A project log for Yet Another 68k Homebrew Computer

Simple Homebrew computer based on 68000 CPU

roman-romanchukRoman Romanchuk 02/22/2022 at 13:030 Comments

The next obvious step is to add some storage with the program. 

The first thing that I'm trying to wire is a ROM. Most of the Homebrew projects I meet recommend to use EEPROM, but I don't have a chip programmer, so made a choice to use NOR Flash instead.  I wasn't able to find any chips with 16 bit data bus, so going with pair of SST39SF chips. Simple read access able to work without any additional logic required. 

To store program on flash I used arduino mega, it has enough pins, so I don't need to bother with shift-IC. 

As first program I'm trying to use simple read from memory address $40000 in the loop. Idea behind - such program is small enough, so I can connect only 4 address lines to the chip, and use this high address to see LED turned on (pins A21, A22, A23 on CPU connected to LEDS as debug measure). 

        org       $08 ; initial memory location
prg:    
	move.w    $400000,d0 ; read from high address 
        bra.s 	  prg ; jump back to execute read in the loop 

Compiling this program with VASM gives following byte code:

0000000    00  00  00  00  00  00  00  00  30  39  00  40  00  00  60  f8
0000020

As I'm using two chips for storage, each of the odd bytes goes to the odd chip (connected to pins D0-D7) and each even byte goes to chip connected to pins D8-D15). 

As usual happening to this project - after I wired the setup instead of 1 LED turned on I see all 3 going on and off, or just staying on. I've checked my wiring two times, found some problems, but still didn't got good enough result. 

So I decided that next step is actually I need something that would be able to single step CPU to see that addresses I'm trying to read and what info my storage gives in response. 

I'll post connection scheme, but not sure if it's correct, as haven't seen it working as expected yet

Discussions