Close

A better idea 2.0... uC's *as* ROM

A project log for Improbable AVR -> 8088 substitution for PC/XT

Probability this can work: 98%, working well: 50% A LOT of work, and utterly ridiculous.

eric-hertzEric Hertz 01/12/2017 at 11:494 Comments

Duh... as mentioned in a previous log...

#A 4$, 4ICs, Z80 homemade computer on breadboard

has some great ideas...

I still like the idea of actually using original PC/XT peripherals for this project, I dunno why exactly, but that's kinda the point.

BUT... one of the things @Just4Fun also did over at that project was to implement the ROM/BIOS in an AVR. The AVR's not *executing* the code, since it's Z80 code. It's making it available as though the AVR was a ROM.

Welllll... sheesh... here I am thinking about piggy-backing a ROM on top of the original ROM... (last log) Why not use an AVR *as* the ROM?

Plausible, maybe even probable. AND, most-importantly, In-System-Programmable!

------

So, realistically, I've a bit of an AVR-shortage 'round here... I *might* have a spare 644P with a few blown I/Os that'd work, but otherwise we're talking 8515's with enough pins and only 8K of storage (though if I write 8K of assembly, that'd be absurd). So, another option is some PIC32's I've in-stock.

I hesitate to use these for *this* project, because half of the point is to see what a lowly 8-bitter can do. But I don't see using a PIC32 as a ROM as being out of the spirit of the original intent... since the same could just as easily be done with an EPROM and a ZIF socket. It'd mainly just be a time-saver.

Why not, eh?

-----

Oh, and I could probably fit the original ROM as well.

:/ I kinda liked the idea of piggybacking, but this makes a lot more sense...

------

FOOL!

Those're 3.3V-only! ...

---------

alright, the 100-pin TQFPs I have have *just enough* 5V-tolerant pins... That's a bit ridiculous, but doable I spose.

Discussions

jaromir.sukuba wrote 01/13/2017 at 13:04 point

I feel like you are slowly getting to complete XT emulation inside one or more MCUs...

By the way, mow much hardware it takes to make barebones XT compatible PC running something like MS-DOS? Except of obvious CPU/RAM/BIOS combo, some kind of timer (8253 compatible), disk drive... perhaps redirecting keyboard/display into serial IO should do the job.

  Are you sure? yes | no

Eric Hertz wrote 01/13/2017 at 16:51 point

You've got a great point. Emulating a bunch of the system internally (using dedicated peripherals) would be *significantly* faster than going through the BIU-bottleneck. And, it turns out, the PC/XT's ROM/BIOS is only 8KB, so could easily fit in most AVRs, even if it had to be tweaked for internal peripherals.

But you've got high hopes if you think I'mma accomplish all that! At this point, I'll be surprised if I even get enough instructions running to output "hello world" straight to the data-bus ;)

OTOH, putting the (tiny) ROM/BIOS experiments I intend to run inside the "CPU" itself wouldn't be difficult, would be faster, and would save on chips... Hmmm... 

Not sure about the other devices, some "spy" on the bus-transactions, in order to intercept memory-reads and instructions. So, if those bus-transactions *don't* happen (because they're internal), then it could cause difficulty. Definitely a thing with the FPU (which I'm not intending on using at this early stage, anyhow), but also may be a thing with the DMA controller(?) or other devices. Guess I should look into that.

  Are you sure? yes | no

jaromir.sukuba wrote 01/13/2017 at 18:24 point

There is always trade-off between how much you can and want to emulate and how much is done in "real circuits". In fact, the whole XT can be emulated in raspberry pi zero, but that is not much of fun.

Starting with processor emulation is definitely good way... well, in fact, that is aim of this project, so I'm introducing some scope creep here, don't listen to me :-)

I'm genuinely interested how this project turns out.

  Are you sure? yes | no

Eric Hertz wrote 01/13/2017 at 22:22 point

@jaromir.sukuba, you're spot-on... I've a lot of thoughts that've been brewing on the matter, thanks for prompting me. Look for an update on the "state of the project" soon :) 

A teaser: implementing the BIU and the EU in a single AVR isn't really possible in the "parallel" sense that they exist in an 8088/86, the performance-hit would be *dramatic*, and only because of interfacing with external memory/peripherals. So your "scope creep" might be a great way to minimize those effects, by implementing many features (peripherals, BIOS/ROM, etc.) within the device, where there'd be no bus-bottleneck.

But, you're right... my goal was to implement the 8088/86 chip, itself, not to use its "core" in a new design... Guess I've got some thinking to do.

  Are you sure? yes | no