Making an MSX Emulator (Emulation MSX Forum)MSX Resource Center MSX Info Update - Finnish MSX madness at its best              
              
English Nederlands Español Português Russian         
 News
   Frontpage
  News archive
  News topics

 Resources
   MSX Forum
  Articles
  Reviews
  Fair reports
  Photo shoots
  Fairs and meetings
  Polls
  Links
  Search

 Software
   Downloads
  Webshop

 MRC
   Who we are
  Join our team
  Donate
  Policies
  Contact us
  Link to Us
  Statistics

 Search
 
  

  

 Login
 

Username

Password




Don't you have an account yet? Become an MSX-friend and register an account now!.


 Statistics
 

There are 41 guests and 2 MSX friends online

You are an anonymous user.
 

MSX Forum


MSX Forum

Emulation - Making an MSX Emulator

Author

Making an MSX Emulator

kjeld
msx friend
Posts: 1
Posted: January 30 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
Posts: 873
Posted: January 30 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
Posts: 303
Posted: January 30 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
Posts: 3451
Posted: January 30 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
Posts: 1018
Posted: January 31 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
Posts: 819
Posted: January 31 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
Posts: 4
Posted: February 14 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
Posts: 3451
Posted: February 15 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 MSX Resource Center Foundation. MSX is a trademark of MSX Licensing Corporation.