flat assembler
Message board for the users of flat assembler.

Index > MenuetOS > 16 bit x86 emulator


What architecture would you most like a MeOS emulator of?
x86
52%
 52%  [ 10 ]
Mac68k
0%
 0%  [ 0 ]
Amiga
10%
 10%  [ 2 ]
Atari
0%
 0%  [ 0 ]
C=64
21%
 21%  [ 4 ]
Apple/Apple II
5%
 5%  [ 1 ]
Other
10%
 10%  [ 2 ]
Whats an emulator? =P
0%
 0%  [ 0 ]
Total Votes : 19

Author
Thread Post new topic Reply to topic
compilax



Joined: 18 Feb 2004
Posts: 56
compilax
Ive started writing a 16 bit x86 emulator called 'Temoo' (don't ask Wink - Temu looks/sounds boring). Here is what is planned:

* Option of hard coded (fast) or software BIOS (can be modified). Hardcoded BIOS will include DOS interupts so a DOS app can be ran without having a copy of DOS.
* GEOS/CP-M/DOS/Windows upto 2.0 compatibility
* At very least 80x25 text and 320x200x256 graphics modes
* Maybe a small GUI OS in the hardcoded BIOS
* Integration to MenuetOS - eg: DOS can see the ramdisk, Apps can use a special interupt to access MeOS functions (for example, open a window or run an app), Emulated sound card that is sent to menuetOS (like windows - i have a Sound blaster, but i can select non sb drivers in DOS games and they all just go through my sound blaster.
* Maybe 32 bit - that'd be cool

Once I get the core done and a few op-codes, i will GPL it and put it on the net.

I am hoping that it can be used like bochs - to emulate a computer - or just where you click a .COM or .EXE and it opens and runs just like in windows. It should also be configurable - make it load 'DOS.DSK' for .BAT and stuff.

Why not just do v86 in the kernel, you might ask? That would weigh down the kernel (eg: MacOS-X is a little faster because it doesnt have system-wide emulation for older apps, it has an actual emulator). Sure, DOS apps will be slower, but only high end - and 32 bit Wink - games will be noticeably slower.

I hope people are willing to contribute to this project once I get it off the ground, else it will have a similar fate to my older z80 emulator - forgotten about until i accidently delete it Mad .
Post 21 Mar 2004, 05:39
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
compilax



Joined: 18 Feb 2004
Posts: 56
compilax
Come to think of it, an Amiga emulator would be realy realy realy realy cool.

I would much prefer to write an amiga emulator if anybody knows of a good resource about Amigas (other than the UAE source code).

I know it's off topic, but does anybody know how to make a PC read an Amiga disk (only has one hole, not two - PCs don't notice a disk is inserted. Don't worry - i'm not a newbie asking why it says it is unformatted - i just want to know how i can get disk images of my Amiga workbench 1.3 disks so i can use them with UAE.
Also if you know of any free OS that will run on Amigas (i have an amiga, but i cant boot it because i have the wrong workbench for it - the ROM needs 1.0 or something and i have 1.3 - i just wanna see it going).
Post 21 Mar 2004, 05:57
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
Ivan Poddubny



Joined: 21 Sep 2003
Posts: 32
Location: Yaroslavl, Russia
Ivan Poddubny
It would be much better if you wrote support for V86 mode. I think it's not efficient to build x86 emulator for x86 platform.
Post 21 Mar 2004, 08:18
View user's profile Send private message Visit poster's website Reply with quote
bogdanontanu



Joined: 07 Jan 2004
Posts: 403
Location: Sol. Earth. Europe. Romania. Bucuresti
bogdanontanu
I would prefer a ZxSpectrum Emulator because it has a huge number of games available Wink ... so i think i might make one for Solar OS when i will have the time
Post 21 Mar 2004, 10:22
View user's profile Send private message Visit poster's website Reply with quote
spideros1



Joined: 17 Jan 2004
Posts: 77
Location: Poland
spideros1
Basic 386 emulation would be sufficient: only real mode, with 32-bit registers. However I voted for C=64 (I had one 8 years ago Wink ), it would be nice to run those old DOS apps, such as NC or Turbo Pascal Wink and old games that work in real mode.
Post 21 Mar 2004, 14:33
View user's profile Send private message Visit poster's website Reply with quote
profkid13



Joined: 21 Aug 2003
Posts: 112
profkid13
compilax wrote:


I know it's off topic, but does anybody know how to make a PC read an Amiga disk (only has one hole, not two - PCs don't notice a disk is inserted. Don't worry - i'm not a newbie asking why it says it is unformatted - i just want to know how i can get disk images of my Amiga workbench 1.3 disks so i can use them with UAE.
Also if you know of any free OS that will run on Amigas (i have an amiga, but i cant boot it because i have the wrong workbench for it - the ROM needs 1.0 or something and i have 1.3 - i just wanna see it going).



try winimage
Post 21 Mar 2004, 18:38
View user's profile Send private message Reply with quote
compilax



Joined: 18 Feb 2004
Posts: 56
compilax
1) Rawwrite doesnt have a 50/50 chance of crashing when i open a non FAT floppy =)
2) It is not to do with the software, it is a physical thing with PC drives

I think I will put in x86 emulation, but i'll try to keep it portable in the way of what it emulates.

How I think it should work:
* One thread for the main window. this keeps track of mouse clicks and keyboard stuff and has some basic buttons on it (like bochs - insert, eject, halt, etc.) and shows the main image (emulated screen).
* One [or in the future more maybe] thread[s] for the actual emulating. does a delay of x/100 seconds each clock tick (although may be useless at those speeds) or no delay for maximum speed.
* Optional debug menu - shows [E]IP, [E]AX, stack, etc. as above, if emulating more than one machine, several of these windows may be open.
* Threads for different hardware: In situations where not all i/o is done via the BIOS (eg: under a 32 bit OS), actual hardware must be emulated.

I think the job would be made significantly easier if it only ran 16 bit standardised DOS games. Only CPU emulation and hardcoded handlers for BIOS and DOS interupts would be needed. I'd guess 95% of 16 bit DOS apps use everything through BIOS calls other than video and sound stuff.
Post 22 Mar 2004, 06:01
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
spideros1



Joined: 17 Jan 2004
Posts: 77
Location: Poland
spideros1
Threaded simulation would be OK, but you'd have to do some synchronization between threads, e.g. signalling interrupts by emulated devices. I think you should start with basic 8086 emulation, then add 286 stuff, so even Windows 3 would run Wink There's no point in writing 386 emulator at first, because if you have fully debugger and working 8086 core, then you can write 386 support. I think it's no use in writing own BIOS, but do emulation of BIOS interrupts. Even DOS interrupts could be emulated, so we could run DOS programs on MenuetOS "native" filesystem.
Post 22 Mar 2004, 08:26
View user's profile Send private message Visit poster's website Reply with quote
Kain



Joined: 26 Oct 2003
Posts: 108
Kain
If your looking for a program that makes images of Amiga disks, there is already one available. Check out the WinUAE site. You need 2 floppy drives though.

WinUAE is already pretty good, I don't think there is a need for another Amiga emulator. What would be useful is a program that takes images of Amiga disks using only one floppy drive, as most systems aren't set up with 2 floppys anymore and don't want to bother adding another one.
Post 22 Mar 2004, 16:41
View user's profile Send private message Reply with quote
compilax



Joined: 18 Feb 2004
Posts: 56
compilax
It is more than just adding another floppy anyway... i was under the assumption it is no longer a physical ability of the PC to have more than one floppy drive. My BIOS setup has no mention of it, and I only have one cable, with a connection for one drive. Not sure if > 1 fdds can be put on one cable like ata. Pitty, cus i have a spare floppy drive. I'll have a look anyway, thanks.

Yeh, i'm gonna start with 16 bit real mode and move up (8088>286>386>maybe even more). As i mensioned in a previous post, the BIOS will be hardcoded (ie: there isnt an actual bios loaded, the emulator handles BIOS and DOS ints), but i hope to give it the ability to load BIOS[s] on startup that override the hardcoded one. i say BIOS[s] because someone might want to have VGA seperate to the main BIOS or put an OS into another virtual ROM chip.

