Gamoover

[move]Le staff Gamoover vous souhaite la bienvenue ;)

M2Pac : Comment convertir un Daytona USA "correctement"

Démarré par BigPanik, Samedi 05 Septembre 2015, 00:51:20 AM

BigPanik

#256
Here a wiring diagram of the M2pac



You need 100V and 19V AC. Best way is to buy a SEGA electric transformer.

gareth_iowc


BigPanik


gareth_iowc



So I'm still making progress. Box is all built and connectors are wired.

But still doesn't work haha

On cn1 should I be getting voltage on pins 1 - 8?

Measuring between each pin and 0 volts I get 3.34v. The voltage is coming from the drive board it's self and dimly lights the arduino led.

I've managed to find another drive board Incase this one is bad just waiting for it to come from the USA.


BigPanik

Nice job!
Arduino outputs TTL level is close to 5V. The arduino is powered by the USB connector and the PC.

I see something wrong on the photo: dip switch #4 is ON. Normal position is all switches OFF.

gareth_iowc

Thanks yeah box is coming along and helps keep it tidy.

I have dip 4 switched to on so the drive board skips the self test. i'm usually working on this when my daughter is in bed.

here is a little video of what's going on -





i revisiting the script problem i had before not being and to get the FFB values and lamp values at the same time.

When using the script you provided both the FFB and lamp out put works -

require("model2"); -- Import model2 machine globals

function Init()
Patch_SpecialInputs();
Patch_LampOutputs();
end

function Patch_SpecialInputs()
-- first, disable old read
Romset_PatchDWord(0, 0x1E504, 0x5CA01E00); -- MOV g4,0x00 (NOOP?)

-- now jump to our patched read
Romset_PatchDWord(0, 0x1E508, 0x090219F8); -- CALL 0x0003FF00

-- read io port
Romset_PatchDWord(0, 0x3FF00, 0x80A03000);
Romset_PatchDWord(0, 0x3FF04, 0x01C00012); -- LDOB g4,0x01C00012

-- read patched mask
Romset_PatchDWord(0, 0x3FF08, 0x80B83000);
Romset_PatchDWord(0, 0x3FF0C, 0x00500820); -- LDOB g7,0x00500820

-- and em
Romset_PatchDWord(0, 0x3FF10, 0x58A50097); -- AND g4,g4,g7

-- restore old mask
Romset_PatchDWord(0, 0x3FF14, 0x8CB800FF); -- LDA g7,0xff

-- return
Romset_PatchDWord(0, 0x3FF18, 0x0A000000);  -- RET
end

function Patch_LampOutputs()
-- reroute 0x01C0001E to 0x00500824
for offset = 0x00000000, 0x0003FFFF, 4 do
if Romset_ReadDWord(0, offset) == 0x01C0001E then
Romset_PatchDWord(0, offset, 0x00500824);
local opcode = offset - 1;
if Romset_ReadByte(0, opcode) == 0x80 then
Romset_PatchByte(0, opcode, 0x90) -- replace LDOB with LD
end
if Romset_ReadByte(0, opcode) == 0x82 then
Romset_PatchByte(0, opcode, 0x92) -- replace STOB with ST
end
end
end
end

function PostDraw()
if I960_ReadByte(RAMBASE + 0x00000820) == 0x00 then
I960_WriteByte(RAMBASE + 0x00000820, 0xFF);
end

-- 0xFF = normal
-- 0xFD = force beginner
-- 0xFB = force advanced
-- 0xF9 = force expert

-- 0xF7 = emergency/remote start

-- 0x7F = ex.start; found in shematics but don't yet know what it does

-- 0x3E = DIK_F4
-- 0x3E = DIK_F5
local data = 0xFF;
data = XOR(SHL(Input_IsKeyPressed(0x3E), 0x07), data); -- F4 for ex.start
data = XOR(SHL(Input_IsKeyPressed(0x3F), 0x03), data);  -- F5 for emergency/remote start
I960_WriteByte(RAMBASE + 0x00000820, data);

Video_DrawText(0,0,HEX8(I960_ReadByte(0x00500824)),0xFFFFFF);
end



With the one available on the SailorSat github it doesn't work -

require("model2"); -- Import model2 machine globals

