Go Down

Topic: Imaging old Mac+ ROMs with Arduino (Read 439 times) previous topic - next topic


Alright guys, I'll try to be as thorough as I can with the description so that you all get the best idea of what I'm trying to accomplish here.

What I'm doing is building an old Mac+ clone on combination original hardware, plus an FPGA for interfacing. Gonna work to make it modern. However, the ROM files and boot sequence codes aren't available online via ROM images, so I purchased an original logic board on eBay to get the ROM files to image.

Now, I figured the breadboard-friendliness of the Arduino would lend itself well in such a role, and I've already extracted the DIP slug ROMs from the board and put them on a breadboard, done the whole wiring shebang, etc. Now, I need to figure out how to write the code.

The memory exists in two banks of 64K * 8, paralleled to get the proper 68000 data width of 64K * 16.

We all know how ROMs/RAM generally function. In the case of ROMs, you make the address appear at the address bus and assert both the chip enable (CE#) and output enable (OE#) and the data at that address appears at the data bus output. Now, I've looked over the original schematics, and there isn't a quartz-window on the ROM slugs, nor is there a W/R# pin. So, it's probably mask ROM.

My question generally falls under the guidelines of:

1. How do I take an address (1, 2, 3, etc.) and convert it to not just a binary representation, but an int[16] number that I can then declare digitalWrite on? I know how I would move from the array to the output, e.g.

Code: [Select]

// Suppose the array is address[16]
for (int i = 0; i < 16; i++)
    if (i = 0)
        digitalWrite(address[i], LOW);
        digitalWrite(address[i], HIGH);

Would itoa() be a good candidate for this operation?

I don't necessarily need to do this on the return (reading the ROM output) side of things as I'll be formatting the result to a string and serial writing it. I'll write a quickie Java util that will take that result, delimit and perform the opcode and arg discrimination.

Thanks in advance,


Mar 01, 2014, 12:21 pm Last Edit: Mar 01, 2014, 12:31 pm by pito Reason: 1
1. How do I take an address (1, 2, 3, etc.) and convert it to not just a binary representation, but an int[16] number that I can then declare digitalWrite on?

Code: [Select]
typedef union {
unsigned long addrvalue;
struct {
unsigned char byte1: 8;  // lowest byte
unsigned char byte2: 8;
unsigned char byte3: 8;
unsigned char byte4: 8;  // highest byte
addrbytes ;

Code: [Select]
unsigned long address;
void put_addr_to_ports(address) {
addrbytes temp;
temp.addrvalue = address;
PORTA = temp.byte1;
PORTB = temp.byte2;
PORTC = temp.byte3;
PORTD = temp.byte4;

That is the fastest and simplest way how to put "bytes" of an "address"(for example 32bit one) out to the 8bit atmega ports. Adjust to your case accordingly.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131