← All cores
violentstorm (decoryah)
Cites hardware references or measurements that MAME's driver also gives — 1
Notes where it differs from MAME — 1
- README.md:37 | Sprite effects | the frame bench (`PCB_FX=1` for PCB): Sprite effects = MAME still 86 of 86 corpus frames pixel-identical, and 15 more MAME states (the stage-
Cites MAME source — 91
- ViolentStorm.sv:5 The machine (rtl/) descends from the Metamorphic Force and Monster Maulers cores for MiSTer, themselves from the Gaiapolis core written for the Analogue Pocket by plasticbugs (https://github.com/plasticbugs/analogue-pocket-gaiapolis): Gaiap
- ViolentStorm.sv:177 keyboard: 1-3 start, 5-7 coin, F2 test (MAME's defaults; the game has three players)
- ViolentStorm.sv:348 Colours (status[35]): 0 Board DAC, the board's video DACs (their curve, and the brightness applied in them: rtl/vs_dac.sv), 1 MAME, the palette's values as they are.
- ViolentStorm.sv:349 Sprite effects (status[36]): 0 PCB, the fades, fireworks and shadow priority as the board shows them (k053247_objlist, k053247_draw), 1 MAME's picture
- rtl/er5911.sv:2 ER5911 serial EEPROM, 128 x 8, as MAME's eeprom_serial_er5911_device models it (eepromser.cpp): a start bit, a 2-bit opcode and a 9-bit address field (only the low 7 bits select a cell) on rising CLK while CS is high; READ shifts data out M
- rtl/er5911.sv:8 the Pocket repository's tools/eeprom_replay.py checks this protocol against MAME's pin traffic.
- rtl/er5911.sv:98 a 1 on DI at a rising clock is the start bit (edges that coincide with CS rising are ignored, as MAME does)
- rtl/k053247_draw.sv:29 MAME's absolute coordinates of the picture's first pixel ...
- rtl/k053247_draw.sv:60 MAME draws it over both.
- rtl/k053247_objlist.sv:36 One exception, as the MAME patch that found this has it: the 0xe140 sprites the game leaves parked over the right half are not drawn while SHAD3's priority is 0x28 (it is during the fireworks, which set table 3 to a bright colour; the board
- rtl/k054321.sv:6 MAME models the gain as 2^((volume - 40) / 10) with 40 as "normal"; vs_core applies it.
- rtl/k054539.sv:3 Modelled on MAME's k054539.cpp.
- rtl/k054539.sv:16 Rendering follows sound_stream_update: per 48 kHz sample, each keyed channel steps its 16.16 position by the 24-bit delta, fetching 8-bit PCM, 16-bit PCM or 4-bit DPCM from the ROM (looping at the end marker if reg 0x201 bit 0 is set, else
- rtl/k054539.sv:25 While 0x22f bit 0 is set (MAME's UPDATE_AT_KEYON, its default) a write to a channel's position registers is held in a latch and only copied into the registers by that channel's key-on.
- rtl/k054539.sv:28 Volumes are Q2.14 tables from tools/gen_k054539_tables.py; the per-channel gain MAME applies at reset for this game (chip 1 channels 4-7 x2.0, the "voice" channels) comes in through GAIN_Q14.
- rtl/k054539.sv:78 UPDATE_AT_KEYON (MAME's default for every game, k054539.cpp): while the chip is enabled (0x22f bit 0) a write to a channel's position registers (0x0c-0x0e of its 0x20 block) is held in a latch and the register keeps its value; the key-on wr
- rtl/k054539.sv:260 Every position step fetches a sample, as MAME does, so a pitch above 1.0 costs one ROM read per step; DPCM depends on that.
- rtl/k054539.sv:309 the Q2.14 fraction bits of the product are dropped, as MAME does
- rtl/k054539.sv:353 16-bit samples are read as two bytes at cur_pos and cur_pos + 1, whatever the alignment (MAME: read_byte(pos) | read_byte(pos + 1) << 8); an odd start address is common in this game's music
- rtl/k054539.sv:430 a 16-bit sample steps two bytes (MAME: pdelta <<= 1)
- rtl/k054539.sv:475 MAME adds the ring position twice: rdelta = (delay + pos) & 0x3fff, then the entry is rbase[(rdelta + pos) & 0x1fff].
- rtl/k054539.sv:483 the ring holds int16; MAME truncates the scaled sample the same way
- rtl/k055550.sv:4 Thirty-two 16-bit registers (readable: MAME's K055550_word_r returns what was written) and a command, a write to the high byte of register 0.
- rtl/k055550.sv:5 MAME performs a command at once, in zero time (konamigx_m.cpp, K055550_word_w); this chip masters the main bus while it works and holds the 68000 (`busy`), so the program sees the result when its next instruction runs, as MAME's does.
- rtl/k055550.sv:10 + (reg10:reg11) * ((reg0 & 0xff) + 1) bytes with the word in reg 13 0x98 copy: (reg10:reg11) / 4 dwords, the dword at (reg2:reg3) + 8 x to (reg7:reg8) + 4 x ("color check" palette, the service menu) 0xa0 collision list: (reg
- rtl/k055550.sv:24 The commands' arithmetic is MAME's, exactly (checked against it: sim/k550_ref.cpp for the homing vector over all 2^32 inputs; the rest by the whole-machine bench).
- rtl/k055550.sv:26 The angle is floor(atan(|dy| / |dx|) * 128 / pi) taken the way MAME's `int angle =
- rtl/k056832_tilemap.sv:7 A pen is the palette entry itself, ((layer colour base | tile colour) * 16) + pixel, with the tile colour taken as `color >> 2 & 0xf` (MAME's viostorm_tile_callback).
- rtl/k056832_tilemap.sv:48 raster line of a picture row minus MAME's absolute y of it (16 - 16)
- rtl/k056832_tilemap.sv:104 viostorm per-layer pixel offsets (mystwarr_v.cpp, VIDEO_START viostorm: set_layer_offs(0, -2+1, 0), (1, 0+1, 0), (2, 2+1, 0), (3, 3+1, 0))
- rtl/k056832_tilemap.sv:109 Y is supported, carried over from the Metamorphic Force renderer, whose game runs with it set (its data are stored "software Y-flipped"); Violent Storm never sets it (regs[0] = 0x0044 in every state dumped): MAME flips every page's tilemap,
- rtl/k056832_tilemap.sv:116 MAME's absolute y of the row being rendered (cliprect.min_y is 15 here)
- rtl/k056832_tilemap.sv:248 whatever dy is: MAME's override for the "software flipped" games) row scroll (mode 2), unflipped: e = (dy + y) & ~7, one entry for eight lines row scroll, Y flipped: e = 248 - 8 * ((y + (dy & 7)) >> 3) with y the absolute row a
- rtl/vs_core.sv:23 MAME's scanline numbers are 66 us apart in this driver (512 x 256 at 59.1856 Hz) and the board's are 64 us: the interrupts and the frame update are placed at the same instants of the frame in real time, relative to the picture's first line
- rtl/vs_core.sv:27 MAME line 248 (+15,312 us) -> 239.25 lines -> raster line 255, pixel IRQ_HPOS
- rtl/vs_core.sv:28 MAME's update, vblank end (240 lines + 900 us = 16,740 us from its frame start; +15,684 us) -> 245.06 lines -> raster line 261
- rtl/vs_core.sv:30 raster line at which the sprite list is taken (MAME's update)
- rtl/vs_core.sv:86 274002: P2 (low byte); the high byte is MAME's P4, which the game never reads
- rtl/vs_core.sv:91 the OSD's Colours: 1 the board's DACs (rtl/vs_dac.sv), 0 MAME's linear palette
- rtl/vs_core.sv:92 the OSD's Sprite effects: 1 PCB (k053247_objlist, k053247_draw), 0 MAME
- rtl/vs_core.sv:157 the instants of the frame, from the raster (see the parameters above for how MAME's lines map to this one)
- rtl/vs_core.sv:167 the vblank's start: MAME's frame number counts here
- rtl/vs_core.sv:278 The sprite table the renderers work from is a copy of the sprite RAM taken at OBJ_BUILD_LINE, as MAME's list is taken at its update: the game writes its table during the visible frame as well, and a renderer reading the live RAM line by lin
- rtl/vs_core.sv:403 the board's video DACs: the curve and the brightness (Colours = Board DAC), or MAME's colour as it is
- rtl/vs_dac.sv:3 The output is not linear in the code (mid tones darker than MAME's palette), and the brightness dims it after the curve.
- rtl/vs_dac.sv:10 With board_dac = 0 (Colours = MAME) the colour passes through unchanged, with the same delay.
- rtl/vs_inputs.sv:4 The game has three players (P1, P2, P3: the cabinet's DIP offers 2 or 3 players, its I/O CHECK screen has three columns, and nothing in the program ever reads the fourth player's byte at 274002), each with a joystick and two buttons, ATTACK
- rtl/vs_inputs.sv:10 A MiSTer controller, the order of the J1 line in ViolentStorm.sv ("Attack,Jump,Start,Coin"): bit 0 right, 1 left, 2 down, 3 up, 4 attack, 5 jump, 6 start, 7 coin A player's byte as the board carries it, active low (MAME's KONAMI16_LSB / MSB
- rtl/vs_main.sv:4 Address decode follows docs/hardware.md section 3 (MAME's viostorm_map in mystwarr.cpp).
- rtl/vs_main.sv:5 The CPU is TG68K.C, paced by a token bucket the way the S.T.U.N. Runner core paces its 68010 -- STEP_COST_BUS/STEP_COST_INT/STEP_GAIN set the step rate; the values are calibrated against MAME's frame timing.
- rtl/vs_main.sv:184 --------------------------------------------------------- decode (MAME's viostorm_map)
- rtl/vs_main.sv:194 24c000-24ffff and 250000-25000f are plain RAM in MAME's map ("K053250 ram / reg"); the game never touches them (tools/lua/ram_use.lua over 3,000 frames including the power-on tests), so they read 0 and ignore writes here
- rtl/vs_main.sv:302 MAME's eeprom_r: a low-byte access reads IN1 (its bits 1:0 the EEPROM's DO and READY), otherwise 0
- rtl/vs_main.sv:373 IRQ6 at the first scanline (MAME line 24), IRQ5 at line 248 if the K053246 enables it: each is asserted and held until the kernel's interrupt-acknowledge cycle (MAME's HOLD_LINE)
- rtl/vs_mixer.sv:32 * bri_post (the OSD's Colours = Board DAC): the board dims in its video DACs (the K054338's brightness output sets the 054573s' current through a 054574), after the mix and the DAC's curve; MAME scales each colour before mixing.
- rtl/vs_mixer.sv:35 With bri_post the colours are mixed unscaled and `bri` says, per pixel, the brightness of the last colour drawn there (a shadow keeps it; the backdrop counts as full, as MAME draws it), for vs_dac to apply.
- rtl/vs_mixer.sv:37 Without it `bri` is still that value, but the colour is MAME's.
- rtl/vs_mixer.sv:63 the last non-zero tile mix code the tilemap fetched (MAME's m_last_alpha_tile_mix_code)
- rtl/vs_sound.sv:199 MAME routes each chip's output 0 to the right speaker and output 1 to the left ("stereo channels are inverted", mystwarr.cpp), which a comparison of this core's audio with MAME's confirms (the pan balance of the two correlates -0.76 without
- rtl/vs_video.sv:5 The game programs the chip once at boot (registers 0/1 = 0x01FF H max, 2/3 = 0x0016, 4/5 = 0x0039, 6 = 0x00, 8/9 = 0x0107 V max, 10 = 0x11, 11 = 0x0E, 12 = 0x75) and furrtek's silicon-derived model of the chip (ref/siliconre/053252_hdl_0532
- rtl/vs_video.sv:17 MAME's raster is not this one: the driver sets 6 MHz / 384 x 264 and then `set_size(512, 256)`, which keeps the 59.1856 Hz refresh but makes a line 66 us and the frame 256 lines.
- rtl/vs_video.sv:19 The scanline interrupts are specified in MAME's lines, so the machine (vs_core) takes them at the same instants of the frame in real time.
- rtl/vs_video.sv:32 (A frame rendered by the machine against MAME's of the same state is the check: sim/tb_mm.cpp with DUMPSTATE, see tools/cmp_state.py.
- README.md:18 The current build, `releases/violentstorm_20261025.rbf` (20,556 ALMs = 49 %, 537 / 553 M10K, 74 / 112 DSPs, +0.28 ns setup on the core clock, +0.24 ns the tight
- README.md:32 | K055550 | every command (memset, copy, collision list, homing vector) against a transcription of MAME's code on random programs: 1,660 commands, 0 differences
- README.md:33 | Sound | the K054539 pair replayed from MAME's register log correlates 0.92-0.98 a second with MAME's own stream (the log's +-1 sample timing is the rest) |
- README.md:34 | Whole machine | from reset (with the power-on check skipped) to the character select: the same picture as MAME's at frames 60 and 300, and at 500 (a few frame
- README.md:69 The two bootlegs in MAME (`viostormubbl`, `viostormabbl`) are not supported.
- README.md:79 | Colours | Board DAC, MAME | Board DAC (the default): the colours as the board's video DACs give them, the game's fades included; MAME: the palette's values as
- README.md:80 | Sprite effects | PCB, MAME | PCB (the default): the fades between scenes, the stage-clear fireworks and the shadows' priority as the board shows them; MAME: M
- README.md:101 (MAME's port list shows three buttons and four players because it comes from Konami's shared input macro.) Earlier builds (`violentstorm_20261012` to `20261014`
- README.md:121 MAME shows the palette's 8-bit values as they are and fades by scaling each colour before mixing.
- README.md:127 **Colours = MAME** passes the mixer's colours through unchanged: MAME's picture, pixel for pixel.
- README.md:130 The table is the 054573 circuit the Gaiapolis core traced from Ace's reproduction board, fitted to BB4's [recording](https://www.youtube.com/watch?v=0hEZvGd4whM
- README.md:134 Five still screens (the intro's car, girl and bike, the title, the player select): MAME's values are 12.9 levels rms (of
- README.md:136 The player select's fade-out, 44 frames, each with the brightness MAME's register gives it: this design 12.7 rms (the still frames: about 10), MAME's colours 24
- README.md:141 Two things the board draws that MAME 0.289 does not.
- README.md:146 MAME skips these sprites, so it shows no fade (full brightness, then a cut to black) and no fireworks.
- README.md:149 **Shadows and characters.** A shadow does not fall on a sprite of its own priority or higher, so a character's floor shadow no longer darkens another character
- README.md:152 **Sprite effects = PCB** (the default) draws both; **MAME** gives MAME 0.289's picture, pixel for pixel.
- README.md:171 Known differences from MAME
- README.md:173 The K055550 takes time here (it holds the 68000 while a command runs, about 2,500 clocks a frame in play); MAME's commands are instant.
- README.md:174 The game reads results only after the command, so the program sees MAME's values.
- README.md:175 The renderer reaches the first 2 MB of the 4 MB tile ROM (16-bit tile codes, as MAME's callback does not extend them); the whole ROM is reachable through the 31
- README.md:177 `m_last_alpha_tile_mix_code` (the category-1 tiles' level) follows the tiles in raster order here, MAME's tilemap decode order there; identical in every corpus
- README.md:179 Sprite effects: by default (PCB) the fades, the fireworks and the shadow priority are drawn as on the board (see Sprite effects); while a fade runs, a character
- README.md:181 Sprite effects = MAME is MAME 0.289's picture.
- README.md:182 Colours: by default (Colours = Board DAC) the output follows the board's video DACs and fades in them; Colours = MAME gives MAME's linear palette and MAME's fad
- README.md:216 MAME (0.289) is run by `tools/mame_run.ps1` with the Lua probes of `tools/lua/`; `tools/make_corpus.ps1` makes a corpus of frozen states, `sim/run_frames.sh` re
- README.md:221 **plasticbugs** -- the Gaiapolis core for the Analogue Pocket, the machine this one is built on (`rtl/`, the SDRAM controller `target/mister/sdram_ctrl.sv` and
- README.md:248 The author of the patched MAME behind the Sprite effects option (its write-up, `violent-storm-fixes.pdf`, passed on by the repository owner): shadow code 3 draw
Says it matches, follows or was checked against MAME — 7
- rtl/k056832_tilemap.sv:18 Semantics follow the Pocket repository's tools/render_model.py, which is pixel-exact against MAME across the frozen-state corpus; see docs/hardware.md section 6.
- README.md:23 Everything in the verification table below was checked in simulation against MAME 0.289 (the benches under `sim/`).
- README.md:26 What is verified (against MAME 0.289, `viostorm`)
- README.md:31 | Video | 86 of 86 frozen-state corpus frames (attract mode, scripted play up to frame 10,000 and the attract mode's demo play of the later stages up to frame 2
- README.md:36 | Colours | `sim/dac/run.sh`: `rtl/vs_dac.sv` against its table, every code at every brightness step and 100,000 random pixels with the mode switching, 120,480
- README.md:37 | Sprite effects | the frame bench (`PCB_FX=1` for PCB): Sprite effects = MAME still 86 of 86 corpus frames pixel-identical, and 15 more MAME states (the stage-
- README.md:141 They were found by a patched MAME someone made for this game and checked here against BB4's PCB recording and MAME logs of the same scenes (`docs/hardware.md`,
Says it was translated, ported or taken from MAME — 1
- README.md:152 One rule is copied from the patched MAME without a known hardware reason: the game keeps two of the fade sprites parked over the right half of the screen throug
Shares text with the MAME driver without saying so — 9
- rtl/k053247_draw.sv:35 k055673 set_config(K055673_LAYOUT_RNG, -62, -23) for viostorm — shares text with konami/mystwarr.cpp:1039
- rtl/k053247_objlist.sv:7 order = pri<<24 | zcode<<16 | offs<<5 | drawmode<<4 | shadow — shares text with konami/konamigx_v.cpp:618
- rtl/k053247_objlist.sv:25 metamrph_sprite_callback: priority_mask = (color & 0xe0) >> 2, and a shadow code of 3 sets — shares text with konami/mystwarr_v.cpp:97
- rtl/k056832_tilemap.sv:13 unless the K055555's V_INMIX_ON claims the layer's codes as internal). This game uses it (its — shares text with konami/mystwarr_v.cpp:61
- rtl/k056832_tilemap.sv:15 the mixer does the rest (konamigx_state::gx_draw_basic_tilemaps). — shares text with konami/konamigx_v.cpp:782
- rtl/k056832_tilemap.sv:105 set_layer_offs(0, -2+1, 0), (1, 0+1, 0), (2, 2+1, 0), (3, 3+1, 0)) — shares text with konami/konamigx_v.cpp:1232
- rtl/vs_core.sv:241 mystwarr_state::screen_update_metamrph: K055555_get_palette_index(4) << 4 — shares text with konami/mystwarr_v.cpp:288
- rtl/vs_main.sv:281 K056832 readback (k056832_device::mw_rom_word_r). The bank is regs[0x1a] | regs[0x1b] << 16 modulo the — shares text with konami/k054156_k054157_k056832.cpp:818
- rtl/vs_mixer.sv:152 drawn without any alpha (gx_draw_basic_extended_tilemaps_1 computes one but k053250_device::draw takes — shares text with konami/konamigx.h:157