-
-
Notifications
You must be signed in to change notification settings - Fork 58
Argus core vibe coded by Fulvio #1388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
jotego
wants to merge
26
commits into
master
Choose a base branch
from
argus
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 7 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
d4e1b44
Add Argus core checkpoint
Fulviuus 01d5097
Fix Argus title timing and tile decode
Fulviuus 3624415
Document Argus core status
Fulviuus f77082e
Scan full Argus sprite table
Fulviuus 357f25c
Fix Argus object RAM scan latency
Fulviuus 8d8c81b
Improve Argus video input timing
Fulviuus 7ee1c26
Document Argus known issues
Fulviuus 60529f3
Merge branch 'master' into argus
rp-jt 3555f45
Add argus in mame.xml
rp-jt 95af654
minor
rp-jt dd57676
Remove core's gitignore
rp-jt 2efe171
Remove AUTHORS.md and put its content in README.md
rp-jt 43b6818
argus: reorder sdram banks
rp-jt b1bf3aa
argus: restructured main
rp-jt c885518
Remove files
rp-jt d2f6c0a
minor
rp-jt 8a1db0e
Reorder files in toml
rp-jt 1988ff6
Moved memories in argus_game.v to mem.yaml
rp-jt 5f14124
small refactor to bg0
rp-jt 06e6c9e
Divide SDRAM vrom checks into two buses
rp-jt 0b25ef7
Merge branch 'master' into argus
rp-jt 00ff1d7
minor
rp-jt a76f42b
argus wip: palette module redesign
rp-jt 2ea8e7f
Merge branch 'master' into argus
rp-jt 632660a
wip - move memories in palette to SDRAM
rp-jt a3ecd5f
Replaced memories for jtframe_dual_ram modules in palette
rp-jt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| ver/*/core.mod | ||
| ver/*/framerate | ||
| ver/*/frames/ | ||
| ver/*/jt12.raw | ||
| ver/*/*_game_sdram.v | ||
| ver/*/mem_ports.inc | ||
| ver/*/mist_dump.v | ||
| ver/*/obj_dir/ | ||
| ver/*/rom.bin | ||
| ver/*/sdram.old/ | ||
| ver/*/sdram_bank*.bin | ||
| ver/*/sdram_bank*.hex | ||
| ver/*/sim_inputs.hex | ||
| ver/*/shim/ | ||
| ver/*/test.wav | ||
| ver/*/test.cpp | ||
| ver/*/sdram.cpp | ||
| ver/*/sdram.h | ||
| ver/*/wavewritter.cpp | ||
| ver/*/wavewritter.h |
|
rp-jt marked this conversation as resolved.
Outdated
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Authors | ||
|
|
||
| Core implementation: | ||
|
|
||
| - Fulvio Venturelli | ||
|
|
||
| JTFRAME/JTCORES reusable infrastructure: | ||
|
|
||
| - Jose Tejada Gomez and contributors | ||
|
|
||
| Reference emulation: | ||
|
|
||
| - MAME Argus driver by Yochizo | ||
| - FinalBurn Neo Argus driver contributors |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,146 @@ | ||
| # Argus Core | ||
|
|
||
| FPGA implementation of **Argus** (NMK/Jaleco, 1986), targeting the MiSTer | ||
| platform through JTFRAME. Copyright (C) 2026 Fulvio Venturelli, distributed | ||
| under the GNU General Public License version 3 or later (see | ||
| [LICENSE](../../LICENSE)). | ||
|
|
||
| Built on top of Jose Tejada's `jtframe` framework (also GPL-3). This core is | ||
| being brought up from emulator references because no original schematics have | ||
| been found. The implementation is guided by MAME's Jaleco `argus.cpp` / | ||
| `argus_v.cpp` driver, the local MAME-compatible `argus.zip` ROM set, and live | ||
| Verilator comparison against MAME reference frames. See | ||
| [AUTHORS.md](AUTHORS.md) for attribution. | ||
|
|
||
| ## Status | ||
|
|
||
| Supported MAME set for the jtframe config: | ||
|
|
||
| - `argus`: **Argus**. | ||
|
|
||
| Related MAME sets `valtric`, `butasan`, and `butasanj` share parts of the same | ||
| driver, but they are out of scope for this first hardware pass. | ||
|
|
||
| Verilator board simulation currently boots the real `argus` ROM image, transfers | ||
| ROM by frame 12, accepts the repeatable coin/start input script, and reaches the | ||
| title/credit path with recognizable background, logo, text, palette, and sprite | ||
| output. | ||
|
|
||
| Current implemented video work includes: | ||
|
|
||
| - MAME-described BG0 VROM metadata lookup cached with `jtframe_dual_ram` | ||
| - BG0 palette intensity add/subtract path | ||
| - Jaleco blend-device sprite alpha nibble handling | ||
| - Argus packed-MSB 4bpp tile conversion for BG, text, and sprites | ||
| - 256x224 active timing aligned to the MAME visible area, then rotated by | ||
| JTFRAME core-mod for the vertical cabinet view | ||
| - live frame viewer inherited from the Operation Wolf/Rainbow Islands workflow | ||
|
|
||
| Known issues: | ||
|
|
||
| - Ship departing smoke animation is corrupted. | ||
| - Background becomes black after the supernova. | ||
| - Scroll stuttering remains; movement is not yet as smooth as MAME/arcade. | ||
| - Cursor is offset upward on the score name entry screen. | ||
|
|
||
| MAME itself marks the Argus driver as imperfect graphics, so each visual fix | ||
| should be checked against a saved MAME frame rather than assumed correct. | ||
|
|
||
| ## Repo Layout | ||
|
|
||
| | Path | What it is | | ||
| |---|---| | ||
| | `hdl/` | Verilog - Argus-specific CPU, video, palette, sprite, and sound glue | | ||
| | `mist/` | Generated MiSTer SDRAM wrapper and memory port includes | | ||
| | `cfg/` | `files.yaml`, `mem.yaml`, `macros.def`, MRA, DIP, and pause text inputs | | ||
| | `doc/` | Local MAME/FBNeo reference snapshots | | ||
| | `ver/argus/` | Verilator sim wrapper and repeatable input script | | ||
| | `tools/` | `framewatch.py`, the live browser frame viewer | | ||
|
|
||
| ## Reused Blocks | ||
|
|
||
| The Argus-specific RTL is intentionally limited to address decoding, BG0 VROM | ||
| lookup, palette/intensity rules, sprite table scanning, and board glue. Reused | ||
| JTFRAME/JTCORES blocks include: | ||
|
|
||
| - Z80 CPUs: `jtframe_z80_romwait` | ||
| - YM2203: `jt03` | ||
| - video timing: `jtframe_vtimer` | ||
| - tile layers: `jtframe_scroll` | ||
| - sprite drawing: `jtframe_objdraw` | ||
| - local RAMs: `jtframe_dual_ram` and `jtframe_dual_ram16` | ||
|
|
||
| ## Building & Simulating | ||
|
|
||
| Generate the MRA and ROM payloads from a MAME-compatible `argus.zip`: | ||
|
|
||
| ```bash | ||
| cd /path/to/jtcores | ||
| JTROOT=$PWD \ | ||
| JTFRAME=$PWD/modules/jtframe \ | ||
| CORES=$PWD/cores \ | ||
| MODULES=$PWD/modules \ | ||
| JTBIN=$PWD/release \ | ||
| PATH=$PWD/modules/jtframe/bin:$PATH \ | ||
| modules/jtframe/bin/jtframe mra argus --setname argus --path /path/to/roms | ||
| ``` | ||
|
|
||
| Expected local outputs: | ||
|
|
||
| ```text | ||
| release/mra/Argus.mra | ||
| rom/argus.rom | ||
| rom/argus.dip | ||
| rom/argus.mod | ||
| ``` | ||
|
|
||
| The local sim wrapper sets up the JTFRAME environment, refreshes | ||
| `rom/argus.rom`/`rom/argus.mod` when needed, and invokes `jtsim`: | ||
|
|
||
| ```bash | ||
| cd cores/argus/ver/argus | ||
| ARGUS_ROM=/path/to/roms ./sim.sh -frame 300 -fast | ||
| ``` | ||
|
|
||
| For a repeatable credit/start run: | ||
|
|
||
| ```bash | ||
| cd cores/argus/ver/argus | ||
| ARGUS_ROM=/path/to/roms ./sim.sh -frame 300 -fast -inputs start_game.cab | ||
| ``` | ||
|
|
||
| For a visual frame capture run: | ||
|
|
||
| ```bash | ||
| cd cores/argus/ver/argus | ||
| JTFRAME_SIM_VIDEO_EVERY=90 ARGUS_ROM=/path/to/roms ./sim.sh -frame 91 -fast | ||
| ``` | ||
|
|
||
| The live frame viewer can stay open across sim runs: | ||
|
|
||
| ```bash | ||
| python3 cores/argus/tools/framewatch.py --port 8766 | ||
| ``` | ||
|
|
||
| Open `http://127.0.0.1:8766/` and leave it running while the sim writes frames | ||
| under `ver/argus/frames/`. | ||
|
|
||
| ## Reference Sources | ||
|
|
||
| - MAME Jaleco driver: `doc/argus.cpp` | ||
| - MAME Jaleco video driver: `doc/argus_v.cpp` | ||
| - MAME state header: `doc/argus.h` | ||
| - FBNeo reference driver: `doc/fbneo_d_argus.cpp` | ||
|
|
||
| Upstream references: | ||
|
|
||
| - <https://github.com/mamedev/mame/blob/master/src/mame/jaleco/argus.cpp> | ||
| - <https://github.com/mamedev/mame/blob/master/src/mame/jaleco/argus_v.cpp> | ||
| - <https://github.com/finalburnneo/FBNeo/blob/master/src/burn/drv/pre90s/d_argus.cpp> | ||
|
|
||
| ## License | ||
|
|
||
| GPL-3-or-later. Every HDL file carries its own attribution header where | ||
| applicable. The implementation uses JTFRAME/JTCORES reusable modules by Jose | ||
| Tejada and contributors, plus behavioural details derived from MAME and FBNeo | ||
| reference drivers. See [LICENSE](../../LICENSE) and [AUTHORS.md](AUTHORS.md). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| argus: | ||
| - get: | ||
| - jtargus_*.v | ||
| jtframe: | ||
| - get: | ||
| - jtframe_edge.v | ||
| - jtframe_sh.v | ||
| - from: cpu | ||
| get: | ||
| - jtframe_z80.yaml | ||
| - jtframe_z80wait.v | ||
| - from: ram | ||
| get: | ||
| - jtframe_dual_ram.v | ||
| - jtframe_dual_ram16.v | ||
| - jtframe_obj_buffer.v | ||
| - from: video | ||
| get: | ||
| - jtframe_vtimer.v | ||
| - jtframe_scroll.yaml | ||
| - jtframe_draw.v | ||
| - jtframe_objdraw.v | ||
| - jtframe_objdraw_gate.v | ||
| - from: video/layouts | ||
| get: | ||
| - jtframe_8x8x4_packed_msb.v | ||
| jt12: | ||
| - get: | ||
| - jt03.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| [*] | ||
|
rp-jt marked this conversation as resolved.
Outdated
|
||
| CORENAME=JTARGUS | ||
| JTFRAME_BUTTONS=2 | ||
| JTFRAME_CREDITS_PAGES=1 | ||
|
|
||
| JTFRAME_VERTICAL | ||
| JTFRAME_WIDTH=256 | ||
| JTFRAME_HEIGHT=224 | ||
| JTFRAME_PXLCLK=6 | ||
| JTFRAME_ARX=5 | ||
| JTFRAME_ARY=4 | ||
|
|
||
| # ROM layout | ||
| JTFRAME_BA1_START=0x30000 | ||
| JTFRAME_BA2_START=0x40000 | ||
| BG0_START=0x60000 | ||
| JTFRAME_BA3_START=0x80000 | ||
| TXT_START=0x88000 | ||
| VROM1_START=0x90000 | ||
| VROM2_START=0x98000 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| [global] | ||
| overrule=[ {rotate=270} ] | ||
|
|
||
| [parse] | ||
| sourcefile=[ "argus.cpp" ] | ||
| main_setnames=[ "argus" ] | ||
|
rp-jt marked this conversation as resolved.
Outdated
|
||
|
|
||
| [dipsw] | ||
| delete=[ | ||
| { names=["Unused"] }, | ||
| ] | ||
|
|
||
| [buttons] | ||
| names=[ | ||
| { names="Shot 1,Shot 2" } | ||
| ] | ||
|
|
||
| [ROM] | ||
| regions = [ | ||
| { name="maincpu" }, | ||
| { name="audiocpu", start="JTFRAME_BA1_START" }, | ||
| { name="gfx1", start="JTFRAME_BA2_START" }, | ||
| { name="gfx2", start="BG0_START" }, | ||
| { name="gfx3", start="JTFRAME_BA3_START" }, | ||
| { name="gfx4", start="TXT_START" }, | ||
| { name="vrom1", start="VROM1_START" }, | ||
| { name="vrom2", start="VROM2_START" }, | ||
| ] | ||
|
|
||
| order = [ | ||
| "maincpu", "audiocpu", "gfx1", "gfx2", "gfx3", "gfx4", "vrom1", "vrom2" | ||
| ] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| params: | ||
| - { name: BG0_OFFSET, value: "(`BG0_START-`JTFRAME_BA2_START)>>1" } | ||
| - { name: TXT_OFFSET, value: "(`TXT_START-`JTFRAME_BA3_START)>>1" } | ||
| - { name: VROM1_OFFSET, value: "(`VROM1_START-`JTFRAME_BA3_START)>>1" } | ||
| - { name: VROM2_OFFSET, value: "`VROM2_START-`VROM1_START" } | ||
|
|
||
| clocks: | ||
| clk48: | ||
| - freq: 5M | ||
| gate: [ "main", "snd" ] | ||
| outputs: | ||
| - cen5 | ||
| - cen5b | ||
| - freq: 1500000 | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change to engineering notation |
||
| outputs: | ||
| - cen1p5 | ||
| - cen1p5b | ||
|
|
||
| audio: | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to check with PCB |
||
| rsum: 10k | ||
| gain: 0.7 | ||
| channels: | ||
| - { name: fm, module: jt03_fm, rsum: 20k, rc: [{ r: 1rout, c: 1.2n }] } | ||
| - { name: psg, module: jt03_psg, rsum: 60k } | ||
|
|
||
| sdram: | ||
| banks: | ||
|
rp-jt marked this conversation as resolved.
|
||
| - buses: | ||
| - name: main | ||
| addr_width: 18 | ||
| data_width: 8 | ||
| - buses: | ||
| - name: snd | ||
| addr_width: 16 | ||
| data_width: 8 | ||
| - buses: | ||
| - name: obj | ||
| addr_width: 17 | ||
| data_width: 32 | ||
| - name: bg0 | ||
| addr_width: 17 | ||
| data_width: 32 | ||
| offset: BG0_OFFSET | ||
| - buses: | ||
| - name: bg1 | ||
| addr_width: 15 | ||
| data_width: 32 | ||
| - name: txt | ||
| addr_width: 15 | ||
| data_width: 32 | ||
| offset: TXT_OFFSET | ||
| - name: vrom | ||
| addr_width: 16 | ||
| data_width: 8 | ||
| offset: VROM1_OFFSET | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| \BJTARGUS\W | ||
| FPGA core by Fulvio | ||
|
|
||
| Version \C - \D | ||
|
|
||
| Based on MAME | ||
| and FBNeo | ||
|
|
||
| Work in progress |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| argus: |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.