MAMEWorld Central >> News
View all threads Index   Flat Mode Flat  

Vas Crabb
BOFH
Reged: 12/13/05
Posts: 3727
Loc: Melbourne, Australia
Send PM
Going old-school
07/07/17 08:38 PM


For lulz, I decided to rewrite MAMEís Intel 4004 CPU core and add support for most 4040 features. The new CPU core operates at the bus cycle level, and exposes most useful signals. It also uses lots of address spaces for all the different kinds of memory and I/O it supports (thanks OG). Some CPU core bugs were fixed along the way - notably intra-page jumps on page boundaries were broken.

One nice benefit we get from this is being able to hook up the I/O for the Bally/Nutting solid-state Flicker pinball prototype (supposedly the first microprocessor-controlled pinball machine) how the hardware actually worked. I also hooked up the playfield lamp matrix as outputs and the operator adjustments as machine configuration while I was at it. We need a proper thermal model of a lamp with PWM dimming support before that part can be declared perfect. (It previously used a hack, pulling the low bits of RC out of the CPU using the state interface. This worked due to a quirk of the game program, and there was no way to implement it properly without the 4004 CM-RAM signals being exposed.)

Possibly more interestingly, we can now emulate the Intel INTELLECģ†4/MOD†40 development system. There seem to be very few surviving examples of this system, but fortunately we've got monitor PROM dumps, and there's some information floating around the web. It has interesting debugging features on the front panel. Thereís a scanned manual, but the schematics are very poor quality. However, with some idea of how it works, itís possible to work out what all the chips are supposed to be. Thatís the fun part. Turning it into MAME code isnít as much fun, but itís doable.

The front panel looks like this:


That requires clickable artwork for the switches and outputs for the LEDs to get a usable experience (writing the MAME XML layout really isnít fun). Thereís a simple monitor in PROM, designed to be used with an ASCII teleprinter with paper tape reader and punch (e.g. a Teletype Model 33 ASR). MAMEís RS-232 video terminal will have to do as a substitute for that.

If you get bleeding edge MAME (i.e. built from source no more than a day or so old), you can try it out in emulation. Did you ever wonder how developers may have debugged 4004 code in the mid to late í70s? Well even if you didnít, now you can find out.

The front panel looks like this in emulation (without the explanatory labels), and by default MAME shows the video terminal below this:


All those LEDs are functional, and all those switches are clickable and visually reflect their current state.

So how would you actually use it in practice? Thatís where this brief instruction manual on the MAMEdev wiki comes in. Itís complete with examples of how some of the monitor commands and front panel debugging features can be used. Itís marked NOT_WORKING in MAME for now because you need to manually set up the terminal the first time you use it, and I havenít finished implementing the universal slots and storage cards. But you can do all the things described on that page.

Does anyone care? Probably not. Will anyone actually even try this system out in MAME? Probably not (apart from Robbbbbbbert). But this is another example of something that you can only do in MAME, and how completely unrelated systems can both benefit from emulating the same chip properly. It also gets rid of one previously unavoidable hack, and gets us one step closer to feature parity with EmuAllSystems.







Entire thread
Subject Posted by Posted on
* Going old-school Vas Crabb 07/07/17 08:38 PM
. * Re: Going old-school DarkMoe  07/09/17 03:41 AM
. * Re: Going old-school BIOS-D  07/08/17 02:37 AM
. * Re: Going old-school Vas Crabb  07/08/17 06:38 AM
. * Re: Going old-school BIOS-D  07/08/17 01:26 PM
. * Re: Going old-school Vas Crabb  07/08/17 04:38 PM
. * Re: Going old-school agard  07/08/17 01:06 AM

Extra information Permissions
Moderator:  John IV, Tafoid 
3 registered and 26 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 1160