On this page
  1. Related
  2. Mechanics
  3. References
  4. Sources

The atlas reads Konami’s Baseball through antxiko’s commented Z80 disassembly of the MSX cartridge. Its labels and comments are in Spanish, and the quotes keep them that way. The atlas has no ROM, so nothing has been built or measured.

Before each pitch a meter runs from 70 to 160 and back, and where it stands when the pitcher throws sets the ball’s speed: one of 12 steps, 1.40 to 3.55 px per run1. Once the ball is in the air, the pitcher can hold a direction to steer it, one pixel at a time, and for all but the fastest pitches faster the longer it’s held2.

A swing hits only in the middle three of its poses. When the ball meets the bat sets the angle it flies off at, and where on the bat it meets sets how high it starts3.

A match lasts nine innings, with no extra innings, and the second team doesn’t bat in the ninth if it is already ahead4.

Mechanics

MechanicKindHow
Pitch controlMeter and steera meter running 70 to 160 sets the speed; a direction held in flight moves the ball sideways faster and faster
Batting timingPose and anglethe bat's pose at contact sets the angle; the ball's row against the bat sets the launch
Every claim about this game, by concept (4)
generalKonami'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.Code
Batting timingIn 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.Code
Pitch controlIn 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).Code
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).Code

References

  1. ^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).Codeantxiko/KonamisBaseball-disassemblyrevised
    How we know
    DATOS tabla_de_flechas: Traduce las cuatro flechas de la fila 8 del teclado … lo que sale lleva bit 0 arriba, bit 1 ; abajo, bit 2 izquierda y bit 3 derecha.
    src/baseball.asm#L601-L607 · upstream ↗
    interrupcion: ; El manejador que INIT engancha en H.KEYI. Todo el juego corre aqui dentro … (0xE003): solo con la partida en marcha corren las tres rutinas de abajo … call lleva_el_medidor
    src/baseball.asm#L32-L68 · upstream ↗
    lleva_el_medidor: ; El medidor que se llena mientras el lanzador prepara. … sube_el_medidor: ; Suma uno en BCD al contador de 0xE361 … inc (hl) … ; (0xE363), un paso mas … cp 060h … ; en 60 se da la vuelta
    src/baseball.asm#L2125-L2168 · upstream ↗
    baja_el_medidor: ; Lo mismo del reves: resta uno en BCD … dec (hl) … ; (0xE363), un paso menos … cp 070h … ; 0x70: se acabo … jp pone_el_medidor_a_cero … ld (hl),001h … ; (0xE360) := 1: de bajada
    src/baseball.asm#L2176-L2223 · upstream ↗
    pone_el_medidor_a_cero: ; Deja el medidor listo: contador en 0x70 … ld (hl),070h … ; (0xE361) := 0x70, el contador … ld (hl),a … ; (0xE363) := 0
    src/baseball.asm#L2551-L2562 · upstream ↗
    and 0f0h … ; los cuatro bits altos: sin nada pulsado no pasa nada … bit 1,b … ; el bit 1, abajo jr nz,arma_el_brazo … and 00dh … ; los bits 0, 2 y 3 jr z,arma_el_brazo
    src/baseball.asm#L1621-L1641 · upstream ↗
    ld a,(0e363h) … ; (0xE363), la velocidad … ld hl,04f97h … ; tabla_4f97, indexada por la velocidad por dos … ld (de),a … ; ...es el paso de la pelota
    src/baseball.asm#L1655-L1692 · upstream ↗
    DATOS pasos_de_la_pelota: Doce parejas de 16 bits: el paso por cuadro de la … ; pelota para cada velocidad de lanzamiento.
    src/baseball.asm#L2088-L2093 · upstream ↗
    lleva_la_pelota_en_el_aire: ; La pelota volando hacia el bateador. … adc hl,de … ; sumados … ld hl,0e130h … ; HL = 0xE130, la columna de la pelota add a,(hl) … ; mas lo andado
    src/baseball.asm#L1773-L1812 · upstream ↗
    ld hl,0e127h … ; HL = 0xE127, el contador de posturas … sub b … ; menos lo andado … ld (hl),00ah … ; diez cuadros para el siguiente … cp 0ffh … ; agotado el efecto, ya no se toca mas … ld hl,04f97h … ; tabla_4f97 otra vez, con la velocidad nueva … ld hl,0e125h … ; y el paso de la pelota se rehace
    src/baseball.asm#L1876-L1908 · upstream ↗
    ld a,(0e000h) … ; el contador de cuadros rrca … ; su bit 0 decide la mitad jr c,la_otra_mitad_del_cuadro … call lleva_el_lanzamiento
    src/baseball.asm#L6447-L6452 · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-22.

    Revised after a check by a second AI model, 2026-10-22.

    In the claim ledger

  2. ^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).Codeantxiko/KonamisBaseball-disassemblyrevised
    How we know
    DATOS tabla_de_flechas: Traduce las cuatro flechas de la fila 8 del teclado … lo que sale lleva bit 0 arriba, bit 1 ; abajo, bit 2 izquierda y bit 3 derecha.
    src/baseball.asm#L601-L607 · upstream ↗
    lleva_el_lanzamiento: ; El cuadro del lanzador. … call el_mando_del_que_ataca … ; lee el mando del jugador que lanza
    src/baseball.asm#L1621-L1632 · upstream ↗
    lleva_al_bateador: ; El cuadro del bateador. … call el_mando_del_que_defiende … ; lee el mando del bateador
    src/baseball.asm#L4653-L4665 · upstream ↗
    mira_el_mando_del_bateador: ; Con 0xE12A a cero todavia no se ha empezado a batear … call el_mando_del_que_ataca … ; lee el mando del bateador … and 00eh … ; los bits 1, 2 y 3 … bit 3,a … ; el bit 3 elige el sentido del bate … inc (hl) … ; la primera postura del bate
    src/baseball.asm#L1909-L1937 · upstream ↗
    ld hl,04faah … ; HL = 0x4faa, la tabla de posturas … djnz salta_una_fila_de_posturas … cp 005h … ; de la quinta en adelante... … ld a,004h … ; ...se queda en la cuarta … ld (hl),b … ; guardado … ld (hl),b … ; y el tercero siempre
    src/baseball.asm#L1938-L1968 · upstream ↗
    1969sigue_el_bate:		; Con el bate ya en marcha: mientras se siga pulsando, cada vuelta del contador cambia de postura
    
    src/baseball.asm lines 1969–2003 at d687f54 · upstream ↗
    DATOS posturas_del_bate: Cuatro filas de cinco tiles … 0x4faf..0x4fc3 (20 bytes)
    src/baseball.asm#L2108-L2119 · upstream ↗
    srl a … ; la velocidad partida por dos... cp 004h … ld a,004h … ; ...y recortada a 4 como mucho … ld (hl),a … ; la potencia, ya recortada … xor a … ; y los tres bytes siguientes de la ficha, a cero
    src/baseball.asm#L1687-L1699 · upstream ↗
    lleva_el_medidor: … ld hl,0e100h … ; HL = 0xE100, la palabra de estado
    src/baseball.asm#L2125-L2126 · upstream ↗
    5108el_mando_del_que_ataca:		; Lo mismo pero para el otro, con el acarreo cambiado
    
    src/baseball.asm lines 5104–5116 at d687f54 · upstream ↗
    calcula_flancos: ; Para cada jugador, deja en el tercer byte de su bloque solo los bits RECIEN pulsados … cp (hl) … ; contra la del fotograma anterior … jr nz,L_43EE … inc hl … ld (hl),a
    src/baseball.asm#L663-L677 · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-22.

    Revised after a check by a second AI model, 2026-10-22.

    In the claim ledger

  3. ^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.Codeantxiko/KonamisBaseball-disassembly
    How we know
    lleva_al_bateador: ; El cuadro del bateador. … rrca … ; el bit 0: ya esta bateando jr c,lleva_el_bateo … and 0f0h … ; los cuatro bits altos: los botones … set 0,(hl) … ; el bit 0: a batear
    src/baseball.asm#L4653-L4670 · upstream ↗
    4726lleva_el_bateo:		; Con el bateo ya en marcha: mientras el mando siga pulsado el bate avanza de postura cada tres cuadros, y en cuanto suelta o llega a la sexta se acaba
    
    src/baseball.asm lines 4726–4757 at d687f54 · upstream ↗
    mira_si_le_da_a_la_pelota: ; Con el bate en la postura 2, 3 o 4 y la pelota dentro de la caja de contacto … call mira_si_esta_en_la_caja … ; la prueba … cp 002h … ; antes de la 2 no hay golpe … cp 005h … ; y de la 5 en adelante, tampoco … ld c,(hl) … ; C = la columna del bate … ld hl,07285h … ; HL = 0x7285, los angulos de un lado … …
    src/baseball.asm#L4757-L4800 · upstream ↗
    cp 008h … ; con la maquina bateando, el golpe se ajusta … ld b,006h … ; B = 6, un golpe del monton … cp 00ah … ; de 10 para arriba no hay golpe ret nc
    src/baseball.asm#L4801-L4818 · upstream ↗
    5001;   segun la fuerza del golpe, de 0x0110 a 0x0200. La ultima se mete dos bytes
    5002;   en la tabla de al lado
    
    src/baseball.asm lines 4985–5007 at d687f54 · upstream ↗
    ld hl,072a8h … ; HL = 0x72a8, las alturas rlca … ; por dos: son palabras
    src/baseball.asm#L4824-L4831 · upstream ↗
    mide_donde_da_en_el_bate: ; La distancia entre la fila de la pelota y el punto del bate … add a,003h … ; tres mas … ld a,(0e144h) … ; (0xE144), el punto del bate … ld d,010h … ; D = 0x10, el desplazamiento de un lado … ld d,002h … ; o 0x02, el del otro … sub c … ; la distancia … …
    src/baseball.asm#L5142-L5162 · upstream ↗
    mira_si_esta_en_la_caja: ; Prueba si el punto (D,E) cae dentro de la caja del punto (B,C).
    src/baseball.asm#L5036-L5037 · upstream ↗
    6454la_otra_mitad_del_cuadro:		; Los cuadros impares
    
    src/baseball.asm lines 6447–6456 at d687f54 · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-22.

    Checked by a second AI model, 2026-10-22.

    In the claim ledger

  4. ^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.Codeantxiko/KonamisBaseball-disassembly
    How we know
    6419mira_si_hay_prorroga:		; En la octava, si el marcador esta empatado, se pinta un 0xE7 en la casilla y el partido sigue
    
    src/baseball.asm lines 6379–6427 at d687f54 · upstream ↗
    escribe_el_marcador: ; Suma B carreras a la casilla de la entrada que toque y al total … ld hl,0e410h … ; HL = 0xE410, la fila de un equipo … ld hl,0e420h … ld a,(0e40bh) … ; (0xE40B), la entrada call suma_a_hl … ld a,(hl) … ; la casilla de esa entrada … ld a,00bh … ; HL += 11: el total …
    src/baseball.asm#L6106-L6163 · upstream ↗
    6640mira_si_hay_empate:		; Compara las dos casillas de total de los dos equipos -0xE41A y 0xE42A, con sus dos cifras- y devuelve el acarreo puesto cuando son iguales
    ⋮
    6654hay_empate:		; Acarreo puesto y el bit 6 de 0xE402
    
    src/baseball.asm lines 6640–6658 at d687f54 · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-22.

    Checked by a second AI model, 2026-10-22.

    In the claim ledger

Sources

Code