Havent done any more work yet. I'll write a basic emulator (parseable opcodes, app loading, start of BIOS) - then i'll check out bochs source.
Post 24 Mar 2004, 08:12
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
spideros1



Joined: 17 Jan 2004
Posts: 77
Location: Poland
spideros1
Some suggestions that you might consider (or not Smile ) :
- you should look at Bochs code for emulating CMOS,PIC,PIT and DMA, unless you want to read docs for them Wink It's better to use code from bochs as base for I/O devices.
- do you want IPS to be unlimited (as fast as CPU can execute) or dependent on physical CPU speed ?
- don't write any block device drivers at first (only basic int 0x13 emulation through systree interface for floppy)
- you don't even have to support user-made BIOS at first, only emulation, AFAIK this is how it's done in WinXP - Look at windows/system32/bios1.rom and bios4.row - i think it's loaded as virtual BIOS, since there's almost no code
- you have to do some ROM chip emulation (e.g. display font in ROM)
Post 24 Mar 2004, 16:08
View user's profile Send private message Visit poster's website Reply with quote
compilax



Joined: 18 Feb 2004
Posts: 56
compilax
Can do a NOP (via a call table - if an entry is 0, it will say undefined opcode - treating as NOP, and if it is anything else, it will call that pointer) and shows a debug window with the value of IP Smile On the agenda for after school:
* Homework Evil or Very Mad
* Some 'useful' instructions (some movs, int, some call & jmp varieties)
* put-char-on-screen BIOS call support (just using meOS function 4 - print text to window - for now).
* Basic keyboard?
* Possible upload (no real point until it does something useful tho)
* Main goal: make it run a small application/demo that _wasnt_ written for the purpose of testing the emulator.

In the long run, i might implementing things as they are needed for the execution of:
1) either real DOS or just command.com using emulated DOS interrupts
2) GEOS or something small like that (8/16 bit GUI)
3) then maybe windows 1/2
4) MeOS! Smile

I was thinking, maybe in some future meOS version, you right click on an app and select 'run under emulation' so it runs a normal meOS app, but in emulation - which would be slower - and you have access to debug features (maybe breakpoints, can see registers, pause) and (no good if just using the normal fs tho Very Happy ) to test dangerous applications.

cya for today, expect an upload within a week or two (once it'll run some type of small demo game - that'll get a bit more interest). Thanx for feedback.

btw its written in NASM because im not too familiar with FASM but i will port soon.
Post 24 Mar 2004, 20:06
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
profkid13



Joined: 21 Aug 2003
Posts: 112
profkid13
i'm looking forward to it Smile

Is it really hard to make an emulater for nintendo consoles?
is there any tutorial or something how to make one?
Post 25 Mar 2004, 13:33
View user's profile Send private message Reply with quote
profkid13



Joined: 21 Aug 2003
Posts: 112
profkid13
Are you guys just too lazy too answer or dont you'll guys know anything about emu's/nintendo's :p
Post 29 Mar 2004, 14:14
View user's profile Send private message Reply with quote
Tolle



Joined: 21 Jan 2004
Posts: 71
Tolle
NES!
Profkid13, google zou je al een heel eind op weg kunnen helpen Smile
Post 29 Mar 2004, 18:15
View user's profile Send private message Visit poster's website Reply with quote
profkid13



Joined: 21 Aug 2003
Posts: 112
profkid13
@tolle: ik zal nog eens kijken maar een opensource emulator gemaakt in assembler heb ik allesinds niet gevonden
Post 30 Mar 2004, 18:30
View user's profile Send private message Reply with quote
Endre



Joined: 29 Dec 2003
Posts: 212
Location: Budapest, Hungary
Endre
I ain't interested in spectrum, but for a good start point you could check out this one:
http://www.worldofspectrum.org/emulators.html

If you didn't find anything written in assembly you may try searching for other computers based on Z80, like for instance enterprise.

Endre
Post 30 Mar 2004, 20:19
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.