#Sega Saturn

1 messages · Page 81 of 1

celest lake
untold cloud
#

I still have the ROMs in the old place, I believe it scans that folder anyway.

#

OK, maybe not. lol

#

I had to copy into /media/fat/games/mame, before it would load.

#

And also move the stvbios.zip there.

#

I did think it was weird, 'cos the Arcade folder is usually for "Cores", or MRAs.

#

epr-23603.ic8 (Japan STV BIOS) missing from my stvbios.zip now. sigh

#

I really wish MAME had a naming convention, for the VERSION of the ROM zips.

#

Just went through FIVE different versions of stvbios.zip, until I found the one with 23603 in.

#

Aaaaand... black screen.

#

@warped saddle Was prikura one of the games which doesn't currently boot?

#

I should at least see the STV BIOS screen, right?

#

Interesting side note...

warped saddle
#

I booted fully into the game

untold cloud
#

Since I now have the RBF loaded from a different folder... it hadn't saved the Cartridge: STV option. lol

#

So yeah, had to change that, Save the settings (in the MiSTer other-other menu).

#

Then try the MRA again...

#

Thanks for that. 😉

#

I don't know if there would be a way for main MiSTer to force that Cart option to STV, when loading an MRA. Probably not.

#

Since the main MiSTer process doesn't really "know" anything about most of the menu options. All it does is read the CONF_STR to display the options, then twiddles the bits of the "status" bus.

#

It's down to the core author, to decide what to do with those bits.

#

