Public Group

# Emulattion Theory Question

This topic is 4432 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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

##### Share on other sites
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^

##### Share on other sites
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

##### Share on other sites
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.

1. 1
2. 2
3. 3
frob
20
4. 4
JoeJ
20
5. 5

• 11
• 11
• 12
• 13
• 9
• ### Forum Statistics

• Total Topics
632213
• Total Posts
3004848

×