Main > Driving & Racing Cabinets
Adding Race Leader lights - advice needed
buttersoft:
i have both P1 and P2 lights working for Daytona - or the leader light is, anyway. All i did was drop the lua and pat files over the top.
But no other model 2 games seem to work. Well, Sega Rally and STCC don't, anyway.
jorgenjl2:
--- Quote from: buttersoft on April 21, 2023, 07:10:07 am ---i have both P1 and P2 lights working for Daytona - or the leader light is, anyway. All i did was drop the lua and pat files over the top.
But no other model 2 games seem to work. Well, Sega Rally and STCC don't, anyway.
--- End quote ---
Thanks for this. Since yours worked I realized I was missing a dinput8 dll file from the ffb files in my 2 player emu2 folder that I had in my one player version. All works great now! The person who is in first constantly blinks the race leader light on and off but that must be how the race leader light just works on the Daytona arcade. This is pretty cool. Once I get through the remaining games that support this I will throw together a walkthrough.
jorgenjl2:
--- Quote from: Howard_Casto on December 18, 2022, 07:12:51 pm ---Go to my website and follow along with the tutorials.
--- End quote ---
Hey Howard - I am in the process of posting a how to on creating a Race Leader light without any soldering from start to finish (info seems to be scarce and very little on how to make the device itself). I am looking into enabling custom race leader outputs for games that do not support it. I am thinking of starting with Crusn USA and World. I will then move on to Teknoparrot (therefore Output Blaster app) for Mario Kart/Outrun SPDX/Fast and Furious. For Mame, I plan to try to use the Mame cheat menu to try to find the memory address of the current race position (1st, 2nd, 5th place, etc) and then output when in first place for Mame games. My understanding is I need to create a lua script like below (changing memory address once I find the race position memory address) and place that lua in the Mame directory and startup Mame and Crusn with a command to point to the lua file (mame.exe crusnusa -autoboot_script path_to_script/crusnusa_leader.lua). Then in my mamehooker ini directory I change the crusnusa ini file to have a line like below where I pass the same com port (3,1,x in my case to turn on race leader light assuming Arduino is showing as com port 5 below) which works perfectly for all games I have tried that support outputs for my ws2812b led strip. Have you seen anyone do this or have any tips?
—Crusnusa mamehooker ini file add:
race_leader= cmw 5 3., cmw 5 %s%, cmw 5 x
-- crusnusa_leader.lua
local baseAddress = 0x?????? -- Replace with the memory address identified
while true do
local position = memory.readbyte(baseAddress) -- Adjust read method based on data type (byte, word, etc.)
if position == 1 then
outputs.setvalue("race_leader", 1) -- Turn on the leader light
else
outputs.setvalue("race_leader", 0) -- Turn off the leader light
end
emu.frameadvance() -- Continue to the next frame
end
jorgenjl2:
I have found the memory address for CrusnUSA and World and I have my Lua script printing leader on and leader off correctly. I just need to update to send a 0 or 1 to crusnusa.ini mamehooker file and it should work. I will post all of the code and details when I get it finalized. I should be able to get California Speed to work now that I know how to use the Mame debugger. I spent too much time trying to get Cheat Engine to work which was super simple to find the dynamic (changing) address but it never survives Mame.exe restarts and required Mame debug instead. I wish I knew CE would not ultimately work for Mame emulators.
Anyone know how to find the memory address of Fast and furious super cars or Mario Kart or outrun 2 spdx for Teknoparrot? I tried one (FnF) with Cheat Engine real quick but I didn’t see what I was looking for off hand. Anyone know how to find the racer position memory spot?
jorgenjl2:
For California Speed, I have it isolated to address 804B0EEE via the cheatinit steps below. The issue is that when I run "dump memorydumpcali.txt,804B0EEE,100", it is all 0's. Yet if I go to new memory window and select the MIPS R5000 (little) maincpu option, that addres shows the data changing based on the racers position (although the last two digits of the 8 digits are the users position). So for some reason I have a wrong memory space or something but otherwise I can find it every time and also see it in the memory viewer but not the default memory viewer. Hopefully someone who knows mame can speak to this.
--California speed
1) Start the game in debug mode with windowed mode
mame.exe calispeed -debug -window
2) Type "g" into the debug window and hit enter and wait for the game to start after a minute or so
g
3) Start race in 10th place and go for a little bit
4) Scan range
cheatinit ub,0x80000000,0x1000000
5) Get into 9th place and then scan for -1
cheatnext decrease, 1
6) Get into 8th place and the scan for -1
cheatnext decrease, 1
7) Keep repeating changing spots and decrease or increase that spot
8) Send results to screen once lower number
cheatlist
--For example
Address=8031448C Start=0A Current=06
Address=803D8D50 Start=0A Current=06
Address=804B0EEE Start=0A Current=06 --This shows it.
EDIT: For some reason for California speed I had to run "map 804B0EEE" from the mame debug window to see that physical address maps to logical address 04B0EEE and then use dumpd instead of dump with the pci 00.0 memory region. Crusnusa and Crusn world did not need any of this.
dumpd test.txt,04B0EEE:pci:00.0,1
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version