So basically, you just need to remember to set Cartridge: to STV first, Save the settings, then try loading the MRA (as if it's a "core").

#

Nice. That works very well, so far.

#

And now I see why MRAs are good for the control mapping names, too.

#

Button mappings are messed up.

#

"Up" doesn't seem to work.

#

Actually, more like they are shifted.

#

So "Left" is missing, and Up, Down, Right aren't mapped correctly.

warped saddle
#

delete the button line in the mra and see what happens there

#

I left it in by accident

untold cloud
#

I'm just not used to the isometric view. lol

#

OK.

warped saddle
#

and it won't inherit your mappings from the saturn core since the 'setname' is different

#

so the mra can't force the STV bit, but if you modified the core to have a dedicated ioctl_index for the STV cartridge you could just send it that way

untold cloud
#

Controls still wonky.

#

Up doesn't seem to work.

#

I deleted the whole Buttons line in the MRA, overwrote the old one.

#

Then re-did the button mapping from the menu.

#

Which is now the Saturn style buttons.

#

Isometric view is breaking my brain. lol

#

Confirmed, the button mapping in the core is messed up.

#

Up key doesn't work at all.

#

Then Left, Down, Right get mapped to Up, Down, Right.

#
Weird mapping thing in the top-level Saturn.sv...

joy1 / JOY1 bus...

bit [15]  = Right
bit [14]  = Left
bit [13]  = Down
bit [12]  = Up
bit [11]  = Start
bit [10]  = A
bit [9]  = C
bit [8]  = B

Srg's mapping in the STV IO module...
assign IN[0] = {1'b1,JOY1[15:12],JOY1[9],JOY1[8],JOY1[10]};
ancient surge
#

Make sure srg is aware of these problems so he can fix it.

untold cloud
#

Will do, as soon as I can wrap my brain around it all. lol

#

I can't see any obvious reason atm, oh. Yes I can...

#

Only three bits assigned to the lower bits there.

#

With the upper bit forced to 1 (ie. "no button pressed", because they are Active-LOW).

#

The map I used...

#
// PORTs A, B, E, F. (Player 1, 2, 3, 4)...
// 
// b7 = Left
// b6 = Right
// b5 = Up
// b4 = Down
// b3 = Button 4 (P3/P4 use this for Start)
// b2 = Button 3
// b1 = Button 2
// b0 = Button 1
//
// Button inputs to core are Active-LOW !
// 
wire [7:0] P1_CONT = ~{joy0[1],joy0[0],joy0[3],joy0[2], joy0[7:4]};
warped saddle
#

is the 'please check cartridge for improper installation' a bios version/region mismatch thing?

untold cloud
#

That sounds more like when one or more of the ROMs isn't byteswapped properly, or not loaded into the correct addr offsets.

#

But it could also be due to protection IC stuff (the lack of).

#
joy1 / JOY1 bus...

bit [15]  = Right
bit [14]  = Left
bit [13]  = Down
bit [12]  = Up
bit [11]  = Start
bit [10]  = A
bit [9]   = C  // Note: C and B are swapped in the top-level Saturn.sv.
bit [8]   = B  // Don't ask me why. lol (ElectronAsh).

// Srg's original mapping in the STV IO module...
assign IN[0] = {1'b1,JOY1[15:12],JOY1[9],JOY1[8],JOY1[10]};

// Possible fix...
// IN[7]=Left, IN[6]=Right, IN[5]=Up, IN[4]=Down, IN[3]=B4 (P3/P4 Start?), IN[2]=B3, IN[1]=B2, IN[0]=B1.
assign IN[0] = {JOY1[14], JOY1[15], JOY1[12], JOY1[13], 1'b1, JOY1[9], JOY1[8], JOY1[10]};
warped saddle
#

does the core store the cart data in sdram or ddr3?

#

oh, I see it

untold cloud
#

I think DDR3.

#
    //assign IN[0] = {1'b1,JOY1[15:12],JOY1[9],JOY1[8],JOY1[10]}; // Srg's original mapping.
    //assign IN[1] = {1'b1,JOY2[15:12],JOY2[9],JOY2[8],JOY2[10]};
    assign IN[0] = {JOY1[14], JOY1[15], JOY1[12], JOY1[13], 1'b1, JOY1[9], JOY1[8], JOY1[10]};    // PORT-A (P1). Fix by EA.
    assign IN[1] = {JOY2[14], JOY2[15], JOY2[12], JOY2[13], 1'b1, JOY2[9], JOY2[8], JOY2[10]};    // PORT-B (P2). Fix by EA.
    
    assign IN[2] = {1'b1,1'b1,JOY2[11],JOY1[11],JOY1[7],JOY1[3],1'b1,JOY1[11]};                        // PORT-C (SYSTEM).
    assign IN[3] = 8'h00;                                                                                                // PORT-D (OUTPUT)          JAMMA (56P) + CN25 (JST NH 5P)
    assign IN[4] = 8'hFF;                                                                                                // PORT-E (P3).                           CN32 (JST NH 9P)
    assign IN[5] = {1'b1,JOY2[4],JOY2[5],JOY2[6],1'b1,JOY1[4],JOY1[5],JOY1[6]};                        // PORT-F (P4) / Extra 6B "Kick" layout)  CN21 (JST NH 11P)
    assign IN[6] = 8'hFF;                                                                                                // PORT-G.                                CN20 (JST NH 10P)
    assign IN[7] = 8'hFF;                                                                                                // Unused port ?
#

Adding comments is important.

#

Gonna try that.

#

Takes 36 minutes to compile the Saturn/STV core, on this PC (3700X, 16GB).

warped saddle
#

I added mra loading to his battletoads core last week and I'm getting some 'that ddram controller looks familiar' vibes here

untold cloud
#

I need some kind of DDR arbiter thing, for the DC PVR2 "core" soon.

#

So it will latch the texture reads, and the Tile writebacks.

#

'cos it kind of needs to do both at the same time.

#

And the standard DDR controller only has one "port" / Address input, so yeah.

warped saddle
#

oh I see, he's swapping stv on load. I'm probably getting a bit too far ahead here trying to figure out how to direct to ddr rom loading working before I can even get a second game booting, lol

untold cloud
#

One thing that MiSTer does, just to add to the confusion...

#

If you have the "Width" param on the HPS_IO module set to 16-bit.

#

It will BYTESWAP the data, as it gets loaded. lol

#

I can't stand the whole Little Endian thing.

#

imo, the data should always be loaded in the same order it gets read from the file.

#

I understand some of the reasons why Little Endian exists, but it's super annoying.

naive whale
warped saddle
#

well I tried to make a diehard mra and then was like 'how can I make this faster....'

untold cloud
#
    wire bios_download = ioctl_download & (ioctl_index[5:2] == 4'b0000 && ioctl_index[1:0] != 2'h3);
    wire cart_download = ioctl_download & (ioctl_index[5:2] == 4'b0000 && ioctl_index[1:0] == 2'h3);
    wire save_download = ioctl_download & (ioctl_index[5:2] == 4'b0001);
warped saddle
#

the worse was when I was doing battletoads the memory dumping tool was byteswapping the display and I was briefly (not so briefly...) confused

untold cloud
#

MRA loading is currently quite slow, via hps_io.

#

When I tested it many years ago, the internal bus thing could only manage about 1.6 MBytes/sec.

warped saddle
#

yeah, you can just make it copy it directly to ddr3

untold cloud
#

Loading directly into DDR3 from the ARM Linux side, should be WAYYYYYY faster.

#
    wire [26:1] IO_ADDR = cart_download ? {1'b1,ioctl_addr[25:1]} : {8'b00000000,ioctl_addr[18:1]};
    wire [15:0] IO_DATA = cart_type == 3'h5 ? ioctl_data : {ioctl_data[7:0],ioctl_data[15:8]};
warped saddle
#

but if he's twiddling byte order on load I'll have to do that in the mra

untold cloud
#

Oh

#

OK, so there's the confusing part. ^

#

cart_type==5, means STV.

#

But it does NOT byteswap ioctl_data... because... it already gets byteswapped during loading. lol

#

Yes, it's that confusing.

#

So for loading Saturn carts, it does the Byteswap above, which means it's actually non-byteswapped, vs the Saturn cart file.

#

Again, some comments in the core would help.

warped saddle
#

srg320 is unconcerned with anyone's understanding, lol

untold cloud
#

Seems that way. lol

#

6 minutes into compiling the core atm, with the joypad mapping tweak.

warped saddle
#

I was banging my head against battletoads until I realized inside ddram.sv, it was doing a 32 bit word swap on write

#

but only for the 'load the rom' part

untold cloud
#

I'm fairly sure about the Byteswapping thing above, btw. But don't take it as Gospel.

warped saddle
#

easy to verify since I can just look at the memory directly from main

untold cloud
#

If I'm right, though, it means most STV ROMs probably don't need to by byteswapped before merging.

#

But...

#

For some games, I'm sure some of the ROMs within the Zip don't get swapped, and some do.

#

So any that say (in the MAME code) that they DON'T need to be Byteswapped, probably DO need to be swapped, for loading into the core.

#

Found the thingy which relates the Region string in the ROM loading, to which BIOS it chooses by default...

#
    ROM_REGION32_BE( 0x080000, "bios", 0 ) /* SH2 code */ \
    ROM_SYSTEM_BIOS( 0,  "jp",    "EPR-23603 (Japan 00/10/24)" ) \
    ROM_LOAD16_WORD_SWAP_BIOS( 0,  "epr-23603.ic8",   0x000000, 0x080000,
    ROM_SYSTEM_BIOS( 1,  "jp1",   "EPR-20091 (Japan 97/08/21)" ) \
    ROM_LOAD16_WORD_SWAP_BIOS( 1,  "epr-20091.ic8",   0x000000, 0x080000,
    ROM_SYSTEM_BIOS( 2,  "jp2",   "EPR-19730 (Japan 97/02/17)" ) \
    ROM_LOAD16_WORD_SWAP_BIOS( 2,  "epr-19730.ic8",   0x000000, 0x080000,
    ROM_SYSTEM_BIOS( 3,  "jp3",   "EPR-17951A (Japan 95/04/25)" ) \
    ROM_LOAD16_WORD_SWAP_BIOS( 3,  "epr-17951a.ic8",  0x000000, 0x080000,
    ROM_SYSTEM_BIOS( 4,  "jp4",   "EPR-17740A (Japan 95/02/20)" ) \
    ROM_LOAD16_WORD_SWAP_BIOS( 4,  "epr-17740a.ic8",  0x000000, 0x080000,
    ROM_SYSTEM_BIOS( 5,  "jp5",   "EPR-17740 (Japan 95/01/31)" ) \
hard reef
#

It’s been years since I had an STV board but I do remember some games only booting with a specific region BIOS?

untold cloud
#
    ROM_SYSTEM_BIOS( 6,  "euro",  "EPR-17954A (Europe 95/04/25)" ) \
    ROM_LOAD16_WORD_SWAP_BIOS( 6,  "epr-17954a.ic8",  0x000000, 0x080000,
    ROM_SYSTEM_BIOS( 7,  "us",    "EPR-17952A (USA 95/04/25)" ) \
    ROM_LOAD16_WORD_SWAP_BIOS( 7,  "epr-17952a.ic8",  0x000000, 0x080000,
    ROM_SYSTEM_BIOS( 8,  "us1",   "EPR-17741a (USA 95/02/20)" ) \
#

So basically, 23603 for most Japan games.

#

954a is Euro, which is probably why Die Hard refused to do anything earlier.

#

952a is the one you usually want for USA region games, AFAIK.

ancient surge
#

I think the only non-Japanese release is the Batman game.

untold cloud
#

Die Hard is apparently US, or at least that's what MAME uses.

warped saddle
#

so in mame, all the prikura roms are loaded as 'ROM_LOAD16_WORD_SWAP'

#

and those roms work with just sending them to the core as-is

ancient surge
#

For context, Die Hard Arcade is basically Dynamite Dekka with the Die Hard license.

#

Just so there isn't any confusion.

untold cloud
#

Example, of how I think it might need to work atm...

#
ROM_START( cottonbm )
    STV_BIOS

    ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
    ROM_LOAD16_WORD_SWAP( "mpr21075.7",    0x0200000, 0x0200000,
    ROM_LOAD16_WORD_SWAP( "mpr21070.2",    0x0400000, 0x0400000,
    ROM_LOAD16_WORD_SWAP( "mpr21071.3",    0x0800000, 0x0400000,
    ROM_LOAD16_WORD_SWAP( "mpr21072.4",    0x0c00000, 0x0400000,
    ROM_LOAD16_WORD_SWAP( "mpr21073.5",    0x1000000, 0x0400000,
    ROM_LOAD16_WORD_SWAP( "mpr21074.6",    0x1400000, 0x0400000,
    ROM_LOAD16_WORD_SWAP( "mpr21069.1",    0x1800000, 0x0400000,
ROM_END
warped saddle
#

got die hard going

#

WINNERS

#

green screen

untold cloud
#

That says to Byteswap (fairly sure it's BYTEswap) all roms, which means you DON'T byteswap before merging into a Cart ROM for the core. lol

#

But for games like this...

#
ROM_START( colmns97 )
    STV_BIOS

    ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
    ROM_LOAD16_BYTE( "fpr19553.13",    0x000001, 0x100000,
    ROM_RELOAD_PLAIN ( 0x0200000, 0x0100000 )
    ROM_RELOAD_PLAIN ( 0x0300000, 0x0100000 )
    ROM_LOAD16_WORD_SWAP( "mpr19554.2",     0x400000, 0x400000,
    ROM_LOAD16_WORD_SWAP( "mpr19555.3",     0x800000, 0x400000,
ROM_END
#

It loads the first (fpr = SH2 code) ROM as non-byteswapped, which means you probably DO need to byteswap that, before merging into a Cart ROM.

warped saddle
#
        <setname>saturnstv</setname>
        <rbf>Saturn</rbf>
        <about></about>

        <rom index="2" md5="" zip="stvbios.zip">
                <part crc="d1be2adf" name="epr-17952a.ic8"></part>
        </rom>

        <rom index="3" md5="" zip="diehard.zip">
                <interleave output="16">
                <part crc="de5c4f7c"  name="fpr19119.13" map="12"></part>
                </interleave>
                <interleave output="16">
                <part crc="de5c4f7c"  name="fpr19119.13" map="12"></part>
                </interleave>

                <interleave output="16">
                <part crc="de5c4f7c"  name="fpr19119.13" map="12"></part>
                </interleave>

                <interleave output="16">
                <part crc="de5c4f7c"  name="fpr19119.13" map="12"></part>
                </interleave>

                <part crc="6fe06a30"  name="mpr19115.2"></part>
                <part crc="af9e627b"  name="mpr19116.3"></part>
                <part crc="74520ff1"  name="mpr19117.4"></part>
                <part crc="2c9702f0"  name="mpr19118.5"></part>
        </rom>
</misterromdescription>```
#

that's diehard

untold cloud
#

But I could be wrong. I don't know if the 0x000001 thing changes that.

#

Nice.

#

@warped saddle Try the game's Test menu (Service menu -> Each Game Test).

#

If that shows the font correctly, you probably have most of the ROMs correct.

#

Since it generally uses the fonts (and SH2 code?) for that Test menu, from the game itself.

#

When I had Die Hard ROMs byteswapped wrong before, the menu would show, but the text was messed up.

warped saddle
#

what's the test service menu mapped to in the saturn core button-speak?

naive whale
#

I believe L and R

untold cloud
#

Erm.

naive whale
#

or test and service were that on my Xbox Series X controller and I feel like I bound them to L and R

untold cloud
#

Something like that. lol

#

I used to know, a few weeks ago.

#

But now, Srg's new mapping stuff has erased my brain.

#

Just keep hitting buttons, just after loading a game, and it should enter the Service menu.

#

Then you'll see which other button maps to Test.

#

Die Hard - green screen.

#

Tried Backup Data Clear, from the game's own Test menu. No change.

#

About 12 minutes to go, before the tweaked core is compiled.

#

Even the Sound test seems to work, so it seems close.

#

ie. If the ROMs weren't loaded correctly, I doubt any of that stuff work would.

#

Saturn core still doesn't do a FULL reset, btw.

#

So when it crashes, you often have to reload the MRA/RBF.

#

Seems like it's crashing in a very similar way to what I was seeing before, with my crusty core patch.

#

I can't get more info, until I enable SnargleFlap, on Srg's new core.

#

oic, Srg did assign the Kick buttons already.

#
joy1 / JOY1 bus...

bit [15]  = Right
bit [14]  = Left
bit [13]  = Down
bit [12]  = Up
bit [11]  = Start
bit [10]  = A
bit [9]   = C  // Note: C and B are swapped in the top-level Saturn.sv.
bit [8]   = B  // Don't ask me why. lol (ElectronAsh).

// IN[7]=Left, IN[6]=Right, IN[5]=Up, IN[4]=Down, IN[3]=B4 (P3/P4 Start?), IN[2]=B3, IN[1]=B2, IN[0]=B1.
assign IN[5] = {1'b1,JOY2[4],JOY2[5],JOY2[6],1'b1,JOY1[4],JOY1[5],JOY1[6]};  // PORT-F (P4 / 6B "Kick")
#

It such a confusing way of doing things.

#
    wire [15:0] joy1 = {~joystick_0[0]|joystick_0[1], ~joystick_0[1]|joystick_0[0], ~joystick_0[2]|joystick_0[3], ~joystick_0[3]|joystick_0[2], ~joystick_0[7], ~joystick_0[4], ~joystick_0[6], ~joystick_0[5],
                              ~joystick_0[8], ~joystick_0[9], ~joystick_0[10], ~joystick_0[11], ~joystick_0[12], 3'b111};
#
        "J1,A,B,C,Start,R,X,Y,Z,L;",
        "jn,A,B,R,Start,Select,X,Y,L;", 
        "jp,Y,B,A,Start,Select,L,X,R;",
#
joystick_0 mapping, Saturn controls...

bit
[0]  = Right
[1]  = Left
[2]  = Down
[3]  = Up
[4]  = A
[5]  = B
[6]  = C
[7]  = Start
[8]  = R
[9]  = X
[10] = Y
[11] = Z
[12] = L
#
joy1 mapping, Saturn controls to STV...

joy1 bits become Active-Low, before going to STV.sv !!

bit
[0]  = 1'b1 (unused)
[1]  = 1'b1 (unused)
[2]  = 1'b1 (unused)
[3]  = L
[4]  = Z
[5]  = Y
[6]  = X
[7]  = R
[8]  = B
[9]  = C
[10] = A
[11] = Start
[12] = Up
[13] = Down
[14] = Left
[15] = Right
#

Don't take that as gospel either. lol

#

Would have been a lot easier, to just route joystick_0 etc. directly to the core.

#

Then add comments in the core, to say how the mapping is done.

#
    // PORTC (System) inputs...
    // 
    // b7 = Pause (if the game supports it)
    // b6 = Multi-Cart Select.
    // b5 = Start 2 ?
    // b4 = Start 1 ?
    // b3 = Service 1.
    // b2 = Test ?
    // b1 = Coin 2
    // b0 = Coin 1
    //
    // Button inputs to core are Active-LOW !
    // 
    assign IN[2] = {1'b1,1'b1,JOY2[11],JOY1[11],JOY1[7],JOY1[3],1'b1,JOY1[11]};  // PORT-C (SYSTEM).
#
Saturn to ST-V "System" (Port C) mapping...

         Saturn     ST-V

JOY1[11] "Start" -> Coin 1  ?
JOY1[3]  "L"     -> Test    ?
JOY1[7]  "R"     -> Service ?

JOY1[11] "Start" -> Start 1 ?
JOY2[11] "Start" -> Start 2 ?
#

I don't like it.

#

It should have a separate mapping for Coin 1.

muted cradle
#

@warped saddle , is there an arcade Battletoads core? Or what do you mean?

untold cloud
#

Sorry, I forgot to open the Dual SDRAM project file, so this is Single SDRAM atm.

#

Trying now...

muted cradle
#

Single RAM is for all. Dual RAM just for the self proclaimed elite.

untold cloud
#

lol

#

I agree, in many ways.

muted cradle
#

Just kidding 😉

untold cloud
#

I "disliked" it, when Jaguar originally went to DualSDRAM, even if it did mean a few more games ran / fewer glitches.

#

I'm not. 😛

#

OK - controls on Puri Puri chicken (or whatever it's called) seem to work now.

#

Purikura Daisakusen

#

In the game's Test menu (Service -> Each Game Test), the directions are now mapped correctly.

#

Plus A,B,C mapped to the game's SW1, SW2, SW3.

muted cradle
#

I will not give up my analog sandwich. Not for Jaguar. Not even for Dead or Alive if ElectronAsh's DoA2 is on the horizon 😚😚

untold cloud
#

R -> Service.

#

L -> Test.

#

Start, I would assume to Start, and maybe to Coin 1. ugh

#

(game's Input Test menu doesn't show the Start nor Coin buttons.)

naive whale
celest lake
#

But I have all this extra ram

naive whale
#

there are two IO test areas, one for game inputs and one for general cabinet inputs

untold cloud
#

Looks like (Saturn) start is mapped to both P1 Coin and P1 Start. sigh

naive whale
#

Sega repeated that in NAOMI too

untold cloud
#

I'll have to fix that. lol

#

Having Start do a Coin-up is super weird.

#

OK, yep. Hold the Test button ("L") whilst Resetting the core.

#

And you should see the Factory Test menu.

naive whale
#

not like I am the dev obv but the differences in mappings and how IO is handled from Saturn to STV feels like there either needs to be a forked binding option for the core or maybe STV would be better living its life as a separate core

untold cloud
#

Oh no. I pressed Service again, and it does the loopback tests. lol

naive whale
#

I dont know if Main allows for a core binding option for diff purposes though. Ive never seen it

untold cloud
#

At least the controls seem to be mostly OK now. Directions are fixed. 😉

#

I never expected ST-V to be involved.

untold cloud
#

I think that might mean saving the settings after doing the ST-V / MRA button map, though?

#

Or...

#

It would have to be done the crappy way I did it...

#
"J1,A,B,C,Start,R,X,Y,Z,L,STV-S2,STV-Mcart,STV-Pause,STV-P4-B1,STV-P4-B2,STV-P4-B3,STV-P4-B4;",
#

So, mapping the Saturn buttons to ST-V as usual, then having extra buttons on the menu, for ST-V.

#

Which is quite terrible, tbh. lol

#

No idea how the buttons in the MRA would map to the core.

#
 <buttons default="B,A,L,R" names="Attack,Jump,Coin,Start"></buttons>
#

I would guess, it auto-maps the Directions, as usual.

#

Then maps the MRA stuff sequentially.

#

Oh man, I forgot it probably saves the button mappings PER MRA, too.

#

ie. if you use the "buttons" entry in the MRA, that is. Else it will default to Saturn->STV, probably.

#

Mapping "Start" to both Start and Coin, is making my eye twitch.

warped saddle
#

it's a hack to allow him to start games, probably

untold cloud
#

Yeah.

#

I can see why he did it, so it's just easier to test atm.

#

Purikura controls do need diagonals.

#

ie. to follow the isometric view. It's an interesting game.

#

Oww. I beat the boss thing, but immediately died.

warped saddle
#

well "released"

#

there's a repo, it works if you compile it etc

#

has bug(s)

hard reef
untold cloud
#

Nice.

#

Some "interesting" comments on a certain other Discord, btw.

#

About how Srg doing these tweaks + "That'll show ElectronAsh".

#

From the usual suspects.

#

ie. "That crowd" of arcade elite types.

#

And I think they're only 10% joking, but oh well.

#

Luckily it's a Patreon-only discord, so they can shove it. lol

#

I might not always finish stuff, but at least I try. Most of the people from certain scenes, have never even installed Quartus, let alone tweaked any code.

#

Also, I don't OWE anyone a thing. I've never asked for donations, never had a Patreon.

ripe valley
#

Let them say.

I've have the same kind of guys since years in "preservation circles".
Acting like drama queens and bad mouthing within the confines of their own little personal court.
I've been in this business for at least 30 years now, they tried even on myself, and these kind of guys...
They usually end up being ostracized by their own people.
I'm just laughing about their emptiness in life.

#

Do the stuff you want, I follow your works since years.
Even if you don't finish sometimes, that's inspirating for others.

untold cloud
#

I'm probably a bit over-sensitive, tbh. It just always seems to be the same handful of people.

And one of them, I used to get on with quite well, when chatting via DMs.

#

I'll just take it as 90% joking, until proven otherwise. lol

#

Yes, the stangest thing for me, is that, when MiSTer was first starting to become popular, many of them were dissing it (and Sorg)

#

Probably because they felt FPGA cores might threaten the value of their boards?

#

But at the same time, as soon as more arcade cores got released, they are praising MiSTer again.

clear condor
#

If not the monetary value, then the psychological value

untold cloud
#

Yip.

#

Also interestnig, is some of the few people to be super vocal about the whole "hardware vs software emulation" debate, were... the people doing hardware mod installs for consoles. Funny that. lol

#

I would say: Why not both?

#

I barely even play games these days. I'm usually motivated by messing with the hardware / FPGA stuff.

#

And I'm definitely guilty of taking things too seriously at times, too. I'm not immune.

untold cloud
#

I may not be an "uber dev" (a phrase I think I coined), but hopefully I've at least worked on some stuff that people find interesting, or helped to inspire others to finish.

#

I've been mostly stuck into the DC stuff for months now, so I don't have much brain power spare for much else. I have to try to prioritize projects.

#

Meanwhile, I have about five PCB projects that have been sat on the bench for over four months.

#

Including the new GD Emu.

celest lake
untold cloud
#

tbh, it's possible they were mostly joking.

ripe valley
#

Hardware emulation versus software emulation", there are also super vocal people in my country, bad people.
When they learned that I was helping on the project, particularly on the Saturn, they choked up.
Their 'super uber elite stuff' was stained by one of their archenemies, because I come from the 'software emulation team'.
Good for them.

untold cloud
#

But just a weird thing to say anyway.

#

I've never really understood the arguments with the software emu vs hardware emu crowd.

#

They both compliment eachother.

#

It's just, if I had the choice, for a certain range of systems, I'd rather play on MiSTer.

#

I think it's safe to say, that for certain cores, regardless of whether you consider it "emulation" or not (which it pretty much is) - some cores are super compatible and accurate now.

#

Like N64 and PS1, for example.

naive whale
untold cloud
#

N64 runs "better" (more accurate to the original hw, and more compatible) on MiSTer than I've ever seen on a software N64 emu.

#

True.

#

I mean, I am biased as well, of course.

#

Have I made money off of the MiSTer project... yeah. lol

#

Probably not half as much as some might think, but I did design JAMMIX, put it that way.

#

But that's not the main reason I try to do work on some core stuff. I just enjoy it.

ripe valley
untold cloud
#

Man, I could tell some other stories, too. About how I was once asked to help port MiSTer cores to a certain other device.

But I turned it down, for moral reasons. lol

naive whale
#

I hear from people all the time..."x person doesnt like you" or "y person said something bad about you"....like I care lolol

untold cloud
#

I'd... never heard of Gambit, until I saw the recent movie.

#

#spoilers

naive whale
#

its filled with man babies who never got attention or laid in high school and now derive all their self worth from being popular in video game circles hahaha

untold cloud
ripe valley
untold cloud
#

lol

#

You just made me want Cajun Chicken.

#

Always wanted to visit "Nawleans"

#

Probably not the best time right now, but still.

naive whale
#

because they dont feel good unless they try to cut someone down since they all got shit on in life

untold cloud
#

Anyway, ST-V. lol

#

I do appreciate the support though, peeps.

naive whale
#

I dont see many happily married, well adjusted gaming people out there haha

untold cloud
#

I mean, still faster than an N64 game, right?

naive whale
#

and the ones that are are always cool

untold cloud
ripe valley
#

@untold cloud I saw everyone involved here in the MiSTer project as part of a team that wants to create a better thing, so sometimes we could talk for 5-10 minutes of rants and stuff.
It helps reduce stress and we could bring team spirit.
(I'm speaking like those happiness managers, urk.)

untold cloud
#

Don't worry, I'm quite chilled today.

#

Starting to relax a bit more often, as I'm nearly at the mid-40s. lol

celest lake
untold cloud
#

I only wish I'd got a bit more involved, when Sorg was first putting MiSTer together.

But as soon as he started on the ARM Linux side, I was like "Yeah, I don't think I can help there". lol

#

It took me a long time, to even see how the ARM stuff talked to the FPGA side.

#

Born in 81 here, too. 😉

#

I can't really hide it, as it's part of my TwitterX handle. lol

#

I was born when sprites were black and white.

#

And the phone was attached to the wall, with a twisty cable.

#

And if you wanted to phone home, you had to find... a phone box.

#

I think it was the first launch of the Space Shuttle as well that year?

#

I wish I could have seen at least ONE launch.

#

Anyway, Saturn / STV.

ripe valley
#

Today, on my side, I will continue the compatibility tests on the JP catalog.

#

The wife is out and I'm keeping the castle, so MiSTer, beer and obscure games.

untold cloud
#

Do we know roughly how many STV games are booting so far?

#

And is there a repo for MRAs yet, @warped saddle ?

#

I will try to write some more MRAs later, now I know it mostly works.

#

I might have a beer today. Haven't had a drink since New Year.

#

Only had maybe seven cans of Guinness, two bottles of Corona, and three glasses of wine, over the whole of Christmas and New Year. lol

mortal mist
#

have fun testing, coding and playing I wish you all! it's great to be here with all of you

ripe valley
#

Same, I don't know I could do without you and the others.

hard reef
untold cloud
#

Back to Dreamcast, me thinks.

#

Trying to get rid of the giant glitchy polygons.

marble laurel
naive whale
#

and as more known working versions come into existence if Lance Charlson receives them then I am sure he would be happy to keep archiving them

warped saddle
#

let me just figure out the mra generation and then instead of code words we can just have an actual thing we can discuss the location of

hard reef
# marble laurel which ones ?

These are the ones I've had some joy with so far:
Can play(with Ash's core): Prikura, Shienryu, Hanagumi, Elandore, Groovef
Boot to attract, can't start: Cotton2, Cottonbm, Grdforce, Rsgun

marble laurel
#

thank you

untold cloud
#

Rsgun won't react to Start, without the protection IC.

#

Or maybe some way to patch the ROM, unless that's already out in the wild somewhere.

#

The protection IC is VERY complex.

#

Would take forever, for somebody to fully implement it in Verilog.

#

Cotton2 and CottonBM not reacting to Start, is quite likely related to the same issue on certain emus...

#

(Mr Bacon sent me that github link originally.)

#

When I tried implementing that in the Saturn core, it did get the cursor moving on the Cotton 2 / BM test menu.

#

But didn't quite get Start to work.

#

I'm fairly convinced it's a related problem. Srg could probably fix it.

warped saddle
#

it's possible the st-v multi roms are patched but I'm also not sure those people publish their patches. could probably work it out with some bin diff magic

marble laurel
#

Shangai also go in games

warped saddle
#

almost got me again srg320!

#
                    case (bios_write_addr[2:1])
                        2'b00: ram_be <= {bios_be,6'b000000};
                        2'b01: ram_be <= {2'b00,bios_be,4'b0000};
                        2'b10: ram_be <= {4'b0000,bios_be,2'b00};
                        2'b11: ram_be <= {6'b000000,bios_be};
                    endcase```
naive whale
untold cloud
#

bios_write_addr LSB bit ditched, since ioctl_addr increments by 2 (hps_io width set to 16-bit).

#

bios_be probably always set to 2'b11, surely?

#

So yeah, bios_be is shifted down each time, writing one 16-bit word at a time, because DDR3 64-bit data bus.

#

bios_write_data (16-bit), is also replicated four times, so it "appears" across the whole 64-bit bus.

drifting crown
#

As someone with no technical knowledge in this field but loves video games, I just wanna say well done and thanks peeps.

naive whale
#

I’ll never understand @untold cloud why Sega pivoted the control scheme and how it’s addressed on STV. It’s like they intentionally just did needless work

untold cloud
#

They just totally abandoned the old Joypad inputs on the SMPC, and went with the separate IO chip.

#

But yeah, even for a typical arcade board, it's a bit messed up. lol

warped saddle
#
        <setname>saturnstv</setname>
        <rbf>Saturn</rbf>
        <about></about>

        <rom index="2" md5="" zip="stvbios.zip" address="0x30000000">
                <interleave output="64">
                <part crc="d1be2adf" name="epr-17952a.ic8" map="21436587"></part>
                </interleave>
        </rom>

        <rom index="3" md5="" zip="diehard.zip" address="0x34000000">
                <interleave output="64">
                <part crc="de5c4f7c"  name="fpr19119.13" map="12345678"></part>
                </interleave>

                <interleave output="64">
                <part crc="de5c4f7c"  name="fpr19119.13" map="12345678"></part>
                </interleave>

                <interleave output="64">
                <part crc="de5c4f7c"  name="fpr19119.13" map="12345678"></part>
                </interleave>

                <interleave output="64">
                <part crc="de5c4f7c"  name="fpr19119.13" map="12345678"></part>
                </interleave>

                <interleave output="64">
                <part crc="6fe06a30"  name="mpr19115.2" map="21436587"></part>
                </interleave>

                <interleave output="64">
                <part crc="af9e627b"  name="mpr19116.3" map="21436587"></part>
                </interleave>

                <interleave output="64">
                <part crc="74520ff1"  name="mpr19117.4" map="21436587"></part>
                </interleave>

                <interleave output="64">
                <part crc="2c9702f0"  name="mpr19118.5" map="21436587"></part>
                </interleave>
        </rom>
</misterromdescription>```
#

die hard, with direct ddr3 loading

untold cloud
#

Oooh.

#

I'm assuming the game doesn't boot yet?

warped saddle
#

no, the same as the other mra, just....faster

#

you can green screen more times per minute now

untold cloud
#

lol

#

It's neat that you can just specify the DDR loading address.

#

Could probably also STOMP on Linux memory that way, which is fun.

#

How did you figure out the interleave 64 thing?

#

Oh yeah, I guess it needs to know that, when loading that way.

#

Else it would probably throw each 16-bit word into the lower (or upper) part of each 64-bit word, or... something.

#

Gonna enable SnargleFlap on the core, using this one weird trick.

#

(ie. copying the stp1.stp file from the old core)

#

If Die Hard crashes in a very similar way to what I was seeing, it would make me feel better. lol

celest lake
#

I love watching this shit. I just imagine that Ash loads up dreamcast.qpf and then Zakk makes a change and

untold cloud
#

lol

#

Oww. Hate seeing actors like him now, and just how old everyone is.

celest lake
#

yeah dude. it was rough watching the irishman

untold cloud
#

Same with Joe Pesci.

#

I forgot Pacino was even in The Irishman.

#

I... had trouble watching the whole thing, if I'm being honest.

#

I usually love stuff like that, but that was a LONG film.

warped saddle
#

ugh, annoying. mame xml info for roms doesn't contain the swap16 etc flags

hearty carbon
#

It felt like your grandpa telling you a story from his youth but you can only imagine him as an old man so he's 65 in first grade getting paddled by his teacher.

untold cloud
#

lol

#

Yeah.

#

I just couldn't get into the story.

#

I watched it for at least the first 90 mins.

celest lake
#

yeah dude. there is that scene where deniro goes to beat up the store owner dude. and it's obviously 80 year old deniro walking around in a 40 year old's skin

#

same problem with the latest indy movie

untold cloud
#

I couldn't watch that either. I love the original Indy trilogy too much.

#

I will get around to it soon, once I have the ol' Atmos receiver running again.

celest lake
#

it was better than the 4th movie. but that isn't saying anything

untold cloud
#

But I saw a spoiler for the ending already, and it looked awful.

#

And people thought Crystal Skull looked fake. lol

thorn pagoda
#

i enjoyed the latest indy

untold cloud
#

I enjoyed Crystal Skull for what it was, but the CG was awful.

thorn pagoda
#

that new game is meant to be great too if you're a big indy fan

untold cloud
#

I saw that on DF. But I haven't completed a game since about 2011, when I played Portal 2.

#

I just like to stare at the games, and keep up with some of the new tech.

#

I bought an RTX 2060 about 18 months ago, mainly due to FOMO.

#

I bought and played GTA V for the first time, got shot by the police after the intro, and never bothered playing a game since. lol

#

LOVED playing GTA Vice City on the old-people Xbox, though.

#

Just driving around, with the radio on.

untold cloud
#

Mah poor PC.

#

Trying to compile two "cores" at once.

#

Two cores, one cup.

untold cloud
#

Die Hard... in the process of crashing.

#

Using the new MRA from @warped saddle , which loads the ROMs directly into DDR3.

#

(which shouldn't affect how the game runs. It seems to load fine, and a lot faster.)

#

Crashes in pretty much the same way as I was getting before.

#

Maybe some of these games use Bank switching on the cart, but I don't think so?

#

Can't easily find a way to trigger SignalTap when the actual crash happens.

#
ROM_START( diehard ) /* must use USA, Europe or Taiwan BIOS */
thorn pagoda
#

does mame offer any clues?

untold cloud
#

Just looking, as it happens. lol

#
void stv_state::init_diehard()
{
    // install all 3 speedups on both master and slave
    m_maincpu->sh2drc_add_pcflush(0x6027c98);
    m_maincpu->sh2drc_add_pcflush(0xd04);
    m_maincpu->sh2drc_add_pcflush(0x60051f2);

    m_slave->sh2drc_add_pcflush(0x6027c98);
    m_slave->sh2drc_add_pcflush(0xd04);
    m_slave->sh2drc_add_pcflush(0x60051f2);

    init_stv();
}
#

drc = Dynamic Recompilation, AFAIK.

#

I don't know if it needs those patches, or if they are just for speed-ups.

#
GAME( 1996, diehard,   stvbios, stv,      stv,      stv_state,   init_diehard,    ROT0,   "Sega",
#
  "Die Hard Arcade (UET 960515 V1.000)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND  )
#

Seems to use the standard "stv" machine setup.

#

Can't see it using any protection IC stuff.

#

The fact that it crashes the same way with Srg's code, as it did for mine, suggests it's something inherent missing.

high bramble
#

MRA folder ready and waiting. 😉

visual grove
#

Just pass in PERFECT_GRAPHICS, cmon mame guys

thorn pagoda
#

what are mame "speedups" exactly

untold cloud
#

lol

thorn pagoda
#

maybe they're skipping some copy protection in there and just being sly about it?

untold cloud
#

Dunno. Something to do with DRC. Maybe it doesn't do recompilation for certain address ranges / functions.

#

Possibly. I don't know how the DRC stuff works.

#

In fact, I don't even know how DRC itself works. lol

high bramble
#

Well, the time and effort you're putting into this is extremely appreciated. Thank you for everything you're doing.

untold cloud
#
/*-------------------------------------------------
    sh2drc_add_pcflush - add a new address where
    the PC must be flushed for speedups to work
-------------------------------------------------*/

void sh_common_execution::sh2drc_add_pcflush(offs_t address)
{
    if (!allow_drc()) return;

    if (m_pcfsel < std::size(m_pcflushes))
        m_pcflushes[m_pcfsel++] = address;
}
high bramble
#

Man, I had a lot to catch up on in this thread after work today. 😄

untold cloud
#

Just to be clear - I did some initial lame tweaks, to get the STV BIOS and a few games running.

#

(and wrote some logic for the STV IO chip)

#

But Srg320 did the latest tweaks.

#

But thanks. 😉

#

I have a feeling the DRC stuff won't affect how the game boots.

#

But could be something on the core, like maybe addresses above 16MB aren't being accessed correctly?

#

'cos Die Hard ends up around 20MB, once merged into a Cart ROM.

#

And I guess also >16MB of address space, when loaded via the MRA.

#

And yep - the core properly crashes.

#

Reset won't even work.

#

Which is bad, because it really should. It's like it's not doing a full Cold Reset on the SH2(s).

#

Roughly around the time the green screen shows...

#

I never got the green screen on the old core, btw.

#

Only the "Winners" screen, then black.

#

Ohh

#
0x02000000    0x03FFFFFF    CS0    Cartridge 0
0x04000000    0x04FFFFFF    CS1    Cartridge 1
0x05000000    0x057FFFFF    Dummy     
0x05800000    0x058FFFFF    CD-ROM registers (CS2)    Repeats every 64 Bytes
#

OK, so, subtract the 0x20000000 thing, and it should give the offset of the ROM it's trying to access.

#
    ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
    ROM_LOAD16_BYTE( "fpr19119.13",               0x0000001, 0x0100000,
    ROM_RELOAD_PLAIN ( 0x0200000, 0x0100000 )
    ROM_RELOAD_PLAIN ( 0x0300000, 0x0100000 )
    ROM_LOAD16_WORD_SWAP( "mpr19115.2",    0x0400000, 0x0400000,
    ROM_LOAD16_WORD_SWAP( "mpr19116.3",    0x0800000, 0x0400000,
    ROM_LOAD16_WORD_SWAP( "mpr19117.4",    0x0c00000, 0x0400000,
    ROM_LOAD16_WORD_SWAP( "mpr19118.5",    0x1000000, 0x0400000,
#

If the upper ROMs (2,3,4,5) had the wrong Byteswap, I'd expect the game's Test menu font to be messed up.

#

('cos it happened to me, before I Byteswapped those files)

#

But it's interesting that the crash might be happening, just as it's trying to run code from 0x0400000.

#

mpr19115.2

#

Looks like mostly graphics data in that ROM.

#

First few bytes from ROM offset 0xA320...

#
0D 38 04 00 80 13 C2 0A 04 02 FF FF FF
#
ROM file...
A320 = 0D380400
A324 = 8013C20A

SignalFlap...
A320 = 380D0004
A324 = 13800AC2
#

Aside from it being byteswapped (each 16-bit word), it looks OK.

#

Gonna try byteswapping the upper ROMs anyway.

#

I doubt this is gonna work, but let's see what it does.

#

I want to see if the Winners logo is stored in the upper ROMs, or in the SH2 ROM.

#

Immediately crashes. lol

#

Not too surprised.

#

Back to the original (above) MRA setting, and it shows the Winners logo again, then green.

#

So I don't think it's a byteswapping problem.

#

^ That's about when the Winners logo appears, so it's probably reading the gfx header stuff.

#

Oh, that's reading from offset 0xE0, from the first (SH2) ROM.

#
000010000000
#

Some kind of flag thing, possibly a region check?

#

Tried setting the menu option from Japan to USA, but that doesn't help.

#

I don't even think the ST-V reads the region in the same way as the Saturn.

#

IIRC, the Saturn BIOS reads the region of the mobo, via some "joyport" pins on the SMPC.

#

(pull-up / pull-down resistor combo, or 0R resistors / wire links)

#

Fairly sure the ST-V BIOS region itself just needs to match the game.

#

I think this could be quite hard to debug.

#

Might be one for Srg to look into.

#

Hard enough, just finding a place to trigger SignalTap at.

#

I even did some trace dumps on the MAME debugger a few weeks back, to try to figure this out.

#

I'm just glad it wasn't just me. lol

naive whale
untold cloud
#

Ahh, OK.

#

So, generally, the game just has to match the current BIOS version / region, yep?

outer relic
#

There's a multi-region STV BIOS floating around somewhere

naive whale
#

Even Model 2 / Model 3 exhibits it. Sega pretty much always did that. Vs SNK where carts have English and Japanese builds on them but throw the cart in any region hardware and it doesn’t give AF

celest hearth
#

I'd go so broke if I hd access to shops like that. Thank goodness I'm stuck in Wisconsin!

#

You say his name like he'll appear Beetlejuice 😄

naive whale
warped saddle
#

ok, now I just have to figure out how to put the right bios in the mra

high bramble
#

ST-V MODBIOS seems useful...

untold cloud
#

I've been using the Modbios for a while.

#

I had more success with the stv1061 BIOS, in getting a few games to run early-on.

#

Like wasafari.

#

Although, to actually play the game, it needs a signal hooked up to IO Port G, for the Winch. lol

naive whale
warped saddle
#

mras so far. based off mame's 'software list' since that's the only place it puts the rom swap info

#

everything using a US bios for now, so some things won't run. I think I'll just have to extract the region from the file name and create distinct mras for each supported one

#

oh and obviously you need ST-V roms in /media/fat/games/mame

#

should work with merged or split

#

there's a few I still have to tweak by hand because mame's rom reload thing is difficult to deal with without doing multiple passes

untold cloud
#

Thanks, Zakk.

#

Awesome work.

naive whale
unique moat
#

where do you place the mra's at?

warped saddle
#

in /media/fat/_Arcade

#

if you want them in a dedicated directory do like /media/fat/_Arcade/_ST-V

#

(underscore is important)

unique moat
#

ahh yeah

slate karma
#

I'm trying it but doesn't seem to even load the rbf, just kicks back to the main menu. I'd try and diagnose myself but I don't even know where any logs might be :/

#

Also tried copying a romset to fat\games\mame, usb0\games\mame and usb0\games\saturnstv (just to make sure)

warped saddle
#

oh, you need to copy the Saturn core to /media/fat/_Arcade/cores/Saturn.rbf

slate karma
#

That'll be exactly it!

#

Last thing for everyone: You need to set "cartridge" to STV in the menu 🙂

warped saddle
#

yeah, do it once and save settings

#

they all use the same setname so it'll be set for all of the mra launched games

slate karma
#

Are there mappings for the service and test buttons as well? Guessing that's to be implemented by srg320.

warped saddle
#

I think he put them on L and R?

slate karma
pearl harbor
#

Hmm, not working for me still. I put the mra's in the _Arcade folder. I put the core in the _Arcade/cores folder. I changed the cartridge to STV. And I put the roms in the games/mame folder. All I get is an error message saying something couldn't be found.

#

Grabbed the roms from the Mr. Lance.

warped saddle
#

aren't those the concatenated .bin files? you need mame roms

pearl harbor
#

Ah, well what the fudge, Bacon led me astray!

#

Where do I put the bios file for this one?

#

And for that matter, what should it be called?

#

Someone really needs to type up a single post that gives very specific directions so it can be pinned by the loveable Blobby.

#

Wait, I got it working. I'll type up a post for everyone.

celest lake
#

you have to put the roms in the rom hole

#

it's shaped that way for a reason

pearl harbor
#

Directions for getting STV up and running:

Place the mra's shared by Zakk #1046941029296779344 message in the _Arcade folder.

Place the core in the _Arcade/cores folder. #unstable-nightlies message

Place the STV arcade roms (must be mame .zip roms) in the games/mame folder.

Place the bios (must be named "stvbios.zip") in the games/mame folder.

In the core OSD, change the Cartridge to "STV".

Enjoy sega

untold cloud
#
Saturn_unstable_SingleSDRAM_ButtonFix_EA_20250127.rbf -> /media/fat/_Arcade/cores
stvbios.zip -> /media/fat/games/mame

prikura.zip -> /media/fat/games/mame
prikura.mra -> /media/fat/_Arcade

diehard.zip -> /media/fat/games/mame
diehard.mra -> /media/fat/_Arcade
#

(core has to be renamed to Saturn.rbf)

#

AFAIK

pearl harbor
#

Weird, I didn't rename it.

untold cloud
#

OK, maybe main MiSTer picks up on the start of the filename, then. I wasn't sure.

pearl harbor
#

I'm using the dual ram core. Maybe that's it?

untold cloud
#

For anyone reading this - Die Hard still doesn't boot.

#

No, you're probably right. It sounds like MiSTer only needs to check the "Saturn" part of the filename.

warped saddle
#

it does work if you don't rename it

#

but you should, so the next time you copy an unstable over you don't have two

untold cloud
#

No idea how it decides which RBF to use, if there are multiple. Maybe the one with the later date?

warped saddle
#

which often...ends poorly

pearl harbor
#

Both Cotton games boot, but can't get passed the title screen.

untold cloud
warped saddle
#

ok, different set with some changes. If a game only lists japanese region it uses a japanese bios

#

if the game lists both JP and something else, the one in the 'main' directory uses US, and there's a subdir named _JP Bios that is the same mra, but with a JP bios instead

#

and as per my american citizenship requirement I have ignored EU

#

I also tried to hand fix up some of the ones with weird rom duplication but I'm not 100% on how correct those are yet

muted cradle
mortal mist
rich violet
#

New Sega Worldwide Soccer bug on the issue tracker.

#

Not sure if it's a regression or if it's how the core has always behaved.

mortal mist
#

I tested my games again with the latest core, updated the spreadsheet

#

core works incredibly well , love it

mortal mist
#

Should I make a separate sheet for SVT testing or make a tab in the sheet for Saturn ?

rich violet
#

Maybe a tab? Same core, same sheet?

mortal mist
#

ok

#

second question , what options in core are still missing for image options ? crop , scale ? what could be useful

marble laurel
#

custom aspect ratio also

#

it may needs rotate for shenryu on STV

mortal mist
thorn pagoda
thorn pagoda
#

oh nice!

#

how about lightgun support? nolbin was looking for some help there

mortal mist
#

I think it's going to be a tough one 😄

muted cradle
outer relic
#

It would be helpful for vertical CRTs also

ripe valley
#

The core works extremely well now after some more tests on the JP catalog yesterday.
Once for all, I've found... nothing to report to srg320.

#

31 games tested.

#

Tonight I need to test the Tokimeki games...

mortal mist
#

yes , I tested all the games I have and entered only the number of the new core , because I found nothing 🙂

ripe valley
#

I've left a ticket for the left direction on the ST-V, more for eventual users than for srg320 and us.

polar mountain
#

I found a bug!

#

In sf alpha 2

#

In the illustrations

#

On a crt

#

Some pixels missing

mortal mist
#

latest unstable ?

polar mountain
#

No

#

Update all

mortal mist
#

chcek latest unstable

polar mountain
#

Also the bgm in illustrations is very groovy

mortal mist
#

due to rework sprite drawing this may have changed

ripe valley
#

Can't see the issue.

#

I've checked yesterday night the game in JP version.

#

With the 20250126 version.

polar mountain
#

It's still there on unstable

#

Single ram

mortal mist
#

can you show what is wrong ?

polar mountain
thorn pagoda
#

black pixels in the hair?

polar mountain
#

Yes

thorn pagoda
#

do they move or are they static ?

polar mountain
#

They flicker

dense sundial
#

this may be well-known issue but still

#

seeing funny flickering in 3D Blast's special stages

#

nothing major so far, just funny

mortal mist
#

it will be worth testing it with fast timing option

#

if you are using single sdram

#

may help with some errors (or not )

dense sundial
#

hmm

#

will do, thanks

mortal mist
dense sundial
#

oh, it's fixed with fast timings, cool

mortal mist
#

note added to the spreadsheet

#

thanks

lone mural
#

i'm excited with ST-V

#

we are going to play in a good way Groove on Fight and Suiko Enbu

ripe valley
#

For SFA2/SFZ2, too tiny on my screen and for my eyes, so I missed them.

#

Does the missing pixels are also on the real hardware, that needs a check later.

wise brook
mortal mist
#

I do not recall any discussion on this topic, Nolbin mentioned that he has a problem with the handling of peripherals through SH2

marble laurel
wise brook
#

#1046941029296779344 message

#

ah yeah seen

#

interesting, seems like srg320 and noblin will need to coordinate on that then

#

the ol’ SMPC would be where all original and usb controllers hook into the core, no?

#

i hope it can be solved, Saturn virtua cop with my gun4ir is top of my pyramid of needs

cunning citrus
# polar mountain

I Wonder if the same happens with Alpha 2 Gold (Disc 2 of Street Fighter Collection).

ripe valley
#

Okay, on Mednafen those pixels aren't missing at all, I think I don't have to check on the original console.

untold cloud
#

Not sure if that might help?

#

PDF page 123

#

For SH2 Direct Mode, the core might be missing specific features for that atm. Not sure.

#

I should mention that I've never used a light gun on a Saturn, and never looked at how it gets read.

#

But it looks like the Stunner is an old-people style light gun, which uses the scanline timing on a CRT.

ripe valley
untold cloud
#

oic, so "SH2 Direct Mode" relates to the SMPC.

#

I thought it might be some weird Counter/Timer thing it was using on the SH2.

#

Looks like it uses the HV Counter in VDP2, though, which would make sense.

#

Then it latches the HV coord when the trigger is pulled, AND if the gun detects the light, probably.

#

So, the DDR and PDR regs relate to the Joyport stuff on the SMPC.

#

PDF page 17...

#

I would imagine that EXLE1 thing actually routes an output bit from the SMPC to VDP2.

#

PDF page 37 (page 19)...

#

I think it's gonna suck, to try to debug this. lol

#

Having to do tons of recompiles, as there's no easy way to test stuff like that on simulation.

#

I suppose the strategy would be to spoof enough "feedback" from the SMPC and VDP2 regs to keep the software happy.

#

Then shove the light gun coords into VDP2, so the software can read it.

#

They keep calling it the "HV Counter", but it's really two separate counters. lol

#

Probably don't need to worry about doing the whole SMPC thing for the External Latch signal, unless the eventual goal is to use the light gun via SNAC.

#
The external latch flag (EXLTFG: bit 9) of the VDP2 screen status register
(TVSTAT: 180004H offset) is read. If the bit is 1, the HV counter is read. The
targeted position and the HV counter position will be off in reality.
#
The screen status register (TVSTAT) is cleared to 0 when the read is done.
Therefore, it can be read only once during a V-blank.
#
Note: When the HV counter is read, the screen cannot be read if it is too dark (EXLTFG will
not go to 1). Therefore, the screen must be white (bright) for 1/60th of a second after the
Stunner trigger is pulled and the value read at that time is used to determine the
position.
#

What I don't get is - Does the External Latch thing trigger an interrupt, or does VDP2 simply "hold" the values of the H and V Counters until they are read?

#

'cos the SH2 surely can't be expected to poll the EXLTFG bit fast enough to get decent target accuracy?

#

I would have expected it to have a second set of HV Counter regs, to latch the current position into.

#

Then it would only need to read during Vblank anyway.

#

Oh, it actually does say that, sort of.

#

Logically, it must be latching the HV Counter values when external trigger thing happens.

#

Else, it wouldn't be able to read the Counters during Vblank, and get the proper position, ofc.

visual grove
untold cloud
visual grove
#

No flickering speckles on real Saturn hardware

untold cloud
#

Notes from Charles Macdonald...

#
Light gun

 This is all untested, but here are some thoughts about how light guns
 are supported on the Saturn:

 The SMPC can be configured through the EXLE register to allow bit 6 of
 either I/O port, when set up as an input, to trigger a signal to the SCU
 and VDP2. While the documentation is sparse, it seems that the SCU will
 generate an interrupt when this occurs. The VDP2 can be set up to latch
 the HV counter, and will show if this happened in the status flags.

 I would imagine your typical light gun game would set up both features,
 so the light-sensing feature of the gun would trigger an interrupt and
 simultaneously latch the HV counter, which the interrupt subroutine could
 investigate. I believe this is a mostly correct interpretation of how Saturn
 lightguns work, as I had modified a Saturn lightgun to work on the Genesis
 based on the same concepts.
#

I didn't realize light guns are already supported via SNAC. I should probably have looked that up first.

wise brook
#

i posted videos a while back, see if i can find it one sec

untold cloud
#

Thanks.

#

So, you'd have to emulate the ID of the light gun first, to keep the SMPC happy, and allow reading of the trigger/button.

wise brook
#

#1046941029296779344 message

untold cloud
#

Then hijack the H/V Counter and EXLTFG thing on VDP2, to shove the coords into that.

wise brook
#

this is why I was hoping the USB solutions and gun4IR were closer to completion than they apparently are

untold cloud
#

I was actually working on a light gun a while back, which would probably have been made open source.

#

But as usual, I never finished it. lol

wise brook
#

I thought the core side of things was functionally done, just hooking the USB/linux side into it was all that remained

untold cloud
#

I bought a kit on AliExpress, which used an IR emitter/receiver thing, and came with the light gun board.

wise brook
untold cloud
#

It worked like some of the arcade light guns, where it has a quad sensor, and a barrier on the front.

wise brook
#

they’ve even got some guns working over Bluetooth

untold cloud
#

Yeah, there are some really great solutions now, so there was no need for me to finish that one.

#

This gun would have been wireless, though.

#

And I was hoping to see how low the latency was. I'm not heavily into those games, or anything, but I never liked how some of them worked.

wise brook
untold cloud
#

ie. Some solution that use the Wiimote style camera/sensor, the lag looks terrible.

wise brook
#

if you build it specifically into your model

untold cloud
#

Ahh, Ok.

#

See, I have this vision, where I will one day sit down and actually start playing games again. lol

#

Including on the CRT.

#

I also bought a big trackball, but never hooked it up.

#

I think it would be fun, for games like Marble Madness.

#

I used to LOVE playing Spindizzy, on the Amstrad, in the 80s and 90s.

#

OK, so - Saturn core light gun emulation...

#

The first step would probably be to enable SignalTap, then hook up a real light gun via SNAC.

#

Then watch the VDP2 regs for the HV Counter(s), and EXLTFG flag.

#

Then try loading you own coords into that reg, and trigger the flag.

#

Once that's working, and the target is following the HV coords for the USB light gun (or emulated via joystick), you'd have to then spoof the ID etc. of the Stunner.

#

I don't have a Saturn light gun, else I'd give it a try. lol

#

"Trusted", apparently.

#

I'll be honest - I'll probably never get around to having a proper look at this.

#

I don't have a MiSTer setup hooked up to the CRT in the other room atm, as they are being used for dev.

#

LOL

#

Of COURSE it would be Robby.

#

Latching code thing, in the core...

coarse tokenBOT
#
EXLAT_N_OLD <= EXLAT_N;
untold cloud
#

So it looks for a falling edge of EXLAT_N.

#
            EXLAT_N_OLD <= EXLAT_N;
            if (!EXLAT_N && EXLAT_N_OLD && REGS.EXTEN.EXLTEN) begin    //EXTEN
                REGS.HCNT.HCT = {H_CNT,DOTCLK_DIV[1]};
                REGS.VCNT.VCT = LSMD == 2'b11 ? {VCT,~ODD} : {1'b0,VCT};
                REGS.TVSTAT.EXLTFG <= 1;
            end
#

And checks if the EXLTEN (External Latch Enable) bit is set, in one of the regs.

#

If so, it copies some of the H_CNT and VCT stuff into the HV Counter regs, then sets the EXLTFG flag.

#

Then some other logic, for Read handling, it looks like...

#
                    if ({A[8:1],1'b0} == 9'h002 && !REGS.EXTEN.EXLTEN) begin    //EXTEN
                        REGS.HCNT.HCT = {H_CNT,DOTCLK_DIV[1]};
                        REGS.VCNT.VCT = LSMD == 2'b11 ? {VCT,~ODD} : {1'b0,VCT};
                        REGS.TVSTAT.EXLTFG <= 1;
                    end
                    if ({A[8:1],1'b0} == 9'h004) begin                                //TVSTAT
                        REGS.TVSTAT.EXLTFG <= 0;
                        REGS.TVSTAT.EXSYFG <= 0;
                    end
untold cloud
#

Which is a bit weird, as it's latching stuff when the EXLTEN flag is NOT set?

wise brook
#

i love watching the thinking happen in real time

untold cloud
#

Just be prepared to see a lot of non-thinking, too. lol

#

That's so weird...

#

So a READ of the EXTEN reg still latches the light gun coords, even though the EXLTEN flag is Low?

#

That must be for polling.

#

ie. when EXLTEN is High, VDP2 will automatically latch the coords, on the falling edge of EXLAT_N.

#

Basically, just need to try shoving the HV coords into the regs...

#
                        REGS.HCNT.HCT = {H_CNT,DOTCLK_DIV[1]};
                        REGS.VCNT.VCT = LSMD == 2'b11 ? {VCT,~ODD} : {1'b0,VCT};
                        REGS.TVSTAT.EXLTFG <= 1;
#

The check for LSMD==2'b11 is probably for interlaced.

#

Where it uses the inverted ODD (odd field) flag as the LSB bit of the Vert counter.

#

Else, it just uses VCT directly (non-interlaced modes).

#

HCT is also using a bit from the DotClock divider as the LSB bit.

#

Not sure why that would be, but maybe so the H/V Counters use a certain "resolution" for the light gun stuff, so the coords stay within the same range, regardless of the video mode?

#

This thing does kinda make sense...

#
{VCT,~ODD}
#

It's setting the LSB bit of the Vertical counter High, on the EVEN fields, for interlaced modes.

#

So it's Low on the Odd lines, High on the Even lines.

#

Just depends which one your aim lands on. lol

thorn pagoda
#

not sure any lightgun games are actually interlaced fwiw

untold cloud
#

And VCT is likely incremented half as often, when in Interlaced mode, since it waits for each pair of lines to be displayed.

#

Yeah, it would be quite strange.

#

I would have thought it could cause some weird targeting issues, if it were interlaced.

thorn pagoda
#

@clear condor ^ just want to make sure you see this

untold cloud
#

Sheesh. I forgot the Saturn core is already using about 98% of the FPGA now. 😮

#

Not that the light gun stuff would add very much at all, but it starts to get much harder for Quartus to finish a compile.

#

(as it's not just the "logic" it needs to fit, but all of the routing etc.)

#

SignalTap will be using a couple of percent, but not very much.

thorn pagoda
#

i feel like the saturn core has been over 95% for years now

#

its like that mythbusters lorry, never quite hitting 100

untold cloud
#

lol

rich violet
#

srg320 magic 🧙‍♂️

untold cloud
#

I remember when Mythbusters had to say they got the physics wrong, when talking about the two lorries crashing head-on.

thorn pagoda
#

i think i've seen thaat one, they definitely crashed those two lorries together

untold cloud
#

Jamie originally said "With the two trucks travelling at 50 MPH, it would be like each truck hitting a brick wall at 100 MPH", or something.

thorn pagoda
#

no but it is like hitting a stationary truck at 100MPH right

untold cloud
#
Goofs
At one point, Jamie Hyneman claims that the combined speed of the two trucks colliding while each is going 50 mph adds up to a 100 mph collision but that is not how it works. The collision energy absorbed by the two moving trucks is the same as for a 50 mph collision with a static obstacle because in addition to deforming the trucks, each also loses the same amount of kinetic energy slowing the other one down.
#

I've... wasted my life.

thorn pagoda
#

huh

#

TIL

untold cloud
#

Because each truck isn't a fixed solid wall thing.

#

So the opposing forces (Newton) still take effect. Or something.

thorn pagoda
#

yeah that makes sense there's a finite amount of energy to go around

untold cloud
#

Equal and opposite reaction.

thorn pagoda
#

feels counterintuitive tho

untold cloud
#

Yeah.

#

I forgot how light gun stuff works on MiSTer.

#

I know there's usually a separate module for it.

#

Or, does it just use the analog joystick outputs? lol

thorn pagoda
#

check psx? that has robust lightgun support

#

i think they usually come in as joysticks is the preferred way but i'm not sure

untold cloud
#

oic, it's pretty much the whole Menacer gun emulation here...

#

Probably don't need something as complex as that, for Saturn.

#
wire [11:0] joystick_0,joystick_1,joystick_2,joystick_3,joystick_4;
wire  [7:0] joy0_x,joy0_y,joy1_x,joy1_y;

hps_io #(.CONF_STR(CONF_STR), .WIDE(1)) hps_io
(
//
    .joystick_l_analog_0({joy0_y, joy0_x}),
    .joystick_l_analog_1({joy1_y, joy1_x}),
#
lightgun lightgun
(
    .CLK(clk_sys),
    .RESET(sys_reset),

    .MOUSE(ps2_mouse),
    .MOUSE_XY(&gun_mode),

    .JOY_X(gun_mode[0] ? joy0_x : joy1_x),
    .JOY_Y(gun_mode[0] ? joy0_y : joy1_y),
    .JOY(gun_mode[0] ? joystick_0 : joystick_1),
#

OK, so it does just use the joystick analog stuff, from HPS IO. Makes sense.

#

(then a few buttons from joystick_0 etc.)

#

hps io...

#
    // analog -127..+127, Y: [15:8], X: [7:0]
    output reg [15:0] joystick_l_analog_0,
    output reg [15:0] joystick_l_analog_1,
#

OK, yep. So X and Y are merged onto each output. 8 bits each.

#

Signed.

#

Presumably, "zero" would be output for the center of the screen.

#

(relative to the USB joystick analog stuffs)

#

Saturn core already uses the analog joystick stuff for normal analog pads.

#
    HPS2PAD PAD
    (
        .JOY1(joy1),
        .JOY2(joy2),

        .JOY1_X1(joy0_x0),
        .JOY1_Y1(joy0_y0),
thorn pagoda
#

zero might be offscreen

#

i'm not sure, a lot of games use that for reloading* but i don't know how thats represented on the joystick

untold cloud
#
            // Real (SNAC) light gun support. Srg.
            EXLAT_N_OLD <= EXLAT_N;
            if (!EXLAT_N && EXLAT_N_OLD && REGS.EXTEN.EXLTEN) begin    //EXTEN
                REGS.HCNT.HCT = {H_CNT,DOTCLK_DIV[1]};
                REGS.VCNT.VCT = LSMD == 2'b11 ? {VCT,~ODD} : {1'b0,VCT};
                REGS.TVSTAT.EXLTFG <= 1;
            end
            
            // Emulated light gun support... EA.
            if (EMU_LT_PULSE) begin
                REGS.HCNT.HCT = {~JOY1_X1[7],JOY1_X1[6:0]};
                REGS.VCNT.VCT = {~JOY1_Y1[7],JOY1_Y1[6:0]};
                REGS.TVSTAT.EXLTFG <= 1;
            end
#
            // Emulated light gun support... EA.
            if (EMU_LG_ENA && (H_CNT==VBL_HPOS-1) && (V_CNT==VBL_START-1)) begin
                REGS.HCNT.HCT = {~JOY1_X1[7],JOY1_X1[6:0]};
                REGS.VCNT.VCT = {~JOY1_Y1[7],JOY1_Y1[6:0]};
                REGS.TVSTAT.EXLTFG <= 1;
            end
#

Changed it, to update the coords on every Vblank, as long as EMU_LG_ENA is High.

#

Just not sure how to handle this thing atm...

#
                    if ({A[8:1],1'b0} == 9'h002 && !REGS.EXTEN.EXLTEN) begin    //EXTEN
                        REGS.HCNT.HCT = {H_CNT,DOTCLK_DIV[1]};
                        REGS.VCNT.VCT = LSMD == 2'b11 ? {VCT,~ODD} : {1'b0,VCT};
                        REGS.TVSTAT.EXLTFG <= 1;
                    end
#

And I'll still need to spoof the actual light gun ID, on the SMPC. No idea how to do that atm, short of buying a light gun to test via SNAC.

thorn pagoda
#

i have all the hardware if you can give me a core to extract the id from it or something

#

though i expect its well known online surely

untold cloud
#

Thanks.

It's just I'm not sure how the SMPC even reads the ID atm. I know the Saturn uses a kind of serial / shift register protocol, but that's about it.

thorn pagoda
#

opensource saturn emu for reference maybe

mortal mist
#

@ripe valley @polar mountain I don't see any pixels

thorn pagoda
#

does the analog pad have an id? might be able to practice on that

untold cloud
#
    typedef enum bit [5:0] {
        PS_IDLE,
        PS_START,
        PS_ID1_0,PS_ID1_1,PS_ID1_2,PS_ID1_3,PS_ID1_4,
        PS_TYPE_SEL, 
        PS_DPAD_0,PS_DPAD_1,PS_DPAD_2,PS_DPAD_3,PS_DPAD_4,PS_DPAD_5,PS_DPAD_6,PS_DPAD_7,
        PS_MOUSE_0,PS_MOUSE_1,PS_MOUSE_2,PS_MOUSE_3,PS_MOUSE_4,PS_MOUSE_5,PS_MOUSE_6,PS_MOUSE_7,PS_MOUSE_8,PS_MOUSE_9,PS_MOUSE_10,
        PS_ID5_0,PS_ID5_1,PS_ID5_2,PS_ID5_3,PS_ID5_4,PS_ANALOG_5,PS_ANALOG_6,PS_ANALOG_7,PS_ANALOG_8,PS_ANALOG_9,PS_ANALOG_10,
        PS_NOTHING_STUNNER,
        PS_NEXT,
        PS_END
    } PortState_t;
    PortState_t PORT_ST;
#

It has an ID enum for the stunner already.

#

So it might just kind of apply that ID erm, if no joypads are selected in the menu?

#
                    PS_TYPE_SEL: begin
                        if (MD_ID == 4'hB)
                            PORT_ST <= PS_DPAD_0;
//                        else if (MD_ID == 4'hD)
//                            PORT_ST <= PS_MD_0;
                        else if (MD_ID == 4'h3)
                            PORT_ST <= PS_MOUSE_0;
                        else if (MD_ID == 4'h5)
                            PORT_ST <= PS_ID5_0;
                        else if (MD_ID == 4'hF || 4'hA)
                            PORT_ST <= PS_NOTHING_STUNNER;
                        else 
                            PORT_ST <= PS_END;
                    end
                    
                    //Nothing Detected or Stunner
                    PS_NOTHING_STUNNER: begin
                        OREG_DATA <= {MD_ID,4'b0000};
                        OREG_WRITE <= 1;
                        PORT_ST <= PS_NEXT;
                    end    
mortal mist
#

Yes

rich violet
#

I think it was reported for single + original timings

untold cloud
#
        "P2OFH,Pad 1,Digital,Off,Wheel,Mission Stick,3D Pad,Dual Mission,Mouse;",
        "P2OIK,Pad 2,Digital,Off,Wheel,Mission Stick,3D Pad,Dual Mission,Mouse;",
ripe valley
#

@mortal mist I will recheck later.
Not at home at the moment, just checking your messages from last hour.

untold cloud
#
.JOY1_TYPE(status[17:15]),
#

After all these years, the CONF_STR is still super confusing.

#

There is a newer thing now, where you can just specify the bits directly.

#

eg...

#
"P2O[17:15],Pad 1,Digital,Off,Wheel,Mission Stick,3D Pad,Dual Mission,Mouse;",
#

(that relates to which bits of the "status" bus main MiSTer will tweak, depending on how you set the menu option.)

#

"Pad 1" will be the label that appears as the menu option.

For the "Digital" setting, status[17:15] will be 0.

#

For "Off", status[17:15] will be 1, etc.

#

Presumably, the "Off" thing, will actually apply the ID for the Stunner light gun.

mortal mist
#

@rich violet latest stable core , single sdram , works fine

untold cloud
#
                    PS_ID1_4: begin
                        MD_ID <= {|JOY_DATA[3:2], |JOY_DATA[1:0], |JOY_DATA[15:14], |JOY_DATA[13:12]};
                        PORT_ST <= PS_TYPE_SEL;
                    end
                    
                    PS_TYPE_SEL: begin
                        else if (MD_ID == 4'hF || 4'hA)
                            PORT_ST <= PS_NOTHING_STUNNER;
#

(some code removed, for clarity)

#

I'll just have to add that to SnargleFlap, and see what MD_ID is, with the pad1 menu option set to "Off".

#

That sounds right, though, for using a light gun via SNAC?

#

@ジェイ - When using a light gun via SNAC, you have to set the Pad 1 or Pad 2 menu option to "Off", yep?

thorn pagoda
#

i thought the option in the menu was labelled snac not off

untold cloud
#

Oh. Dunno.

rich violet
untold cloud
#

Maybe the SNAC and Off options, both give the same ID?

#

I can probably check that, after this first compile.

thorn pagoda
#

could be but snac also works for regular pads so.... not sure

untold cloud
#

Yeah.

#

Going for a compile now, just to see what it sets MD_ID to, for various menu settings.

#

If it does force the ID to the Stunner, when set to "Off", then that could be ideal.

#

I have it set to always shove the H/V coords into VDP2 atm, on every Vblank.

#

But not sure about that polling reg thing.

#

Srg's famous lack of comments makes it tricky. lol

#
if ({A[8:1],1'b0} == 9'h002 && !REGS.EXTEN.EXLTEN) begin    //EXTEN
#

I mean, the EXTEN thing relates to the register flag it's checking. But I don't know what the Address 002 thing is.

#

Oh, maybe it actually IS the EXTEN "register".

#
                    case ({A[8:1],1'b0})
                        9'h000: REGS.TVMD <= DI & TVMD_MASK;
                        9'h002: REGS.EXTEN <= DI & EXTEN_MASK;
#

That's for a Write. ^

#

Fair enough.

wise brook
#

sorry feeding baby

untold cloud
#

For SNAC, it must be reading the actual ID from the controller / light gun.

#

I need to force an ID for the light gun, without one being hooked up, so I reckon the Off setting might work for that.

thorn pagoda
#

yeah, seems like it should work however strange that may be, from the code you've shown

untold cloud
#

OK, confirmed how that works now...

thorn pagoda
#

might want to refactor that before an MR though 😄

clear condor
#

The Stunner is somewhat unique in that it only talks to the Saturn via SH2 Direct

wise brook
untold cloud
#

That might do it.

#

Should both be done as a proper override thing...

#
    if (EMU_LG_ENA) begin
        // Emulated light gun support...
        //
        // With real a light gun (above), it auto-latches the coords into HCT and VCT.
        //
        // For the emulated light gun, I'm latching the "Analog" coords from HPS_IO, on every VBlank. EA
        //
        if ((H_CNT==VBL_HPOS-1) && (V_CNT==VBL_START-1) && REGS.EXTEN.EXLTEN) begin
            REGS.HCNT.HCT = {~JOY1_X1[7],JOY1_X1[6:0]};
            REGS.VCNT.VCT = {~JOY1_Y1[7],JOY1_Y1[6:0]};
            REGS.TVSTAT.EXLTFG <= 1;
        end
    end
    else if (!EXLAT_N && EXLAT_N_OLD && REGS.EXTEN.EXLTEN) begin    //EXTEN
        // Real (SNAC) light gun support. Srg320.
        REGS.HCNT.HCT = {H_CNT,DOTCLK_DIV[1]};
        REGS.VCNT.VCT = LSMD == 2'b11 ? {VCT,~ODD} : {1'b0,VCT};
        REGS.TVSTAT.EXLTFG <= 1;
    end
#

So whenever EMU_LG_ENA is High (will eventually work as one of the menu options), it shoves the emulated HV coords into the regs, and sets the EXLTFG flag, on every Vblank.

#

Probably not good to just continually set that flag, as it could trigger a constant interrupt or something, and break stuff (tm).

#

I don't even think I'm doing the signed-to-unsigned thing properly atm. Oh well.

thorn pagoda
#

gotta start somewhere 😄

#

there's a couple of buttons on the stunner too btw

wise brook
#

just trigger and a second button

#

an a and b so to speak

untold cloud
#

Copying Virtua Cop to the SD card via ssh atm.

#

That's just how I roll.

#

Buttons? Who needs buttons? lol

wise brook
#

You might need one to hit start

untold cloud
#

I'm not expecting this to work first time, btw. 😉

wise brook
#

Can’t quite recall off top of my head

untold cloud
#

True

#

Not sure how to hook that up atm, with Buttons + light gun HV.

#

It would likely map the buttons OK in Digital mode, but not in "Off" mode.

#

So will need a tweak for that.

thorn pagoda
#

yeah i'm not sure if you can get past the title screen without the button hooked up heh

#

i think it'll let you shoot the screen though?

wise brook
#

might just have to hot swap controller types

#

or use player 2 pad

untold cloud
#

Not sure hot swapping will work, but maybe.

#

I see what you mean - the game might not be reading the ID constantly, only at start-up.

thorn pagoda
#

oh it does read it constantly

#

i know because my snac->saturn adapter only works if its in a tiny-tiny sweetspot so its almost never right when i first start the game

wise brook
#

true

#

I need Greg from LazarBear to make 3-D printed new ones. I’d happily play treble going rate for a good connector.

thorn pagoda
#

porkchops fixed it on his now - last few batches iirc

untold cloud
#

I just bought a Saturn light gun.

#

£15, free shipping.

#

Just a Predator Logic 3.

thorn pagoda
#

the sega one?

untold cloud
#

I'm assuming it uses the same ID? lol

thorn pagoda
#

ah right yeah the others can be a bit cheaper

#

i think so? saturn only has 1 kind of lightgun afaik

untold cloud
#

This one.

thorn pagoda
#

i'd guess that just uses the same protocol as the official one but i really have no idea

#

i know on psx there are multiple protocols so it matters what gun you get but i dont think its true on saturn

clear condor
#

Yeah, some of the cheapo third-party guns offer three modes: "PS1 Normal", "PS1 GunCon", and "Saturn"

#

with the first two managed by a switch somewhere on the gun or plug

sturdy dagger
#

I think I had the lightgun above. I just don't own a crt.

untold cloud
#

Gonna have a pizza (Dominos - don't judge me. lol)

#

Then have another look at this later.

wise brook
#

You’ve absolutely earned it

sturdy dagger
#

Hopefully Dominoes have some good offers available

warped saddle
#

since I've eaten pizza in the UK before, there's no point in judging anyone there for eating dominoes

cunning citrus
#

You need the gun button to start the game and enter menus, you navigate the menus with the trigger, on screen moves cursor down, off screen moves up. Virtua Cop 1 and 2 are like this, can't recall if all lightgun games do the same though.

thorn pagoda
#

you can get good pizza in the uk but not easily

untold cloud
#

But, when a pizza already costs about £20, it's the illusion of a discount.

#

I only order takeaway about once every 3 months, though.

#

To be fair, you still get more "food" for your money, even with the ridiculous prices of Dominos in the UK.

#

vs McDonald's, which used to be cheap, and have the 99p saver menu.

#

Now, it's like £6.50 for a fecking Breakfast roll, and a coffee.

inner token
#

when you plug a stunner in you get A0 for that port in the OREG so you have to fake it there to make the game think a stunner is connected, then it uses sh2 direct mode for the sensor and buttons. so hook into PDR in the core in SMPC

#

sat tech notes is the only doc with any info

sturdy dagger
#

I miss my 99p burgers

inner token
#

Ash regular saturn guns work, people want the other usb options

wise brook
#

he wants the gun for testing

inner token
#

sure for "testing" 😄 Virtual Cop

#

was just making sure he knew what you guys wanted

wise brook
#

it’s such a good game

#

and i mean that in a big way, scoring, multipliers, pacing, how the ost sets the mood and tempo

thorn pagoda
#

the graphics are so iconic too

wise brook
#

Time Crisis, several years later, comes in with amazing set-pieces and spectacle. and “wins” the internet nostalgia machine.

but as a game, mechanically it takes a back seat to what it was copying

#

by which point VC2 had already raised the bar

#

gotta admit tho, that foot pedal slaps

thorn pagoda
#

i feel like the foot pedal makes it a totally different kind of game

wise brook
#

yeah, closer to another genre

thorn pagoda
#

like unreal tournement vs gears of war

clear condor
#

The cover mechanic was just enough extra complexity

mortal mist
#

No , hdmi

clear condor
#

Shooting is fun, but if your game is just "shoot thing to win", it gets old quickly (unless it's Duck Hunt for some reason)

wise brook
clear condor
#

The first TC will time you out if you cover too conservatively. Subsequent entries don't seem as urgent

polar mountain
wise brook
#

the death of arcade philosophy

mortal mist
clear condor
#

I've actually... never played VC1, VC2, or HotD1 🙈

#

that's part of why I'm so stoked about this

wise brook
#

or any of the later entries?

clear condor
#

I've played House of the Dead 2 and Typing of the Dead

wise brook
#

delightful

thorn pagoda
#

hotd1 is disappointing compared to hotd2 ngl

clear condor
#

I figured as much, since GOLDMAN! isn't in it

thorn pagoda
#

its still fun but hotd2 is almost perfect

wise brook
#

Sega AM3, later Wow entertainment are arguably better than AM2 if much more unsung

clear condor
#

hotd2 has lots of frustrating bullet sponges, especially compared to Time Crisis (an actually perfect game)

wise brook
#

it’s even more an icon than the spencer mansion

thorn pagoda
#

thats fair, the end boss of hotd2 is bullshit

clear condor
wise brook
thorn pagoda
#

i like how the altnerate routes make it feel more exploration-ish with each playthrough

clear condor
#

I have not. I watched the Sega Rally one and then thoroughly enjoyed Sega Rally afterward

inner token
wise brook
#

Patreon: https://www.patreon.com/pandamoniumnick
Ko-fi: https://ko-fi.com/pandamoniumnick
This is a journey through time analyzing the history of Virtua Cop, its Saturn port, and revelations on why Sega's 5th gen console performed the way it did. You will see source material that you cannot find anywhere else — woven into a tale straight from th...

▶ Play video
clear condor
#

Virtua Cop has innocents, right?

thorn pagoda
#

yeah

wise brook
#

yuuuup

#

and i hate them

thorn pagoda
#

they're very well signposted though, there's always an audio cue

clear condor
#

that's always a nice way to make it interesting - cf Area 51, Lethal Enforcers

thorn pagoda
#

much less annoying than in most games

wise brook
#

i dunno, hearing them say “help me” and accidentally shooting them is the opposite of my happy place

#

oh yeah

clear condor
#

Is Saturn gun-time pretty much those three - VC1, VC2, HotD?

thorn pagoda
#

those are the highlights for sure

#

i think there are one or two more

wise brook
#

you kinda know you can expect panda to go into great detail on the game, this was able to flesh out the lore which was hidden behind the language barrier until he and samiam translated its support materials

mortal mist
polar mountain
mortal mist
#

Digital dv, now i'm checking analog

#

Need few sec

#

Analog

#

Tested on three de10 nano

celest lake
#

yellow dots in his hair!

muted cradle
#

Reflecting room lights on the photo?

celest lake
polar mountain
#

A problem with my tv?

mortal mist
#

I am not saying that this problem does not occur for you. I just can not reproduce it

#

I've had the situation several times that something was wrong, and everyone wrote “it works for me” 😄

celest lake
#

Kuba’s mister is magic