Cite as
antxiko/KonamisBaseball-disassembly
Original
https://github.com/antxiko/KonamisBaseball-disassembly
Pinned
antxiko/KonamisBaseball-disassembly @ d687f54acf63fbb3d21c714cfbde24dcd73ef370
Accessed
2026-10-22
Licence
MIT ("Licencia MIT", in Spanish), covering only the repository's tools, comments, analysis, and documentation; LICENSE says it does not cover the game's code, graphics, or sounds, which stay with their rights holders (GitHub reads the license as NOASSERTION)
Credit
Labelled and commented Z80 disassembly by antxiko; labels and comments, in Spanish, are theirs, and the atlas's quotes keep them in the original.
Notes
Disassembles the 16 KB RC-724 cartridge for the MSX1. No ROM image is in the repository. The README says the listing reassembles to the ROM byte for byte, and the Makefile checks a supplied baseball.rom against SHA-256 06504efb72d1cd3351dae8eb1f7b073f69d599fa7018663937f85535658ad3e7; the atlas has no MSX ROM and hasn't built it. The README reports 629 named routines and 44.5% of the listing commented. The atlas quotes src/baseball.asm's mnemonics and comments, never its address column or data bytes. The repository's own write-up (docs/THE-GAME.md) reads some routines differently from the atlas; see the konamis-baseball claims.

Cited on

Claims (4)

In Konami's Baseball a meter runs on every frame of a match until the pitch starts: a three-digit decimal count that starts at 70, rises by one per frame to 160, then falls by one per frame, and is reset to 70 and rising when it falls back to 70. A speed index starts at 0, rises by one each time the count passes a ten on the way up, and falls by one each time the count's units digit wraps from 0 to 9 on the way down (80 to 79), so it is the count's tens less 7: 0 at 70 to 79, 8 at 150 to 159, and 9 only at the peak of 160 (computed). Pressing a button with no direction, or with down (bit 1, which the disassembly's comment on the arrow-key table names as down), starts the wind-up, which stops the meter. The speed index then picks the ball's step from a 12-entry table, 358 to 910 in 1/256 pixel (about 1.40 to 3.55 pixels), added toward the plate each time the pitch routine runs, which is on even frames only; the meter alone gives indexes 0 to 9. In flight a first counter (0xE127) is lowered by the pixels moved each run and reloaded with 3 more when it wraps; only on runs where it has just wrapped, a second counter (0xE128, starting at 10) is lowered too, and when that one wraps it is reset to 10 and the index falls by one, not below 0, and the step is re-read, so the pitch slows on its way (the atlas's reading).src/baseball.asm L601–607src/baseball.asm L32–68src/baseball.asm L2125–2168src/baseball.asm L2176–2223src/baseball.asm L2551–2562src/baseball.asm L1621–1641src/baseball.asm L1655–1692src/baseball.asm L2088–2093src/baseball.asm L1773–1812src/baseball.asm L1876–1908src/baseball.asm L6447–6452Code
In Konami's Baseball, once the pitch is in the air the routine that moves the ball also reads a controller and moves the ball's row, across its path to the plate. The disassembly's labels and comments call this part the bat; the atlas reads it as the pitcher's, because it calls the same controller routine (el_mando_del_que_ataca) as the code that starts the pitch, while the batter's routine calls the other one (el_mando_del_que_defiende). The first press of bit 1, 2, or 3 of the controller byte fixes the direction: bit 3 moves the row by +1, bit 1 or 2 alone by -1. The disassembly's comment on the arrow-key table names those bits down (1), left (2), and right (3), which makes it right for +1 and down or left for -1. The row then moves one pixel every n runs of the routine, which runs on even frames. For speed indexes 0 to 7, n starts at 8 and, while one of those directions stays held, becomes 4 after 8 runs, 3 after 4 more, and 2 after 3 more, where it stays; letting go keeps the current n (computed). The values come from four identical table rows of 8, 4, 3, 2, 1 (the 1 is never reached), the row picked by the pitch's speed index halved and capped at 4. At speed index 8 or 9 that is a fifth row, past the table's end, so n is read from the first bytes of the next routine: 33 runs per pixel at first, then a 0, which the countdown treats as 256, so the fastest pitches barely move across (the atlas's reading, computed).src/baseball.asm L601–607src/baseball.asm L1621–1632src/baseball.asm L4653–4665src/baseball.asm L1909–1937src/baseball.asm L1938–1968src/baseball.asm L1969–2003src/baseball.asm L2108–2119src/baseball.asm L1687–1699src/baseball.asm L2125–2126src/baseball.asm L5104–5116src/baseball.asm L663–677Code
In Konami's Baseball a swing starts on a button press and, while a button is held, steps to the next bat pose every 3 runs of the batter routine, which runs on odd frames. A hit needs the bat in pose 2, 3, or 4 and the ball inside a contact box around the bat's position, one box per batting side, so a held swing can hit for 9 runs (computed). Letting go leaves the bat in its pose, and unless that is the fifth the contact test goes on (the routine's comment says letting go ends the swing). The angle the ball flies off at comes from a table by pose and by the pose's step counter, 3, 2, or 1 while the button is held, plus 0 to 3 from the Z80's R register. On one batting side, pose 2 gives 48 to 56, pose 3 28 to 36, and pose 4 8 to 16 (before the random part); the other side's table is the mirror image, so early and late contact send the ball toward opposite ends of the range. A second value is the ball's row plus 3 less the bat's point at 0xE144 plus an offset (16 on one side, 2 on the other), negated on the second side: 0 to 9 hits, and anything else misses. It picks the value the comment calls the ball's starting height, highest at 4. When the computer bats, a value of 0 or of 8 and over, including one that would miss, becomes 6.src/baseball.asm L4653–4670src/baseball.asm L4726–4757src/baseball.asm L4757–4800src/baseball.asm L4801–4818src/baseball.asm L4985–5007src/baseball.asm L4824–4831src/baseball.asm L5142–5162src/baseball.asm L5036–5037src/baseball.asm L6447–6456Code
Konami's Baseball ends a match when the inning counter at 0xE40B reaches 9. The counter rises by one each time the second team's half ends, and no branch lets a tie go on, so a level score after nine innings ends the match (the atlas's reading). When the counter reads 8, the index of the ninth cell in each team's scoreboard row, two checks end the match early. At the end of the first team's half, if the second team's total is higher, the game writes tile 0xE7 into the second team's ninth cell and ends the match without the bottom half. While the second team bats in that inning, the match ends as soon as a run puts it ahead. Both checks compare the totals' tens and then their units. The disassembly's comment on the first check reads it as extra innings on a tie; the code continues on a tie and ends the match when the second team leads.src/baseball.asm L6379–6427src/baseball.asm L6106–6163src/baseball.asm L6640–6658Code