Memotech Conversions (MSX ports)

Include new and ported/converted games, and old games/tools. Subjects about CP/M software goes in the CP/M Forum.
Post Reply

Did you try my new Memotech Conversions?

YES - Played it at Real Memotech.
2
40%
YES - Played it in MEMU.
1
20%
YES - Played it at ReMEMOTECH.
0
No votes
YES - Played it in (another emulator).
0
No votes
NO - But I plan to try soon :)
2
40%
NO - I don't play games
0
No votes
 
Total votes: 5

User avatar
Crazyboss
Site Admin
Posts: 274
Joined: 09 Aug 2012 21:45
Location: Sweden
Contact:

Memotech Conversions (MSX ports)

Post by Crazyboss »

The few last months I released a few MSX ports for Memotech. I used quite long time to those ports, but don't know if you guys every spend time play them. Please tell me what you think about them. Until now the games released are:
  • Pac Man
  • Comic Bakery


Downloads:
Pac Man
pacman.wav (Rar compressed)
pacman.run
pacman.mtx (Thanks PAUL)

Comic Bakery
bakery.wav (Rar compressed)
bakery.run
bakery.mtx (Thanks PAUL)


The next one will be:
  • Telebunny (or Telebunnie)
And possibly followed by:
  • Road Fighter
Please vote the poll, yes i know its possible to choose NO together with YES :) the poll is not very clever....

Any comments - just post a reply :)

By the way - a Million thanks to Andy Key, for help me out during the conversion, amazing he did'n get tired about all my questions :)
//CLAUS - Webmaster at www.mtxworld.dk
User avatar
LuisGG
Posts: 2
Joined: 09 Mar 2013 21:28

Re: Memotech Conversions (MSX ports)

Post by LuisGG »

Claus, do you have writen any guide on how to port MSX games to MTX?
User avatar
Crazyboss
Site Admin
Posts: 274
Joined: 09 Aug 2012 21:45
Location: Sweden
Contact:

Re: Memotech Conversions (MSX ports)

Post by Crazyboss »

Hi Luis.

No guide, but there is a few "golden rules", I have worked out which help me doing the work.

Those rules works for any platform that can be converted: MSX,Spectravideo 318/328,Colecovision,Sord M5 and Sega SG1000.

If you can find a game which dont use Interrupt its Perfect, it save a lot of problems, but most games use Interrupts. Actually I ported "Kilopede" to Colecovision in less than one day, I think 2-4 hours!

Next one, which can help a lot is if you can find two files of the game running at different addresses. You must be sure the game didn have to much modifies, and same length then its a help, eg. I had Andy Key's Astropac in .comfile (org 0x0100) and the original one was org 0x8100 :) In that case you just make your source and assembled it. Lets say you make the source from the com file, and you org it to 0x8100 and assemble it, then in a hexeditor you compare the original 0x8100 file to the new assembled file, which was based at the 0x0100 com file, if they match you had a perfect source - but to get this you need a lot of work.....

The best tools I found for doing this is: DASMx 1.40 (c) 1996-2003 by Conquest Consultants. This can take the original binary code, and make some kind of source out of it. Its clever but not to clever. Cause Konami MSX games, uses indexed jumps, and its not for sure it will know it, so alot of things have to be done by hand. If eg your bin file is called game.bin you can create a ascii file named game.sym with some information. It have keywords like CODE,BYTE and so. it helps the DASMx to make a better source.

After I have a perfect source its time to assemble it back to my own binary file I use AS80 (C) 1994-1996 Frank A. Vorstenbosch, its very good but need dosbox to run at 64bit windows.

As Hexeditor I use HxD by Maël Hörz (www.mh-nexus.de)

When you have the perfect file, you should try to set move the org a bit. Like E.G PACMAN it run originaly at MSX at org. 4000, or around there, then change it to 8000, and see if the game still runs, if it dont run you didn have a perfect source, and you have to look what can be wrong. You also have to check for LD HL,xxxx (including LD DE IX IY and so), cause it can be you didn catch all those, and then the code will not work. E.G a LD HL,$4E45 should be changed to LD HL,X4E45, cause when the code is compiled (assembled) at another org the LD HL,$4E45 still go to that address of $4E45 and not the address at X4E45, which it should do.

The tricky part is you dont know, for sure if a HL or DE or IX or IY is a address that should be moved or not. E.G VDP addresses dont have to be moved. Cause they are the same, but memory addresses have to and so. So its a hard job.

Later you have to find IN and OUTS including variants like OTIR - cause e.g MSX use 0x99 and 0x98 ports at MTX is 0x02 and 0X01.

Calls to Basic roms which MSX games usely do have to be assembled and copied into your code. It can be that they move e.g sprite data from memory to VDP using Basic rom calls, in that case you just steal the code from the MSX bios and put it into your game. Its not a problem, its quite easy to do.

But still you have far to go, cause you need to "emulate" MSX Joystick at MTX. The same is for Keyboard inputs. And the most ugly one is the SOUND. cause MSX and MTX dont use the same soundprocessor.

If anyone want to try to convert a MSX game I suggest you start with a 8 or 16kb game, normaly game ROMS runs at 0x4000.

When you have made a perfect source, dont change it but try to put it org 0x8000, and try if your msx game then runs, if it runs perfect it seems like you have a perfect source, and now you can try to make all the changes needed to get it run at MTX.

For your information a 16kb game outputs around 125kb asm file.

If you have a source and its not running if you change the ORG you didn make a clean source and you have to go back.

MSXroms have a header at e.g 4000: 41 42 10 40 00 00

In your source it should be something like this.
org $4000
L4000: db $41,$42
dw runadr
db 00,00,00
.
.
.
runadr: di
.
.
.

when you change to $8000, the assembler automatic change the runadr from $4010 to $8010.

Its not easy to make a guide, but only to explain how its done, You need to have some knowledge about z80 assembler. And be patient.

Another thing is Variables (Memory addresses) usely in msx ROMS they use like $E000, cause the roms are like eproms, so they cant write into the area 0000-7FFF. You should also be aware when you move your code, you dont overwrite the Variable area. Memotech games are quite "messy" they have code and variables, and tables and so inside the same area, cause those game are ment to run in memory and not in a ROM.


I hope this one gave a clue, maybe later I will write more about it, but you are welcome to ask questions.
//CLAUS - Webmaster at www.mtxworld.dk
User avatar
LuisGG
Posts: 2
Joined: 09 Mar 2013 21:28

Re: Memotech Conversions (MSX ports)

Post by LuisGG »

It sounds like a lot of work!

I have some experience doing porting with MSX. I did the very first SVI328 MSX emulator (with the grant of SVI). It was a cartridge inserted in the SVI game slot that mounted a MSX-like environment by changing banks. Games were analyzed and converted on the fly while they loaded, and a static analysis took place just after being loaded. It achieved automatic compatibiity with 90% of the machine code games available at the time.

Of course SVI328 hardware had the big advantage to be very like a true MSX.
I think the idea of working with an empy 64KB RAM space would be usable in MTX too.
Would it not be nice to port the MSX-ROM itself and then working from there to port some games?

By the way, have you had any claim about copyright issues when porting games? :-(
Post Reply