Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: linuxgeek96 on July 24, 2012, 10:25:08 am

Title: Intel CPU Emus
Post by: linuxgeek96 on July 24, 2012, 10:25:08 am
Attached is the alpha source code of an Axe program for emulating the 4004 microprocessor by Intel. Enjoy! EDIT: The program has a bug: please remove the Pic2-6 sotred to Str1 so it works :P
Title: Re: Intel CPU Emus
Post by: DJ Omnimaga on July 24, 2012, 11:16:52 pm
That is rather interesting. Too bad there aren't much 4004 programs it seems. I wonder if more processors could be emulated?
Title: Re: Intel CPU Emus
Post by: calcdude84se on July 24, 2012, 11:58:51 pm
Reminds me of CalcDOS - an x86 Emulator (http://www.ticalc.org/archives/files/fileinfo/319/31908.html). (Only linked for grins and giggles, as the program isn't very functional.)
I think it's an interesting general question what old hardware we can readily emulate on the 83+ series. I don't know enough to suggest any candidates, but I'm sure something interesting could be done. 15MHz is relatively powerful. Even the 83+'s 6.
Title: Re: Intel CPU Emus
Post by: TIfanx1999 on July 25, 2012, 12:19:55 am
I think there is a Spectrum emulator floating around somewhere in Ticalc's archives. Other old z80 computers and devices should be doable as well. Its also worth mentioning that the intel 8080(with some z80 instructions) is already being emulated on the 83+/84+ series in Calc84maniac's Ti-Boy.
Title: Re: Intel CPU Emus
Post by: linuxgeek96 on July 25, 2012, 09:04:23 am
okay, I'm starting the 8008 today, the 8080 will be for tomorrow (glad to see there already is one), and 8086 is day after. They all seem to be similar enough to modify the last (i.e. no complete rewrite necessary). The 8008 is actually easier than the 4004, because axe is more inclined to bytes than nibbles :) Thanks for the support,

linuxgeek96
Title: Re: Intel CPU Emus
Post by: DJ Omnimaga on July 25, 2012, 08:54:22 pm
Oh wow, 8086. Isn't that from the 286/386/486 computer family? I am curious if there are native softwares to emulate for those, as demo... :D

Also what would be cool is a PC-88 or FM77AV emulator. Even without sound it would be cool, because there are quite a few great games for those. Judging by how laggy they were (for example, Ys I and II ran at 8 FPS instead of 60 on the NES) I'm betting it might not be hard to emulate, unless they're weird like the Atari 2600 processor. Of course the screen size (and lack of colors) would be an issue, though.



Those are not processors but rather computers, though. And if the above is too much for a little z80 calc, maybe this could do? :P (I think it only supports 8 colors at once)

Title: Re: Intel CPU Emus
Post by: linuxgeek96 on July 26, 2012, 09:56:59 am
I worked on it for a while yesterday, so all that is left is I/O instructions (plus a small lookup table). Perhaps an upload of the 8008 later today...Show of hands, who wants me to skip to another architecture (like DJ_O's suggestion)?
Title: Re: Intel CPU Emus
Post by: DJ Omnimaga on July 26, 2012, 02:00:16 pm
Can't wait to see the 8008 one. Also I voted in the poll. :)

I would like Atari but I heard it was very hard to emulate and that this is why there are so few emulators out there and not many great quality games, so I went with PC-88 which had more game choices (although most are in Japanese)

But of course I guess you would need to find documentation and stuff first, which I hope it exists D:
Title: Re: Intel CPU Emus
Post by: linuxgeek96 on July 26, 2012, 02:01:06 pm
will upload when I get home, as I can't connect to my 84+ through Tilp II (Linux). Dunno why.
Title: Re: Intel CPU Emus
Post by: DJ Omnimaga on July 26, 2012, 02:04:16 pm
Ah ok. HOpefully it's nothing too bad. I hate when connection issues happen because they're hard to solve.
Title: Re: Intel CPU Emus
Post by: linuxgeek96 on July 26, 2012, 02:06:10 pm
For those who want the PC-88 emu, I really can't think of a way to do it on the 84+. However, the nSpire is an option...
Title: Re: Intel CPU Emus
Post by: Juju on July 26, 2012, 02:12:29 pm
I would like to see a PC-88 emulator, but I fear it would be too much for the z80.
Title: Re: Intel CPU Emus
Post by: DJ Omnimaga on July 26, 2012, 03:09:17 pm
Actually I don't think it would be too bad, because the games, if you notice in the videos, runs at like 8 FPS, supports 8 colors or so and it seems even less powerful than a NES or GB. The only concern I have is that games would have to run from Archive so if you're not experienced with dealing with flash memory, then it might be problematic. Also the screen is like 320x200 if I remember, so some games might not be easy to play. TI Boy didn't fit the screen either, but the resolution was much smaller than the PC-88, so zooming out didn't destroy the graphics too much.

A PRIZM/Nspire C version would be nice, though. The Nspire is 320x240 and the PRIZM 384x216. Or of course there are 68K calcs, which begins at half the PC-88 resolution (160x100), but the audience might be smaller.
Title: Re: Intel CPU Emus
Post by: calc84maniac on July 26, 2012, 04:21:54 pm
Hmm, maybe PC-8001 might be better since it has 8-color 160x100 resolution, only 16KB/32KB RAM, and generally seems more approachable. Most PC-88 games apparently run at 640x200 resolution.

Edit: Actually, I think that's 16KB+32KB RAM. I think all these computers are a bit out of the RAM limits of most 84+ models these days.
Title: Re: Intel CPU Emus
Post by: linuxgeek96 on July 26, 2012, 04:40:08 pm
in theory, I could use 3 16KB ramdisks, with archive swapping.
Title: Re: Intel CPU Emus
Post by: DJ Omnimaga on July 26, 2012, 05:19:40 pm
Hmm, maybe PC-8001 might be better since it has 8-color 160x100 resolution, only 16KB/32KB RAM, and generally seems more approachable. Most PC-88 games apparently run at 640x200 resolution.

Edit: Actually, I think that's 16KB+32KB RAM. I think all these computers are a bit out of the RAM limits of most 84+ models these days.
640x200? ??? Do you mean they do like the SNES Secret of Mana?
Title: Re: Intel CPU Emus
Post by: calcdude84se on July 26, 2012, 10:15:55 pm
in theory, I could use 3 16KB ramdisks, with archive swapping.
Theoretically, yes, but any program that routinely uses all three areas of memory will be quite slow (writing and erasing Flash is not very quick), plus it will wear out the Flash chip pretty quickly. Glad that you could think of the idea, but in general, if there's not enough RAM, you just can't do it. :/
Title: Re: Intel CPU Emus
Post by: linuxgeek96 on July 27, 2012, 09:29:53 am
Attached is the proto-8008 emu. Today, I will start on the 8086, in hopes of someday being able to actually run linux on this darn thing. Also, does anyone know how to use USB8x with Axe?
Title: Re: Intel CPU Emus
Post by: TheNlightenedOne on July 27, 2012, 09:42:17 am
I think USB8x has a library you can use, I just have no idea how nor where to find it... :-\ But nice work on the emus! (Wait, you want to run Linux, on a calculator, from a flash drive? Awesome!)
Title: Re: Intel CPU Emus
Post by: linuxgeek96 on July 27, 2012, 09:47:03 am
I figure that a flash drive is the best way to get extra RAM. Also, though I'm skipping some models in between, I still have to make the 80386 emu (emulating 32-bit addressing on an 8-bit processor...)
Title: Re: Intel CPU Emus
Post by: TheNlightenedOne on July 27, 2012, 10:19:18 am
You have a good point... plus you could make a more complete Linux distro if you use a flash drive, so you won't have to worry too much about space limitations.
Title: Re: Intel CPU Emus
Post by: linuxgeek96 on July 27, 2012, 11:01:05 am
The main problems with emulating the 386 series are:
1. emulating 32 bit processor on 16 bit processor
2. emulating more powerful processor on less powerful :P

If anyone knows how to use usb8x/msd with Axe, please let me know
Title: Re: Intel CPU Emus
Post by: calcdude84se on July 27, 2012, 07:12:57 pm
USB flash drives are slower to use than flash. Though if you're wanting to emulate the i386, I'm not sure it really matters, as it is already far faster to begin with :P An interesting demonstration, though!