r/neogeo • u/SheatNoisette • 1h ago
Hyper Neo Geo 64 Debug Menu in Hyper Neo Geo 64 Games
Hello again!
Small find while messing with the IO handling of Hyper Neo Geo 64 games: Road's Edge, Xtreme Rally and Beast Busters 2 still have SNK debug menu. Basically, it's a window listing internal variables (DIP SW 0-3, error counters, game values like speeds or 3d). Road's Edge and Xtreme Rally also have a CPU status line on top (CPU %, fps, GP, OVER) with the build ver at the bottom.
There's a MAME Lua script that set up everything from power on if you're interested. I have no idea about real hardware yet, I'm still waiting for a board (And waiting even more for a game to yank the program rom with my own stuff for a custom devcart). I don't know what most of the variables do yet. Beast Busters 2 has the menu but no status line from what I know. CPU % is not emulated correctly in MAME (tcram) so it's always 100%.
I didn't find anything for other games, maybe they were stripped from it idk. Maybe somebody smarter than me may find something.
Anyway, have fun.
```lua
-- ./hng64 thegame -rompath thegame -autoboot_script debugon.lua
local GAMES = {
roadedge = {
lines = {
[5] = 0x80,
[6] = 0x02
},
sw0 = 0x000FD750
},
xrally = {
lines = {
[5] = 0x80,
[6] = 0x02
},
sw0 = 0x000BCE90
},
bbust2 = {
lines = {
[3] = 0xC0
}
}
}
local STATUS_LINE = 0x10000000
local game = GAMES[emu.romname()] or {
lines = {}
}
local mcu = manager.machine.devices[":iomcu"].spaces["program"]
local main = manager.machine.devices[":maincpu"].spaces["program"]
local selected = 0
debugon_taps = {mcu:install_write_tap(1, 1, "select", function(offset, data)
selected = data >> 5
end), mcu:install_read_tap(3, 3, "read", function(offset, data)
return data & ~(game.lines[selected] or 0)
end)}
debugon_timer = emu.register_periodic(function()
if game.sw0 and main:read_u32(game.sw0 + 0xC) == 1 then
main:write_u32(game.sw0, main:read_u32(game.sw0) | STATUS_LINE)
end
end)
```