Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - MSX to SMS Hacks

Reply to topic Goto page Previous  1, 2
Author Message
  • Joined: 30 Jan 2007
  • Posts: 247
  • Location: San Jose, CA
Reply with quote
Post Posted: Sun Dec 18, 2016 3:37 am
DerZocker wrote

I'd suppose Master Everdrive, right?

Well yes since the Genesis/MD doesn't support the TMS9918 video modes.
  View user's profile Send private message Visit poster's website
  • Joined: 01 May 2011
  • Posts: 371
Reply with quote
Post Posted: Tue Dec 20, 2016 11:35 pm
http://map.grauw.nl/resources/msx_io_ports.php

VDP / Video Display Processor / TMS9918A / v9938 / v9958

These are the I/O registers for accessing the standard MSX VDPs:

Port range    Description
#98    VRAM data read/write port
#99 (write)    VDP register write port (bit 7=1 in second write)
VRAM address register (bit 7=0 in second write, bit 6: read/write access (0=read))


PSG / AY-3-8910 / YM2149

These are the I/O registers for accessing the MSX PSG (Programmable Sound Generator):

Port range    Description
#A0 (write)    Register write port
#A1 (write)    Value write port
#A2 (read)    Value read port


Additional PSG I/O ports A & B

The PSG has two additional I/O ports in registers 14 and 15. They are used by the MSX standard for several device I/O related tasks, comparable with the PPI and working more or less in conjunction with it. These are the functions:

PSG I/O port A (r#14) – read-only Bit    Description    Comment
0    Input joystick pin 1    0 = up
1    Input joystick pin 2    0 = down
2    Input joystick pin 3    0 = left
3    Input joystick pin 4    0 = right
4    Input joystick pin 6    0 = trigger A
5    Input joystick pin 7    0 = trigger B
6    Japanese keyboard layout bit    1 = JIS, 0 = ANSI/AIUEO/50on
7    Cassette input signal    
PSG I/O port B (r#15) – write/read Bit    Description    Comment
0    Output joystick port 1, pin 6    Set to 1 to allow input
1    Output joystick port 1, pin 7    Set to 1 to allow input
2    Output joystick port 2, pin 6    Set to 1 to allow input
3    Output joystick port 2, pin 7    Set to 1 to allow input
4    Output joystick port 1, pin 8    
5    Output joystick port 2, pin 8    
6    Joystick input selection, for r#14 inputs    1 = port 2
7    Kana led control    1 = off


PPI / Programmable Peripheral Interface / 8255

The PPI controls a number of things in the MSX system, ranging from slot selection through cassette output to interfacing with the keyboard.

Port range    Description
#A8    PPI-register A
Primary slot select register.
#A9 (read)    PPI-register B
Keyboard matrix row input register.
#AA    PPI-register C
Keyboard and cassette interface.
#AB (write)    Command register.


I was able to get some games running (example; Super Cobra) by changing the ports in the MSX rom to SMS ports, this also mapped the keyboard to the pad to enable starting of games which require a keyboard "key x" for joystick selection (generally "key 1" = pad#1 down). I haven't managed to get the PSG working correctly yet, but it did fix graphical glitches.
  View user's profile Send private message
  • Joined: 25 Feb 2006
  • Posts: 441
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Wed Dec 21, 2016 12:43 am
One interesting possibility: this page has a disassembly of the MSX BIOS.

Maybe this could be adapted to the SMS hardware, hopefully allowing more accurate conversions of MSX games; by combining this with some custom mapper with additional RAM, it should be possible to convert a greater variety of MSX software. Maybe it would even be possible to run tape games, either by loading memory snapshots directly to RAM, or by modifying the tape-related BIOS routines to use the ROM as an emulated tape; maybe it would even be possible to emulate the disk that way.
  View user's profile Send private message Visit poster's website
  • Joined: 01 May 2011
  • Posts: 371
Reply with quote
Post Posted: Wed Dec 21, 2016 9:21 am
Boogie Woogie Jungle, Konami's Billiards (AKA "Video Hustler" and "Computer Billiards"), Track & Field 1 & 2 (AKA Hyper Olympics), Roger Rubbish, Super Penguin, and Super Snake.
MSX2SMS #8.zip (229.57 KB)

  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 11723
  • Location: London
Reply with quote
Post Posted: Thu Dec 22, 2016 9:29 am
PSG mapping requires dynamically adjusting the data from the MSX PSG to equivalents for the SMS PSG, and the process is not entirely possible to do perfectly because their specs do not match.

Tape games loaded to RAM are likely to have variables interspersed in the code, or even be self modifying. That means you can't run them from ROM, but it may be possible to load them to RAM if they live below the 8KB limit (and are relocatable if necessary).
  View user's profile Send private message Visit poster's website
  • Joined: 01 May 2011
  • Posts: 371
Reply with quote
Post Posted: Fri Dec 23, 2016 10:50 pm
haroldoop wrote
One interesting possibility: this page has a disassembly of the MSX BIOS.

Maybe this could be adapted to the SMS hardware, hopefully allowing more accurate conversions of MSX games; by combining this with some custom mapper with additional RAM, it should be possible to convert a greater variety of MSX software


Minimum MSX spec seems to have been 16KB RAM, and as far as I can tell that should be enough to run pretty much all MSX1 games. So two options;

1) Additional 8KB RAM, but this wouldn't be mapped correctly for MSX so would require hacking the MSX ROM. If you could also hack the ROM to use the Sega mapper you might be able to use an existing game as a donor cart.

2) Additional 16KB RAM whilst disabling the system RAM so as to correctly map for MSX.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 11723
  • Location: London
Reply with quote
Post Posted: Fri Dec 23, 2016 11:10 pm
In theory you can map cartridge RAM in c000-ffff, but I doubt Everdrive supports it. I guess the BIOS ROM reserves space in the low RAM, so games are ready shifted up a bit.
  View user's profile Send private message Visit poster's website
  • Joined: 01 May 2011
  • Posts: 371
Reply with quote
Post Posted: Fri Dec 23, 2016 11:20 pm
Do you mean that you can use the existing 8KB system RAM at c000-dfff, and map 8KB cartridge RAM to e000-ffff? It's theoretically possible to disable system RAM mirroring at e000-ffff without disabling system RAM at c000-dfff?

Everdrive has 32KB FRAM, is that suitable for work RAM? It's probably a moot point without access to the source code anyway.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 11723
  • Location: London
Reply with quote
Post Posted: Fri Dec 23, 2016 11:23 pm
The Sega mapper can put its cart RAM in that slot, and you can disable the system RAM, but I don't know if Everdrive supports it. Cartridge RAM is definitely usable in this way.
  View user's profile Send private message Visit poster's website
  • Joined: 01 May 2011
  • Posts: 371
Reply with quote
Post Posted: Fri Dec 23, 2016 11:36 pm
Right, but reading this it seems that if you mapped cartridge RAM to e000-ffff it would conflict with the system RAM which gets mirrored there, thus necessitating disabling the system RAM and requiring 16KB cartridge RAM. If there's a way to disable system RAM mirroring, without disabling system RAM then you could get away with 8KB cartridge RAM.

http://www.smspower.org/Development/RAM

Quote
The Master System's simple memory mapping hardware based on address lines A14 and A15 maps the RAM in the last 16KB of the Z80 CPU memory map from $C000 to $FFFF when A14 and A15 are both 1 Because the RAM is only 8KB is size it appears mirrored in the second half of the 16KB address space.

The mirroring means that any memory writes to the last 16KB of the memory map in the range $C000 and $FFFF are written to RAM. It also means that any memory reads in the same address space read the RAM. This has a convenient side-effect that any writes to the cart mapping registers which are memory mapped between $FFFC to $FFFF and write-only can be read from RAM.

Bit 4 of I/O Port $3E must be 0 for RAM to be enabled. This feature allows the Master System 8KB of RAM to be disabled and RAM from an external device such as a cart to be used in the last 16KB of the memory map.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 11723
  • Location: London
Reply with quote
Post Posted: Sat Dec 24, 2016 7:40 am
Yes, that's right. It depends what the aim is for compatibility - Everdrive, old emulators, new emulators (with custom mapper), donor carts?
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 441
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Sat Dec 24, 2016 11:14 am
There are sources for some MSX games on GitHub:
https://github.com/artrag/Uridium-msx1
https://github.com/theNestruo/msx-wrally
https://github.com/santiontanon/transballmsx
Some of those are actually designed for cartridge, which should make it easier to port to SMS.
  View user's profile Send private message Visit poster's website
  • Joined: 26 Jan 2014
  • Posts: 397
Reply with quote
Post Posted: Tue Jan 03, 2017 3:34 am
I was able to convert 2 homebrew: Bubbo World 2 & Pointless Platform.

Only Pointless Platform should work on real hardware.

  View user's profile Send private message Visit poster's website
  • Joined: 08 Apr 2011
  • Posts: 11
Reply with quote
Post Posted: Tue Jan 03, 2017 3:48 am
WOW! Awesome development! Amazing what one finds on this board. Hopefully more of the games can be converted glitch-free. Can this be applied to MSX2 stuff or no chance? Would like to see the list make note of what works on real hardware or just emu. Again, fantastic!
  View user's profile Send private message
  • Joined: 14 Oct 2008
  • Posts: 220
Reply with quote
Post Posted: Tue Jan 03, 2017 4:06 am
I think MSX2 is a more powerful system.
At the least it has more RAM.

So it probably won't be able to be ported to SMS.
  View user's profile Send private message
  • Joined: 08 Apr 2011
  • Posts: 11
Reply with quote
Post Posted: Tue Jan 03, 2017 4:39 am
KingMike wrote
I think MSX2 is a more powerful system.
At the least it has more RAM.

So it probably won't be able to be ported to SMS.


That's true, I guess I get thrown off by ports of like games being worse on MSX2 than NES.
  View user's profile Send private message
  • Joined: 26 Jan 2014
  • Posts: 397
Reply with quote
Post Posted: Tue Jan 03, 2017 5:34 am
Followed more homebrew converted:

Menace, Neo Pong 512 (no sound), Pointless Shooting, Peek-A-Boo: should work on real hardware.

Cow Abductors, Griel's Quest for the Sangraal Extended Edition, Neo Pong 512 (sound ok), Shoganai: not working on real hardware.
Menace-01.png (2.68 KB)
Menace-01.png
Menace-02.png (2.52 KB)
Menace-02.png
Neo Pong 512-01.png (2.64 KB)
Neo Pong 512-01.png
Neo Pong 512-02.png (1.32 KB)
Neo Pong 512-02.png
Peek-A-Boo-01.png (5.94 KB)
Peek-A-Boo-01.png
Peek-A-Boo-02.png (10.34 KB)
Peek-A-Boo-02.png
Shoganai-01.png (3.21 KB)
Shoganai-01.png
Shoganai-02.png (6.87 KB)
Shoganai-02.png

  View user's profile Send private message Visit poster's website
  • Joined: 01 Aug 2012
  • Posts: 228
  • Location: Porto, Portugal
Reply with quote
Post Posted: Thu Jan 05, 2017 10:54 pm
Last edited by nitrofurano on Thu Jan 05, 2017 11:10 pm; edited 3 times in total
Greg2600 wrote
KingMike wrote
I think MSX2 is a more powerful system.
At the least it has more RAM.

So it probably won't be able to be ported to SMS.


That's true, I guess I get thrown off by ports of like games being worse on MSX2 than NES.


msx2 uses v9938, 2+ and Turbo-R uses v9958 - their specific display modes are a bit different from what is used on msx1, sg1000, master-system, megadrive, etc., since these modes uses no tiles - for “simulating” tiles, most games uses vdp commands http://map.grauw.nl/articles/vdp_tut.php#commands

and most of the games that uses these display modes normally uses 212 lines instead of 192 - it’s clearly noticeable when comparing the msx1 and msx2 versions of King’s Valley 2

and the sprite format is also totally different - https://www.msx.org/wiki/The_OR_Color - msx2 sprites uses this kind of “trick”, while master-system uses as sprites the same patterns as used on tiles, so it seems to be a huge conversion and remake needed there

so, i guess that people that might want to convert msx2 games into master-system might need to dive into a quite deep disassembling... - but we never now, perhaps one day soon we are going to play Undeadline, Xevious Fardraut Saga or Aleste on SMS, in the same way Retroworks converted King’s Valley 1 to ZX-Spectrum...
  View user's profile Send private message Visit poster's website
  • Joined: 01 Aug 2012
  • Posts: 228
  • Location: Porto, Portugal
Reply with quote
Post Posted: Thu Jan 05, 2017 11:03 pm
Quote

Minimum MSX spec seems to have been 16KB RAM, and as far as I can tell that should be enough to run pretty much all MSX1 games. So two options;


the minimum ram size from msx1 spec is 8kb (as from Casio PV-7) - https://www.msx.org/wiki/Casio_PV-7 - so i guess most msx1 games counts with such limitation
  View user's profile Send private message Visit poster's website
  • Joined: 01 May 2011
  • Posts: 371
Reply with quote
Post Posted: Mon Jan 09, 2017 12:21 am
The thing with MSX is that there are some non-standard hardware configurations. That means that lots of software isn't even compatible with all MSX hardware configurations. Some of the more interesting software requires 16kb.

But yes, thanks for pointing out that some hardware was 8kb (that was a mistake that I made when I posted that), unfortunately some of the more interesting software wasn't aware of that (or ignored it), and was programmed for 16kb RAM.
  View user's profile Send private message
  • Joined: 06 Apr 2011
  • Posts: 214
  • Location: Netherlands
Reply with quote
Post Posted: Mon Jan 09, 2017 9:38 am
Anyone tried The Goonies?
  View user's profile Send private message
  • Joined: 26 Jan 2014
  • Posts: 397
Reply with quote
Post Posted: Mon Jan 09, 2017 9:59 am
http://www.smspower.org/forums/16445-MSXToSMSHacks#95489
  View user's profile Send private message Visit poster's website
  • Joined: 06 Apr 2011
  • Posts: 214
  • Location: Netherlands
Reply with quote
Post Posted: Mon Jan 09, 2017 12:25 pm
Revo wrote
http://www.smspower.org/forums/16445-MSXToSMSHacks#95489


Oops, I overlooked *_*
Thanks for pointing out.
It would be very cool to be able to look at the level data using Emulicious. A level editor would be SO cool.
  View user's profile Send private message
  • Joined: 21 Jan 2017
  • Posts: 4
  • Location: Australia
Reply with quote
Running in Kega
Post Posted: Sat Jan 21, 2017 5:47 am
Hello all! First post here.. I will get to the point

I have run most of these msx2sms files in Kega using a euro SMS BIOS and very few work

I picked a random one that did work fine
Konami's Billiards MSX2SMS Hack

I went snooping around with a hex editor and i can't find a header at $1ff0, $3ff0 or $7ff0

How is this working with an invalid checksum?
  View user's profile Send private message
  • Joined: 26 Jan 2014
  • Posts: 397
Reply with quote
Post Posted: Sat Jan 21, 2017 7:37 am
Emulators don't need valid checksum to run games. You should try to use MEKA; Kega is not a very good emulator.
  View user's profile Send private message Visit poster's website
  • Joined: 21 Jan 2017
  • Posts: 4
  • Location: Australia
Reply with quote
Post Posted: Sat Jan 21, 2017 8:07 am
Revo wrote
Emulators don't need valid checksum to run games. You should try to use MEKA; Kega is not a very good emulator.


It was my understanding that using a Euro BIOS nothing will boot without TMR SEGA etc. I've used Kega, hex editor and the sms header reader from this site to make SG/MK III roms play on my pal sms2on a real cartridgre and so far using the BIOS with Kega has behaved the same as real hardware. Eg. Turn bios off and Jap rom will play, turn it on and it will not play. Im guessing the emulator is fixing the header itself when not using a bios
  View user's profile Send private message
  • Joined: 26 Jan 2014
  • Posts: 397
Reply with quote
Post Posted: Sat Jan 21, 2017 8:53 am
Oh I see, then if you want an emulator who behave 99% like the real hardware you should use Emulicious.
  View user's profile Send private message Visit poster's website
  • Joined: 01 Aug 2012
  • Posts: 228
  • Location: Porto, Portugal
Reply with quote
Post Posted: Sat Jan 21, 2017 11:28 pm
Revo wrote
Emulators don't need valid checksum to run games. You should try to use MEKA; Kega is not a very good emulator.


it’s from the bios part, not emulator specifically - SG1000-Mark3 doesn’t check the checksum because it has no bios (it’s indeed a kind of Master System without bios) - so i guess that, from most emulators, we are able to choose which machine or bios we want to use

anyway, @haroldoop developed a tool in pascal that “fixes” the checksum (it might corrupt the latest 16 bytes of the rom file, but i didn’t figure out any weird result from that), so (in theory at least, i never tested it on real hardware) you can burn roms of SG1000 games with these results, socket into Master System cartridges, and a Master System with bios will not display whatever error message, or run Alex Kidd (or other game on the bios) instead, and immediately run the supposed game just like whatever SG1000
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 1768
Reply with quote
Post Posted: Sun Jan 22, 2017 5:50 pm
nitrofurano wrote
@haroldoop developed a tool in pascal that “fixes” the checksum (it might corrupt the latest 16 bytes of the rom file, but i didn’t figure out any weird result from that)


well, you should first see what's in there. there might be some code (or data) you need to place somewhere else, or you might experience graphic corruption or -worse- the game could stop working unexpectedly.
  View user's profile Send private message Visit poster's website
  • Joined: 01 Aug 2012
  • Posts: 228
  • Location: Porto, Portugal
Reply with quote
Post Posted: Sun Jan 22, 2017 9:25 pm
sverx wrote
nitrofurano wrote
@haroldoop developed a tool in pascal that “fixes” the checksum (it might corrupt the latest 16 bytes of the rom file, but i didn’t figure out any weird result from that)


well, you should first see what's in there. there might be some code (or data) you need to place somewhere else, or you might experience graphic corruption or -worse- the game could stop working unexpectedly.


exactly - and rle-compressed stuff is mostly my main concern...
  View user's profile Send private message Visit poster's website
  • Joined: 26 Jan 2014
  • Posts: 397
Reply with quote
Post Posted: Sat Apr 08, 2017 4:29 pm
I tried to convert 2017 entry of http://www.msxdev.org/

Slime Center is working fine on MEKA. Also including a version who may work on real hardware with bugs on writings and no checksum.

Tales of Popolon is probably working on real hardware, but the game crash after title screen.

  View user's profile Send private message Visit poster's website
  • Joined: 28 Jan 2017
  • Posts: 134
  • Location: Málaga, Spain
Reply with quote
Post Posted: Sat Apr 08, 2017 5:41 pm
Tales of popolon? Have to play it!
Seriously, how good was the msx. Its the culprit i am writing this now. If i would have had a spectrum or amstrad for sure i had left playing many years ago.
  View user's profile Send private message
Reply to topic Goto page Previous  1, 2



Back to the top of this page

Back to SMS Power!