function Init()
-- enable special inputs (only usefull if special type cabinet selected)
Patch_SpecialInputs();

-- reroute lamp data
Patch_LampOutputs();

-- reroute drive data
Patch_DriveOutputs();
end

function Patch_SpecialInputs()
-- A1 - first, disable old read
Romset_PatchDWord(0, 0x1E504, 0x5CA01E00); -- MOV g4,0x00 (NOOP?)

-- A2 - now jump to our patched read
Romset_PatchDWord(0, 0x1E508, 0x090219F8); -- CALL 0x0003FF00

-- A3 - read io port
Romset_PatchDWord(0, 0x3FF00, 0x80A03000);
Romset_PatchDWord(0, 0x3FF04, 0x01C00012); -- LDOB g4,0x01C00012

-- A4 - read patched mask
Romset_PatchDWord(0, 0x3FF08, 0x80B83000);
Romset_PatchDWord(0, 0x3FF0C, 0x00500820); -- LDOB g7,0x00500820

-- A5 - and em
Romset_PatchDWord(0, 0x3FF10, 0x58A50097); -- AND g4,g4,g7

-- A6 - restore old mask
Romset_PatchDWord(0, 0x3FF14, 0x8CB800FF); -- LDA g7,0xff

-- A7 - return
Romset_PatchDWord(0, 0x3FF18, 0x0A000000);  -- RET

-- B1 - jump to out patched init
Romset_PatchDWord(0, 0x017B8, 0x0903E7C8); -- CALL 0x0003FF80

-- B2 - set default mask
Romset_PatchDWord(0, 0x3FF80, 0x8C8000FF); -- LDA g0,0xFF

-- B3 - store default mask
Romset_PatchDWord(0, 0x3FF84, 0x82803000);
Romset_PatchDWord(0, 0x3FF88, 0x00500820); -- STOB g0,0x00500820

-- B4 - restore register
Romset_PatchDWord(0, 0x3FF8C, 0x5C801E00); -- MOV g0,0x00

-- B5 - return
Romset_PatchDWord(0, 0x3FF90, 0x0A000000);  -- RET
end

function Patch_LampOutputs()
-- reroute 0x01C0001E to 0x00500824
for offset = 0x00000000, 0x0003FFFF, 4 do
if Romset_ReadDWord(0, offset) == 0x01C0001E then
Romset_PatchDWord(0, offset, 0x00500824);
local opcode = offset - 1;
if Romset_ReadByte(0, opcode) == 0x80 then
Romset_PatchByte(0, opcode, 0x90) -- replace LDOB with LD
end
if Romset_ReadByte(0, opcode) == 0x82 then
Romset_PatchByte(0, opcode, 0x92) -- replace STOB with ST
end
end
end
end

function Patch_DriveOutputs()
-- reroute 0x01C00022 to 0x00500828
for offset = 0x00000000, 0x0003FFFF, 4 do
if Romset_ReadDWord(0, offset) == 0x01C00022 then
Romset_PatchDWord(0, offset, 0x00500828);
local opcode = offset - 1;
if Romset_ReadByte(0, opcode) == 0x80 then
Romset_PatchByte(0, opcode, 0x90) -- replace LDOB with LD
end
if Romset_ReadByte(0, opcode) == 0x82 then
Romset_PatchByte(0, opcode, 0x92) -- replace STOB with ST
end
end
end
end

BigPanik


Patch script is only used for Lamps. SailorSat patch the FFB to use an Indy500 wheel.

You have a Sega Rally board with eeprom EPR-17891.
With Daytona use a 16488A eeprom.

Or try with Sega Rally...

gareth_iowc

Yayyyyyyyyy it works!!!!!!!

Thanks man!!



As they look like the same board I'd never realized they used a different rom.

Luckily the new drive board that's on the way has a Daytona rom.

Does the touring car have a different rom?


the_vidy

Si je résume bien? pour le moment on peut simuler 3 jeux avec la drive board de sega rally (et en changeant la rom)

Daytona
Sega Rally
Et Virtua Racing deluxe

c'est un peu la dream team  :-)=

Pour les 2 premiers il faut model 2 emulator
mais pour virtua racing? C'est MaMe? Si c'est le cas il faut pas un petit processeur pour le faire tourner j'imagine.

Recherche.... une vitre de jeutel

