Game and Watch on MSX

By mohai

Paragon (1031)

mohai's picture

31-03-2022, 16:10

Hello,

I have been wondering if an emulator of the well-known Game & Watch hand-helds can be done in a simple MSX.
As MAME recently added emulation for these and other similar consoles, I have been collecting information on the hardware used in the consoles.
The microcontrollers are not a big deal. 4 bits CPUs and low clocking speed but, I found a couple of issues: Technical documents do not cover all the details on every model of controllers and, I think there are some typos on them, so I am not sure if they are 100% feasible or not.
I was not able to find details on the instruction set of some models used in the Game & Watch line too, so I managed to investigate MAME drivers but, I found some divergences. Some instructions seem to behave different, so I am not sure if the official documents are wrong, or MAME drivers are wrong or both ... oO

This is not an easy beginning Eek!

In the other hand, emulating the display can be challenging, as usually there are shapes moving fast in the screen (appearing and disappearing), so I think MSX2 VDP cannot cope with such speed. Maybe a mixture of patterns and sprites can do or Screen 5 with double buffer ...

Login or register to post comments

By ToriHino

Paladin (925)

ToriHino's picture

31-03-2022, 18:58

I don't think the 'fast' moving of the shapes is a problem i.e. there is no movement: all possible graphics are always present on the screen, it's just a matter of highlighting the correct one (something what can easily be done with just setting a color number or changing the palette).

By Sandy Brand

Champion (309)

Sandy Brand's picture

31-03-2022, 19:00

Hmm, this is a very interesting technical challenge.

Depending on the layout of what is shown on the screen, you may be able to pull it off with some palette changes that are localized on screen using screen-splits on Screen 5 (or even Screen 7 if you want to make it really fancy? Smile )

By mohai

Paragon (1031)

mohai's picture

31-03-2022, 19:39

Yes. Palette changes can be a solution.
There are some colors already used for the background, that leaves less than 16 colors for the shapes.
Very clever and tricky techniques should be used then.
Keep in mind that some games can show arround 100 shapes on screen

By Parn

Paladin (854)

Parn's picture

31-03-2022, 20:43

The blitter may be slow, but the original LCD screens are also kinda slow. As long as we don't have tons of shapes blinking at the same time I don't believe this would be an issue.

By gdx

Enlighted (6431)

gdx's picture

01-04-2022, 03:29

ToriHino wrote:

I don't think the 'fast' moving of the shapes is a problem i.e. there is no movement: all possible graphics are always present on the screen, it's just a matter of highlighting the correct one (something what can easily be done with just setting a color number or changing the palette).

Palette changes can be a solution on MSX2 for the bigger things to move.

On MSX1, the use of characters in screen 1 or tiles in screen 2 is possible but the colors will not be at all close to a Game and Watch LCD. A mix with sprites is possible when the characters or color pallette are insufficient.

By hap

Paragon (2043)

hap's picture

02-04-2022, 19:57

There's bugs in every program, so I'm sure there are bugs remaining in MAME's Game & Watch related source files, but nothing bad. Otherwise people would see bugs in the gameplay, but all G&W games are working fine on MAME. You should be able to use the CPU emulation source files as reference and not run into any big issues. The source code license is BSD3, this means you can basically do whatever you want with it as long as you give credit where credit is due (... that would be me ;p). Yes, Sharp's own CPU documentation is missing things here and there.

There is no smooth animation in these, meaning, you can run things at 12.5fps(on Euro MSX2) and it'll still be ok. So, plenty time to do gfx updates.

By mcolom

Champion (320)

mcolom's picture

02-04-2022, 22:04

hap wrote:

as long as you give credit where credit is due (... that would be me ;p)

It's great what you guys did at MAME with these games. We moved to almost no info about those handhelds to having an emulation of their CPUs and eventually of the whole game! If I'm not wrong, some of them were even decapped to directly read the bits in the ROM. Amazing.

I hope someday this one will be emulated, Ninja Shogun by Play&Time, not Nintendo: http://handheldempire.com/game_images/tn_400x300_3145_136631... which is actually quite rare and probably with almost no units available nowadays.

Sorry for the offtopic! :)