Making an MSX Emulator (Emulation MSX Fora)MSX Resource Center MRC MEGA Challenge - What can you squeeze out of 64x48 pixels?           
            
English Nederlands Español Português Russian         
 Nieuws
   Voorpagina
  Nieuws archief
  Nieuws onderwerpen

 Informatie
   MSX Fora
  Artikelen
  Recensies
  Beursverslagen
  Fotoreportages
  Beurzen en meetings
  Enquêtes
  Links
  Zoek

 Software
   Downloads
  Webshop

 MRC
   Wie we zijn
  Kom bij ons team
  Doneren
  Policies
  Contact met het MRC
  Link naar Ons
  Statistieken

 Zoek
 
  

  

 Login
 

Gebruikersnaam

Wachtwoord




Ben je nog niet lid? Klik hier en word MSX vriend!


 Statistieken
 

Er zijn 151 gasten en 0 MSX vrienden online

Je bent een anonieme bezoeker.
 

MSX Fora


MSX Fora

Emulation - Making an MSX Emulator

Schrijver

Making an MSX Emulator

kjeld
msx friend
Berichten: 1
Geplaatst: 30 Januari 2008, 14:46   
Hello,


I have been doing quite some ASM programming on an MSX2 in the eighties.
Currently I am a Java programmer by profession and now and then I get very interested in reviving that MSX feel: you know, hook it up again (I still have an NMS 8280), do some programming, play games, etc.
I also understand there has been a lot going on in the last twenty-five years, keeping the MSX alive, like emulators have been created so you can play those vintage games on your pc.

Although there are numerous emulators out there, I would like to program one myself. Just because I think it is a fun thing to do. I started creating one in Java. I made a nice Memory class a.o. which emulates the memory mapping mechanism, it has a peek and a poke method I can use internally, which make sure the correct ROM or RAM memory area is accessed so I covered that part.
I started working on an Emulator class which reads an opcode and then changes the register values or memory locations accordingly. I think the only real challenging instructions will be IN, OUT and maybe the Interrupt manipulating instructions, which I have not yet covered.

But another, bigger problem has come to my attention. Of course, when interpreting each instruction, the F register (flags) have to be manipulated also. I find this a little disturbing, since I do not know how exactly each flag is affected by each instruction.

Am I on the right track here, or is this altogether unnecessary. If not, how can I find out how each and every instruction affects the flags. I do already have a list of opcodes with a column that displays the affected flags (if any), but to make an emulator I guess I need more details.

Info anyone?

Kind regards,
Kjeld Sigtermans


jltursan
msx professional
Berichten: 748
Geplaatst: 30 Januari 2008, 14:55   
Well, here you can find a list of Z80 opcodes with their respectives F status. Try to find other lists and compare with this one to be sure about the info...

Btw, welcome to MRC!
Tanni
msx addict
Berichten: 298
Geplaatst: 30 Januari 2008, 18:26   
See ''Programming the Z80'' by Rodnay Zaks or www.zilog.com/docs/z80/um0080.pdf or visit map.tni.nl/resources/.
manuel
msx guru
Berichten: 3279
Geplaatst: 30 Januari 2008, 19:10   
Or see how e.g. openMSX did it, all data is in there.

Note: I think you misnamed your class there. It shouldn't be Emulator, but "CPU" or even "Z80".
cax

msx professional
Berichten: 977
Geplaatst: 31 Januari 2008, 07:39   
If I am not mistaken, Z80 (and MSX) already were emulated in Java and can work as an applet, and it also was attempted to run MSX emulation on J2ME devices (was too slow), so maybe you want to peek into the existing sources.
Yukio
msx professional
Berichten: 718
Geplaatst: 31 Januari 2008, 17:23   
I don't think that J2ME devices are "too slow" ... Four to five years old Mobile Phones were about 100 Mhz, maybe someone would need a modern (preferable this year) Multi Media Portable (Tablet?) Computer with 1Ghz!
Now, I believe that the acceptable performance is around 200-300 Mhz for the absolute 'minimum' systems (Like Palm compatible Smart Phones) ... This and the Bluetooth and WIFI (could be a expansion card) !!!

Much like the Personal Digital Assistant, there should be a market for powerful portables .

core2
msx friend
Berichten: 4
Geplaatst: 14 Februari 2008, 19:51   
Good Luck, portables . kjeld.

I'm also studing C / C++ language to make or join to develop MSX emulator.
My favorite MSX emulator for BlueMSX / MESS uses C / C++ language.
When I'm ready to make MSX emulator, I want to make new emulator based on blueMSX / MESS.
(I'm not interested in other MSX emulator..)



manuel
msx guru
Berichten: 3279
Geplaatst: 15 Februari 2008, 08:46   
Note that blueMSX and MESS are very different MSX emulators (although some code might be reused from the other). Both are mostly written in C, not C++.
I'd enourage you not to make an new MSX emulator but join efforts with either the blueMSX or MESS team, or both. Especially if you want to have your work published, because then it will have to be open source anyway and then you could even more just as well join the other project(s).
 
 







(c) 1994 - 2008 Stichting MSX Resource Center. MSX is een trademark van MSX Licensing Corporation.