← All cores
WorldRally (danisandoval)
Cites hardware references or measurements that MAME's driver also gives — 1
Cites MAME source — 15
- rtl/ds5002fp_glue.sv:6 MAME's wrdallas.bin dump is PLAINTEXT 8051 code (decrypted with Gaelco's help) so no Dallas bus encryption is needed; what remains is a standard 8051 CPU plus the DS5002FP memory partitioning.
- rtl/ds5002fp_glue.sv:8 With the registers the game runs under (MCON=0x88, RPCTL=0x00 -> PA=partition 0x0000, range 0x7FFF, partitioned mode, expanded bus enabled; from MAME ds5002fp.cpp::external_ram_iaddr):
- rtl/ds5002fp_glue.sv:24 Timers/interrupts/serial per standard 8051; the DS5002FP watchdog and RNG are not required by the World Rally program as emulated by MAME (it implements none of them beyond the registers).
- rtl/ds5002fp_glue.sv:51 MAME-style: bit16 = internal SRAM as data
- rtl/gaelco_crypt.sv:7 MAME pairs them by host PC; real hardware cannot see the PC.
- rtl/mcs51_core.sv:35 MOVX bus, 17-bit MAME-style address (bit16 = internal SRAM as data)
- rtl/mcs51_core.sv:111 NVRAM bootstrap defaults (MAME wrally.cpp ROM region):
- rtl/wrally_sprites.sv:5 Modeled on MAME gaelco_wrally_sprites.cpp.
- rtl/wrally_top.sv:147 Pairing rule (MAME gaelcrpt.cpp gaelco_decrypt): a write is the "2nd half" iff it has the same PC and offset == prev_offset+1; AND m_lastpc is reset to 0 after every 2nd half, so writes pair strictly in TWOS — (w0,w1),(w2,w3),...
- rtl/wrally_top.sv:151 For long-aligned move.l / movem.l (always even word offset) that is exactly the (even=1st, odd=2nd) pairing => the !last_waddr[0] path is the MAME-correct one (a "chained" variant that pairs every consecutive word over-chains and is WRONG).
- rtl/wrally_top.sv:305 pot wheel serial ADC (MAME wrally.cpp adc_en/adc_clk)
- rtl/wrally_video.sv:10 Timing model (assumption, see doc/hardware.md): 6 MHz pixel clock, 384x260 total, visible 368x232 at MAME coordinates x 8..375, y 16..247.
- rtl/wrally_video.sv:13 Mixing order, from MAME wrally.cpp screen_update (bottom to top): t1 cat0 (opaque) < t0 cat0 < t1 cat1 < t0 cat1 pens 1-7 < sprites pri0 < t0 cat1 pens 8-15 < sprites pri1 Sprite shadows re-bank the palette of the pixel below (8 banks).
- rtl/wrally_video.sv:85 ------------------------------------------------------ tilemap fetcher scroll: MAME wrally.cpp screen_update (+4 x offset on tilemap 0).
- rtl/wrally_video.sv:112 MAME get_tile_info: TILE_FLIPYX((data2>>6)&3) -> flipX=attr[6], flipY=attr[7] (TILE_FLIPYX is (yx&3): bit0=TILE_FLIPX, bit1=TILE_FLIPY; the wrally.cpp doc comment that says bit6=flipy/bit7=flipx is mislabeled).
Says it matches, follows or was checked against MAME — 4
- rtl/ds5002fp_glue.sv:18 The MCON/RPCTL values are bootstrap defaults held in NVRAM; the game does not change them (assumption - matches MAME behaviour, where they are ROM defaults).
- rtl/mcs51_core.sv:17 MOVX routing implements MAME ds5002fp.cpp external_ram_iaddr(): PES (MCON.2) -> peripherals (unused, reads 0) !PM (MCON.1) && !EXBS (RPCTL.5) && addr >= partition && addr <= range -> internal SRAM as data otherwise
- rtl/wrally_sprites.sv:25 Line buffer pixel format (matches MAME temp bitmap packing):
- rtl/wrally_sprites.sv:200 X in [399,1023] is parked off-screen, so cull it (matches MAME's per-pixel clip) to spend the draw budget only on real sprites.
Says it was translated, ported or taken from MAME — 1
- rtl/gaelco_crypt.sv:1 Gaelco VRAM write encryption (World Rally flavour: param1=0x1F, param2=0x522A) Direct port of MAME src/mame/gaelco/gaelcrpt.cpp (BSD-3-Clause, copyright-holders Manuel Abadia; algorithm courtesy of GAELCO SA).
Keeps a MAME approximation — 1
- rtl/wrally_sprites.sv:21 w0: [7:0] Y (screen y = (240 - Y) & 0xFF), [14] flip X, [15] flip Y w2: [9:0] X (less 0x0F, wraps at 1024), [13:10] color, [14] shadow mode w3: [13:0] code; high priority when code >= 0x3700 (MAME hack)