Propeller Emulators - ZX81 possibilitiy
T&E Engineer
Posts: 1,396
I just received my Propstick last week and I'm pretty impressed with the video and graphics capabilities to say the least. I know some are working on a C64 emulator possibility. However, I am not a "programmer" per say but pick up on things pretty quickly with experimentation and usage over and over like many others here in the forums. I have an Electrical Engineering degree but a limited amount of design and programming experience based on my carreer path choosen. I have worked on a few good projects for the BS2, BS2px and some for the SX-28. I would like to now·NOT abandon the other great microcontrollers, but take a break to see what the Propeller can do.
I want to look into the possibility of seeing if it is possible to create a ZX81 emulator (or a variation) as this was my first computer owned and had many great years programming them and playing the games. I even interfaced it to other hardware like more memory, etc..
What·I want to know first·as I have never done anything at this level before is to ask·how is the·best way to approach something like this? Do I take the commands·in the graphics.spin and tv.spin and modify them into a ZX81 or use the ZX81 ROM file and emulate the Z80. I don't really know where to begin. I am hoping this thread will generate some interest and post some good approaches.
Let me hear from you all...
Thanks.·
I want to look into the possibility of seeing if it is possible to create a ZX81 emulator (or a variation) as this was my first computer owned and had many great years programming them and playing the games. I even interfaced it to other hardware like more memory, etc..
What·I want to know first·as I have never done anything at this level before is to ask·how is the·best way to approach something like this? Do I take the commands·in the graphics.spin and tv.spin and modify them into a ZX81 or use the ZX81 ROM file and emulate the Z80. I don't really know where to begin. I am hoping this thread will generate some interest and post some good approaches.
Let me hear from you all...
Thanks.·
Comments
I think what is important is to glean the best of what these devices had to offer. A clean learning platform at a reasonable cost. There is true appeal.
For example, I just saw several complete cassette recorder chassis for sale at a very low price and was wondering if I should consider recording data on cassette. It seems quite troublesome and that I can just pop in another EEPROM or SDcard. The cassette recorder is like the geranium radio I had. Interesting, but give me something that I can enjoy more and learn with ease.
When you say emmulation, what is it that you really liked? The video, the Basic programming, the entry price, the fellowship, the Z80 Assembly language? What did you feel were the weaknesses - not enough ram, too little docuementation, small keyboard?
Some things are being well-done by others. There is already a good TINYbasic program package available on a 8952 package. That seems a lot closer to the Z80 Assembly language. Add the Propeller for your terminal keyboard and video display. If fact, you can have it be a super video display because of all the cogs.
I am just thinking about how to take the best of the past and make it better, more fun, and allow people to get youth involved in low level programing by possibly having older, more experienced people mentor them while enjoying the nostalgia.
I certainly am looking forward to reviving Asteriods as I really enjoyed all the different forms of gravity and hyperspace. A very simple video display, but it goes deeply into ones imagination. So did the Tank games.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"If you want more fiber, eat the package.· Not enough?· Eat the manual."········
I am refering to the EXATRON Stringy Floppy digital storage device.
You're showing your age! I still have my Stringy Floppy drive! It used a 1/16" wide endless magnetic tape loop. The cartridge was smaller than a business card. These were a godsend for people like me who couldn't afford a floppy disk drive but who were sick to death of cassette tapes. Attached is a photo of the drive. 'Couldn't find any of the cassettes, though.
I used my TRS-80/Stringy Floppy combo as a development platform for Zilog's Z8 microcontroller, using Allen Ashley's Z80-to-Z8 cross-assembler. It served me well until upgrading to an Otrona Attache' CP/M system.
-Phil
Update: I see Exatron is still in business. They now make IC handling and testing equipment. Their website is here: www.exatron.com.
Post Edited (Phil Pilgrim (PhiPi)) : 7/17/2006 3:42:24 PM GMT
I also interessing with emulators. I found this helful document: http://personals.ac.upc.edu/vmoya/docs/emuprog.pdf
My approach will be:
1) emulate the Z80 first
2) use the Rom
3) emulate the hardware
Shall we start with something easy?? ie Chip8 http://www.pong-story.com/chip8/
Let me know
Regards
Giemme
Emulating the Z80 at any speed at all is going to be rather difficult...
The reason is that interpreters like these usually rely on a large JUMP-table, with one entry for each instruction in the CPUs instruction-set, to point it towards the code for emulating that specific instruction.
Now, the problem is that the Z80 has 138 different instructions, or over 750 if you count every variation...
See?
A COG doesn't have enough RAM to fit both a table and the code to interpret all those commands.
Of course, you could set aside a COG for the 'normal' instructions, and then one for each 'prefix' group of commands, but then you'd also have to do interprocess communication. (not to mention, that all 'registers must be stored in HUB RAM)
Or maybe you keep a 'bare bones' framework in one COG, and let it read each instruction from HUB RAM, then load a block of instructions using that instruction-Byte as a pointer...
(Yes, I'm assuming it's all done in Assembly. Doing it in Spin... would be slow... very slow... )
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't visit my new website...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Definetly a E3 (Electronics Engineer Extrodinare!)
"I laugh in the face of imposible,... not because i know it all, ... but because I don't know well enough!"
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Other forums I frequent: Briel Computers: brielcomputers.com/forums
Applefritter: applefritter.com
Emulation is certainly fun. My motive for writing the C64 emulator is so that I can truly learn the guts of the C64. I was a "tweenager" when I started playing on Commodores. I was a very enthusiastic kid, going to all the club meetings, hanging out with the adults, taking machine language programming, etc. But my brain simply couldn't wrap around the true core of it all. I was unskilled. So now that I am an adult and work with computers for a living, I can start to understand some of the concepts that I only dreamed about when I was 13.
I started writing my emulator on the PC in VB.NET - fully knowing that it probably wasn't fast enough. And I was right. It wasn't fast enough. To be honest, I'm not even sure I can pull this off on the Propeller. I *am* writing it in SPIN - at least initially, for a clear, easy-to-follow code example. Once I have it working (even if it is slow), I plan to start porting it over to Propeller assembly. I understand there will be hurdles along the way (right now I have one - not enough memory). But that won't stop me. In fact, by the time I finish it, Parallax will probably come out with their newer, faster, more-memory-added chip. That will be great because I will already have the code ready to go and with a few tweaks, I'll have a fully-functioning C64. My point is... who knows if it will work - I'm just having fun writing the emulator and learning so much about computers and electronics - and the guts of the C64. (Sidebar: I did get the emulator working in VB.NET - to a point. It will fully emulate the system - you can program in BASIC, assembly, and do just about anything that doesn't require graphics or sound. I ran several BASIC programs just fine.)
Since I started my emulator in VB.NET, I have collected LOTS of books on old computers - not just C64 books, but general "how computers work" books too. I have filled my bookshelf. If you are interested in emulating, the first step is to get all of the documentation you can for the computer system you want to emulate. Especially the processor. Mine is the 6510, which is the child of the 6502. The 6502 was used in many older computer systems. Once I can emulate the processor, it is just a matter of emulating the other devices in the system.
So, like Kramer said... what is the purpose? My purpose is to have fun. If that is all you want to do, by all means - start programming. If it turns out too slow, or if there isn't enough memory, or whatever problems come your way, stick to it. You are, after all, just having fun! Besides - those limitations will eventually go away, so your code might just be worthwhile in the end!
Goog
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Doing my part to keep the Commodore 64 alive!
http://www.commodorestuff.com
·
What is the scope of your whole project? Do you intend to duplicate all the video, SID, VIA? I am more interested in engines for the video, without the rest.
Frank
I also have plans to emulate the other chips - I'd like to get it working as closely as possible. I won't be doing the entire SID chip (sound) myself - I need help on that one. I think Ym2413a signed up for that!
Once I can get the basic emulation of the 6510 processor, I will be able to start testing possibilities for graphics. I don't know what Andre's plans are, but he might have an engine that he plans on letting others use for video/graphics with his Hydra system.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Doing my part to keep the Commodore 64 alive!
http://www.commodorestuff.com
·
Yup that I did.
I've already started writing some useful sound firmware for the propeller.
It's really impressive already!