BigPanik

M2pac fonctionne avec tous les jeux de voiture Model 1 (MAME), model 2 (m2emulator) et model 3 (supermodel3). Il faut juste avoir le hardware d'origine, et la bonne version des softs.

Pour mame et supermodel j'ai fait un autre exe: m13dump.exe


yngbld

Thankyou my friend  i appreciate the reply and your detailed efforts you are a true gentlemen.

Ill be in touch !  ^-


onfre

Very nice work ! And now can you make this please  =:))

Citation de: onfre le Mercredi 19 Septembre 2018, 08:05:40 AM
When everything will work, would you please make a complete list of what is needed to create another machine like yours ? Thank you!

Taz69

Citation de: BigPanik le Mardi 06 Novembre 2018, 17:17:41 PM
M2pac fonctionne avec tous les jeux de voiture Model 1 (MAME), model 2 (m2emulator) et model 3 (supermodel3). Il faut juste avoir le hardware d'origine, et la bonne version des softs.

Pour mame et supermodel j'ai fait un autre exe: m13dump.exe
Deja merci à toi BigPanik...
Ensuite je me demandais si c'était compatible avec une borne Scud Race (donc Model 3 d'origine)?
Il est entièrement fonctionnel, mais bon les gamins d'aujourd'hui ne se contentent plus d'un seul jeu...et je ne suis pas contre un petit Daytona ou Sega Rally...lol

Questions subsidiaires, le link sur un twin est aussi géré? Et du coup il faut 1 seul PC pour le twin ou 1 PC par coté?
SEGA NUC Up 1: Lindbergh avec Virtua Tenis 3 + RPi2NUC (en cours d'installation)
SEGA NUC Up 2: TV Trinitron + supergun + NeoGeo MVS Metal Slug 5
SEGA Scud Race Twin
Generique Multigame 550: WIP sans système, avec ecran mais sans platine...
SEGA Super Hang On: avec un PC et MAME
SEGA Dreamcast (borne de démo)
SONY Playstation 2 (borne de démo)

BigPanik

Emergency call ambulance et dirt devil utilisent les mêmes cartes ffb que Scud race. M2pac te permettra de jouer à ces 3 jeux facilement. Pour les autres jeux model3, c'est plus compliqué, il te faut changer l'eeprom de la carte ffb (pour Daytona 2 par exemple).
Pour Daytona 1 avec du hardware de scud race, oublie pour le moment, il reste un travail de translation logiciel à faire.

Réponse subsidiaire: 1 pc par coté, link possible avec les dernieres versions de supermodel3

Taz69

Citation de: BigPanik le Jeudi 08 Novembre 2018, 11:48:11 AM
Emergency call ambulance et dirt devil utilisent les mêmes cartes ffb que Scud race. M2pac te permettra de jouer à ces 3 jeux facilement.
Merci BigPanik... ^-^
C'est deja plus que bien de pouvoir jouer ces à 3 jeux...

Citation
Pour les autres jeux model3, c'est plus compliqué, il te faut changer l'eeprom de la carte ffb (pour Daytona 2 par exemple).
Ou bien trouver une (ou 2 pour le twin) carte ffb de chaque jeux et la changer à chaque fois...
- Scud Race, Emergency call ambulance et dirt devil avec la même carte FBB
- Quels sont les autres jeux model 3 avec une carte FBB identique?

Citation
Pour Daytona 1 avec du hardware de scud race, oublie pour le moment, il reste un travail de translation logiciel à faire.
Bon en même temps pour les jeux Model 1 et Model 2 je m'y attendais un peu... :D

Citation
Réponse subsidiaire: 1 pc par coté, link possible avec les dernieres versions de supermodel3
Ok cool :-)=


Bon bein encore un ENORME MERCI à toi...
SEGA NUC Up 1: Lindbergh avec Virtua Tenis 3 + RPi2NUC (en cours d'installation)
SEGA NUC Up 2: TV Trinitron + supergun + NeoGeo MVS Metal Slug 5
SEGA Scud Race Twin
Generique Multigame 550: WIP sans système, avec ecran mais sans platine...
SEGA Super Hang On: avec un PC et MAME
SEGA Dreamcast (borne de démo)
SONY Playstation 2 (borne de démo)

BigPanik