Skip to content
Miguel Colom edited this page Dec 8, 2019 · 5 revisions

Welcome to the boogaboo_disasm_msx wiki!

Interesting files

  • disassembly.asm: main file. It will include the other when assembled.

  • scripts/draw_sprites.py: reads the assembled binary and creates several small images with the (magnified) sprites.

  • scripts/draw_scenario.py: reads the assembled binary and creates the following image of the complete cave:

How to assemble the code?

You can use for example: z80asm disassembly.asm. Then you can verify that the compilation matches exactly the the control sum of the original code. The expected sum with shasum a.bin is 9a63f2a6064a8e28f7251f78c3e91672f5de5253.

Which are relevant references about the MSX-BIOS?

http://map.grauw.nl/resources/msxbios.php

https://www.konamiman.com/msx/msx2th/th-ap.txt

https://www.msx.org/wiki/Data_for_MSX_description_from_Main-ROM_Bios

And what about the VDP and the graphics?

http://map.grauw.nl/articles/vdp_tut.php

http://map.grauw.nl/resources/video/texasinstruments_tms9918.pdf. See sections 2.4.1 and 2.4.2.

https://www.msx.org/wiki/SCREEN

https://www.msx.org/forum/development/msx-development/question-screen-1-2-name-table

http://bifi.msxnet.org/msxnet/tech/tms9918a.txt

Curiosities

The game's code never uses the IX and IY registers of the Z80 CPU. Thus, it seems that the programmer(s) were used to code for the 8080 CPU. These registers are available in the Z80, but not in the 8080. However, they do use the shadow registers, only present in Z80 CPUs.

Bugs

  • The game only works in MSX-1 machine, since it sets the stack pointer to $FFFF (the subslot select register) thus causing trouble in MSX-2 machines. It happens with the instruction ld sp,0ffffh in 0x81B0, 0x81D0, and 0x84AB. To fix it, you can simple change in the assembled code these instructions to ld sp,0ffffh - 100, for example. With this change it should work in MSX-2 machines.

  • Glitch: the game stores the position of the plan in the screen in a single position. Therefore it can be only one plant per screen. While painting the screen, this position is used to put the plant's sprite. However, when Pulga falls into the case, two plants should be visible at the same time. Since it's only one position and one sprite per screen, as soon as the second plant appears, the sprite of the first one simply disappears.

  • The graphics are re-defined characters. When writing the name in the records table, special characters will be printed as game tiles.