Emulattion Theory Question

Started by
4 comments, last by samuraicrow 17 years, 9 months ago
Hi all, I am very new to this board and with vry little experience programming and i know what i am asking here is probably beyond what i can acomplish alone. Still, i would like to know, theorethically, what would i need to implement my idea. What i want to do is easily explained but not so much putting it into practice. I want to design a Retro Computer ( i know there is a project called the Hydra but since i cant find little information about it, and i dont know exactly what it covers here i am ). My retro computer should have a simple yet modern architecture. based on a microATX or FlexATX form factor Mother Board, it should handle up to 128 MB Ram, it should use a disk drive similar to that of the iPod Mini ( 8 GB ), no floppy, no CD/DVD, a keyboard similar to the Happy Hacker Keyboard, some nVidia card with low power consuption and capabilities similar to that of the Ti 4600 128 VRAM, 4 USB 2 ports for devices like mouse, flash drives, external disk or floppys, etc, integrated modem and network card. The machine should boot directly in a version of Basic or some other language brought up to modern standards and capable of accesing the devices on the machine. The internal disk is only for storage of configuration files. it should have updatable firmware for updates to OS. Now you migh ask, what is the purpose of all that hardware on a GameDev forum dedicated to software. Well, i am wondering if it is feaseble to make an emulator for a machine that only exists in my head ( ought to be easy to build it virtually than fisically ). Thus the topic of my post, how one goes about learning about emulators and designing one for a machine that only exists in my head? thanks in advance, and if i have asked something that is way out of scope i apologize. Luis R. Rojas
Advertisement
Quote:Thus the topic of my post, how one goes about learning about emulators and designing one for a machine that only exists in my head?


Im tired, and thats the only line that I understood. Look at how other emulators for real systems are made. For example, learning a bit about z80 assembly, and then learning how a gb emulator works, is a "good" step towards developing your own emulator.

zophar.net
go there^
What you are talking is about emulating an x86 unit of some specific build. With the parts you describe it would actualy be easier to just build the system, seeing as you could do it relatively cheaply. emulating EVERYTHING the same way currently emulators would not only be extreemly complicated, but definate overkill. I know of no computer capable of emulating a 1ghz processor, let alone anything higher. real emulation involves taking a call and mapping it to different call(s) in realtime, with timers, etc, set to behave like the target unit. Since you are refering to emulating non-dedicated hardware with large capacity, this would be next to impossiable to achieve. Your best bet would just to be limit yourself programming wise with the capabilities of the graphics card in question, make sure your tri/fill rate is well within the range supported by the target card, you can use timers to ensure a "speed lock" on your program. you can create a "wrapper" sdk, wrapping OS calls with your own functions that your OS will have. This should make that portion easy enough.

Alright, I have to get back to work
So you're thinking of designing a new piece of computer hardware. I've got a few pointers since I've got a 2-year degree in electronic engineering technology and am working on a 4-year degree in computer science.

You might start out by deciding what processor to use. Is it little-endian or big-endian? (Little endian is what Intel and AMD use but big endian is easier to figure out if you're used to regular binary counting orders and such.)

I'd suggest using a MIPS processor since it has an easier machine language to learn than Intel or PowerPC yet it still delivers good performance. It can be either little-endian or big-endian depending on the voltage on a certain pin when it powers up.

For a programming simulator of a MIPS processor download PCSPIM and read the documentation from the links at the bottom of that website. (Note that if you run it on an Intel or AMD PC it will default to little-endian simulation.)

Secondly, since the SPIM simulator is open-source you can use it as the basis for your virtual machine. The downside is you might have to do some searching to find a version of the GCC cross-compiler for your MIPS machine but once you do find it you should have little trouble translating a Basic dialect into MIPS.

Here's the hard part: accessing hardware from the bare-metal machine language is going to require some accurate and exhaustive documentation about the graphics and sound chips you're going to use. Even Linux has closed-source drivers for the NVidia and Radeon chipsets so you might have to build your own graphics chipset.

I'd design the graphics chips around the algorithm of a software renderer and furthermore, I'd recommend the source code of Allegro, whose scene-render is a good starting point since it was originally designed to work on an old DOS box with no graphics acceleration at all.

The sound chips could use software mixers such as the ones used in SDL_Mixer since that simplifys the design overall. (Note that if you want to play different sampling rates into it then you'll have to use the MikMod mixer rather than the main mixer whose sampling rates are fixed.)

You'll also likely have to dig through the source code of an open-source BIOS to get code for your USB stack so that your keyboard and mouse will function at all.

I don't know what to recommend as far as operating systems although a micro-build of Linux would probably be most accessible and would allow you to compile a great deal of software for it with very little effort.

Lastly, my biggest recommendation, DON'T TRY THIS BY YOURSELF. IT WILL TAKE WAY TOO MUCH WORK TO GET ANYWHERE WITHOUT HELP.
thanks for the reply guys!

*sigh* you are all right, but what can i do, i have this great idea, a microcomputer for US$200, boots in basic or some other language, is kind of the experience we ( I hope I am not the only one ) had when first introduced to computers in Commodore 64, Apple IIe, TRS-80 CoCo. Just contemplating building a machine that could sit among the tinkeres of late 70's early 80's gives me a sense of wonder regarding the pioneers in the field, people that build computers in their garage. Even today, with all the tech we got, the task is no less daunting.

Of course, i am no wozniak, i just have an idea turning in my head, and i have absolutely no idea how to build it. I imagine the machine looking like a mac mini, with a small keyboard ( happy hacking II is na example ), a flat screen lcd 14", and you turn it on, the screen says "Welcome to Nostalgia".

It dosent have to be a power house, it just need to work in a modern enviroment but the feel is definitely retro. The computer you buy for homebrew gaming, the machine you use to tinker, the machine you buy so the young ones learn.

I dont know, maybe i am crazy, i would buy such a machine... perhaps i am alone in this, but even if i can built one, the prototype, even if it takes me years, i want to build it. I dont know if i can put it toguether, i dont know if i can do all that is necesary, in my country not many people tinker with hardware and code beyond the basics.

Anyway, i apreciate the answers i have gotten, if and when i manage to advance an inch in this project i will post it and discuss it here...

Thanks,

Luis R. Rojas
Your second description could be built on the Nintendo Wii game system when it comes out with the exception that it will likely boot from a DVD-ROM drive and will require somebody with a DevKit to port an operating system to it. I wouldn't be surprised if somebody makes a computer out of the Wii, anyway, since it does use USB ports and could, in theory at least, interface with any USB device such as printers and scanners and modems.

It may cost a little more than $200 as a price point but remember that in 1983, the Commodore 64 required an external floppy drive or cassette drive that pushed its price point well above the $200 mark as well. That C64 was some of the best money I ever spent, however, and I learned an awful lot of what I know today from probing the capabilities of that machine.

This topic is closed to new replies.

Advertisement