Frogger ROM hacking info

Video RAM

Frogger video layout

Here is a position independent assembly function that you can call that will write an NULL terminated string to the write addresses starting at (x,y) tiles from the bottom left corner. (Cartesian co-ordinates). Note this code most likely could be optimised, I think eps that I did my loops poorly. But they do work.. so.

// load B with "column number" (0-28) // LD B, COLUMN (X position)
// load C with "row number" (0-31)    // LD C, ROW    (Y position)
// load DE with address of null       // LC DE, 0xADDR
// terminated frogger character set string
// this WILL invalidate BC, DE, HL, so save before you call

// call the address where this byte code is located
// the code below is POSITION INDEPENDENT so it can be loaded anywhere
// in the code

-----------------------------------------------
XOR A				// AF
EX AF,AF'			// 08
LD HL, $0xAFBF			// 21 BF AF
LD A,B				// 78	
EX AF,AF			// 08	 
LD B,A				// 47
SUB HL, BC			// ED 42
EX AF, AF 			// 08 
LD C $0x20			// 0E 20
INC A				// 3C

LOOP:
  DEC A				// 3D
  JMPR Z DO_WRITE		// 28 04	
  SUB HL, BC			// ED 42
  JMR LOOP			// 18 F9

DO_WRITE:
  LD A, (DE)			// 1A
  CMP A, 00			// FE 00
  JPR Z, DONE			// 28 06
  LD (HL), A			// 77
  INC DE			// 13
  SUB HL, BC			// ED 42
  JMP DO_WRITE			// 18 F5
DONE:
RET				// C9

Here is a CFG of the code above

All the tiles (from value 0x00 (top right) increasing in value to 0x255)

The WATCHDOG

Frogger has a watchdog circuit, to "feed" the watchdog do it does not reset the game you must periodically READ from address 0x8800 for example
LD A ($0x8800)		// 3A 00 88

Sega Frogger Memory Information

Scratchpad RAM
Chip locationTypeBitsAddress Range
192114low 4 bits 0x8000 - 0x83FF
222114high 4 bits0x8000 - 0x83FF
202114low 4 bits0x8400 - 0x87FF
212114high 4 bits0x8400 - 0x87FF

Sprites/Object RAM
Chip locationTypeBitsAddress Range
502114Low 4 bits0xB000 - 0xB0FF
512114High 4 bits0xB000 - 0xB0FF

Tile RAM
Chip locationTypeBitsAddress Range
852114????0xA800 - 0xABFF
862114????0xA800 - 0xABFF