Skip to content

sharrier added branch - #1564

Open
niknakniknak wants to merge 6 commits into
masterfrom
sharrier
Open

sharrier added branch#1564
niknakniknak wants to merge 6 commits into
masterfrom
sharrier

Conversation

@niknakniknak

Copy link
Copy Markdown
Collaborator

Moved local as Required.

@jotego

jotego commented Aug 31, 2026

Copy link
Copy Markdown
Owner
  • Eliminate the duplicate object pipeline. jtsharrier_obj_draw.v should not exist. Refactor/reuse jtoutrun_obj_draw as a parameterized shared renderer; do the same assessment for jtsharrier_obj_scan.v. Keep only Space-Harrier-specific table decoding outside the common engine.

  • Eliminate the private road renderer. jtsharrier_road.v duplicates the existing road-device area. Space Harrier’s road format is not necessarily a drop-in jtoutrun_road instantiation, but that is a reason to parameterize/extract jtoutrun_road, not add another core-private renderer. The common fetch/scanline/mixing mechanics belong in shared code.

  • jtsharrier_game.v is not a clean game top. It embeds:

    • a stateful main/sub road-RAM arbiter at lines 95–134;
    • complete flight-stick/D-pad shaping and per-frame state at lines 219–293.

    Extract these into dedicated modules (for example, cabinet/ADC conditioning and road-RAM arbitration). game.v should be declarative wiring plus module instantiation, configuration, and simple generated-memory connections.

  • The layer mixer is in the wrong place. jtsharrier_video.v decides road/tile/object priority and palette address, while jtsharrier_colmix.v only converts palette RGB. Move priority/mixing, gfx_en, blanking, and final colour selection into colmix.

  • gfx_en only reaches the tilemap; it cannot isolate the road path or colour output. This defeats the normal graphics-debug contract. Wire every layer through the mixer.

  • Fix the duplicate .scr2_data connection in jtsharrier_game.v:190. It is harmless only because both connect the same signal, but it is evidence the top-level was not reviewed carefully.

  • Add reset to colmix. kill_l and lvbl_l in jtsharrier_colmix.v:58 have no reset path, so output state depends on reaching the first vertical event.

  • Make the NOMAIN/NOSOUND build lint-clean. jtsharrier_main.v:574 leaves video_en, colscr_en, and rowscr_en undriven.

  • Follow core conventions:

    • rename jtsharrier_snd to jtsharrier_sound;
    • put the sound CPU instance last;
    • remove direct JTFRAME_MCLK use from main and sub;
    • use size for BRAM declarations where applicable rather than only addr_width;
    • replace the new legacy headers with the project SPDX/Author/date convention;
    • avoid compound expressions directly in instance ports, e.g. sound reset at game.v:365.
  • Remove the duplicated MAME source code files in the doc folder already present in other cores doc folders.

  • Align the user-facing support claim. The README says Hang-On and Enduro Racer are compatible, while mame2mra.toml explicitly skips both. Either implement them or state Space Harrier-only support.

Replace the new legacy headers with the project SPDX/Author/date convention. Done.
Rename jtsharrier_snd to jtsharrier_sound. Done.
Put the sound CPU instance last. Done.
Avoid compound expressions directly in instance ports, e.g. sound reset at game.v:365. Done.
Add reset to colmix. kill_l and lvbl_l in jtsharrier_colmix.v:58 have no reset path. Done.
Make the NOMAIN/NOSOUND build lint-clean. jtsharrier_main.v:574 leaves video_en, colscr_en and rowscr_en undriven. Done.
Remove direct JTFRAME_MCLK use from main and sub. Done.
Use size for BRAM declarations where applicable rather than only addr_width. Done.
Align the user-facing support claim. The README says Hang-On and Enduro Racer are compatible, while mame2mra.toml explicitly skips both. Done.
@niknakniknak

Copy link
Copy Markdown
Collaborator Author

Replace the new legacy headers with the project SPDX/Author/date convention. Done.
Rename jtsharrier_snd to jtsharrier_sound. Done.
Put the sound CPU instance last. Done.
Avoid compound expressions directly in instance ports, e.g. sound reset at game.v:365. Done.
Add reset to colmix. kill_l and lvbl_l in jtsharrier_colmix.v:58 have no reset path. Done.
Make the NOMAIN/NOSOUND build lint-clean. jtsharrier_main.v:574 leaves video_en, colscr_en and rowscr_en undriven. Done.
Remove direct JTFRAME_MCLK use from main and sub. Done.
Use size for BRAM declarations where applicable rather than only addr_width. Done.
Remove the duplicated MAME source code files in the doc folder already present in other cores doc folders. Done.
The README says Hang-On and Enduro Racer are compatible, while mame2mra.toml explicitly skips both. Done.
Fix the duplicate .scr2_data connection in jtsharrier_game.v:190. Can't find this? the port appears once in _game only at 190
more to come.

jtsharrier_game.v is not a clean game top. It embeds a stateful main/sub road-RAM arbiter at lines 95-134. Done, jtsharrier_roadarb.v.
And complete flight-stick/D-pad shaping and per-frame state at lines 219-293. Done, jtsharrier_cab.v.
game.v should be declarative wiring plus module instantiation, configuration, and simple generated-memory connections. Done, one always block left, the debug status mux, which jtoutrun_game.v:101-113 also keeps.
The layer mixer is in the wrong place. Move priority/mixing, gfx_en, blanking and final colour selection into colmix. Done.
gfx_en only reaches the tilemap; it cannot isolate the road path or colour output. Wire every layer through the mixer. Done.
@niknakniknak

Copy link
Copy Markdown
Collaborator Author

jtsharrier_game.v is not a clean game top. It embeds a stateful main/sub road-RAM arbiter at lines 95-134. Done, jtsharrier_roadarb.v.
And complete flight-stick/D-pad shaping and per-frame state at lines 219-293. Done, jtsharrier_cab.v.
game.v should be declarative wiring plus module instantiation, configuration, and simple generated-memory connections. Done, one always block left, the debug status mux, which jtoutrun_game.v:101-113 also keeps.
The layer mixer is in the wrong place. Move priority/mixing, gfx_en, blanking and final colour selection into colmix. Done.
gfx_en only reaches the tilemap; it cannot isolate the road path or colour output. Wire every layer through the mixer. Done, the road is now on gfx_en[1] with scr1. Which bit would be better?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants