#Sega Saturn

1 messages ยท Page 85 of 1

untold cloud
#

It works like I thought, but also not...

#

Can't remember the channel name atm, but the laser guy did a teardown of the 3DS screen.

thorn pagoda
#

its a nice console to softmod, with the DS BC and all

untold cloud
#

I didn't realize the parallax part was also layer of LCD lines, which is how they made it adjustable.

#

I always thought they just sacrificed half of the horizontal res, when not in 3D mode.

#

But it's smarter than that.

thorn pagoda
#

i like how the new 3ds used eye tracking to like, make the sweet spot follow your head

copper furnace
thorn pagoda
#

did it just work correctly and then suddenly stop?

untold cloud
#

#share-media message

#

Found it. ^

copper furnace
untold cloud
#

Another non-surprise... with Dual Lightguns, the core no longer fits.

wise brook
#

oh god

untold cloud
#

It might have fit before, but somebody just added Cropping and Scaling. ๐Ÿ˜›

mortal mist
untold cloud
wise brook
#

probably still doable, but gosh itโ€™s gonna be tight ๐Ÿคž

warped saddle
#

time to ifdef that alsa code out

thorn pagoda
#

does the saturn core still have scandoubler in it?

untold cloud
#

Can't see any obvious issue with the menu / status bits.

#
en216p <= ((HDMI_WIDTH == 1920) && (HDMI_HEIGHT == 1080) && !forced_scandoubler && !scale);
#
.CROP_SIZE((en216p & vcrop_en) ? 10'd216 : 10'd0),
thorn pagoda
#

scandoubler can be removed if it is, there's precedent for that (n64, psx)

untold cloud
#

But vcrop_en gets AND'ed with en216p. If that means anything?

noble escarp
#

AFAIK, only on Reflex Adapt and on my DIY adapter

mortal mist
#

scandoubler is not active

untold cloud
#

I think the 2160p mode can only be enabled via MiSTer.ini ?

mortal mist
#

would not even fit , I checked

#

its crop size

#

216p

untold cloud
#

It's just... that code above, looks to assert en216p when the HDMI res is 1080p?

mortal mist
#

i use free bits

#

61

untold cloud
#

Yeah, the status stuff looks OK to me.

mortal mist
#

there is no conflict

thorn pagoda
#

is it worth wiping core config and retrying

#

maybe its one of those fuzzy old-config issues

untold cloud
#
`ifndef MISTER_DISABLE_ALSA
    .ch0_addr(alsa_address),
    .ch0_burst(1),
    .ch0_data(alsa_readdata),
    .ch0_req(alsa_req),
    .ch0_ready(alsa_ready),
`endif
mortal mist
#

my second mister, I can do this indefinitely, it always comes back to the correct option

untold cloud
#

ALSA be gone!

`define MISTER_DISABLE_ALSA 1
wise brook
#

so whatโ€™s that?

thorn pagoda
#

alsa? it lets the linux side feed audio into a core

#

mainly for midi stuff i think

wise brook
#

mmm, so mt32 pi stuff

warped saddle
#

no

thorn pagoda
#

nah that runs off snac, this is for like when you run munt on the arms

warped saddle
#

the top300 image used it to play mp3 soundtracks for doom

thorn pagoda
#

heh nice

wise brook
#

i was about to ask for an example

#

good to know

thorn pagoda
#

i dont think it'll be missed on saturn, good call zakk

untold cloud
#

AFAIK, there is only one 32-bit wide "port", which allows the ARM and FPGA side to communicate.

#

Which is what MiSTer uses for most of it.

#

But you can also write stuff to an area of DDR3 on the Linux side, and read it on the FPGA side, and vice-versa.

#

The ALSA module uses that, by reading a chunk of audio samples from DDR3, that the ARM Linux side has written there.

#

So the ALSA thing can mix that with the core's own audio, and out to HDMI and Analog / I2S DAC.

#

(there is also AXI, which is like ARM's version of PCI, which is capable of transferring with VERY high bandwidth, but I don't know of any cores that use that. Sorg found it a bit too unstable when switching between cores.)

#

It's a bit disappointing that they didn't add a few extra 32-bit internal IO ports, tbh.

#

It really wouldn't have taken them much at all.

#

So almost all of the comms between ARM and FPGA goes over the same 32-bit bus, including Disk/Cart/Tape/ROM loading, OSD, and CD drive handling.

#
// HPS will not communicate to core if magic is different
wire [31:0] core_magic = {24'h5CA623, core_type};

cyclonev_hps_interface_mpu_general_purpose h2f_gp
(
    .gp_in({~gp_out[31] ? core_magic : gp_in}),
    .gp_out(gp_out)
);
#

Pretty much just that. lol

#

The main MiSTer app on the ARM side knows if a core is loaded (FPGA configured), if it can read the magic number.

#

That lets you load a new RBF (or via MRA), or load a SOF via USB Blaster, and the main MiSTer app will just keep polling, until the FPGA is ready again.

#

ASCAL uses DDR3 for the framebuffers, for the HDMI upscaling etc.

#

It's possible for the MiSTer app to take a screenshot, by reading the same chunk of DDR3.

#

And yes, it's even possible to stomp all over the Linux memory area, if you do something silly in a core. lol

#

The HPS_IO block is used to handle a lot of the ARM<->FPGA comms.

#

It's a bit of a throwback to the SPI block used on the MiST / Minimig core.

#

With basic command bytes, which allows the ARM app to read/write stuff.

#

So it can shove things like the Keyb, Joystick, Mouse values into the core.

#

Or write to the OSD block(s), which use around 4KB each (VGA/RGB, and HDMI OSD blocks), as a simple bitmap.

#

So the ARM app really does only handle the higher-level IO stuff.

#

After that point, the core is pretty much on its own.

#

I had a coffee earlier.

#

omg, it compiled.

mortal mist
untold cloud
mortal mist
#

ok compostie blend will fit ๐Ÿ˜„

untold cloud
#

I don't get it...

#

STILL have gfx layers missing. Grrrrrrrrrrr

#

Trying not to ragequit.

#

I've done about 30 compiles this week, and it's getting a bit old.

mortal mist
#

How long does it take you to compile the core ?

untold cloud
#

oh, ofc is compiled - I commented out the second Lightgun instance earlier. sigh

#

35 minutes, 16 seconds.

#

On my slightly older (stock) 3700X, with 16GB.

mortal mist
#

I would very much like it to take 1 minute ๐Ÿ˜„

untold cloud
thorn pagoda
#

still somehow faster than ao486

untold cloud
#

RAM is only 3200 MHz. I think I bought faster stuff, but it wasn't reliable, or something.

#

I've worked on cores that only take around 15 minutes, and that's bearable.

#

Anything above 20 mins, and it's just awful. lol

#

I used to compile stuff on the ol' Q6600. Some cores would take over an HOUR.

thorn pagoda
#

jeez i just realized if we get a bigger fpga someday build times are going to get even longer

untold cloud
#

I have this old Dual Xeon workstation (HP Z800) on the bench atm. Waiting for a PSU.

Just messing with it really, but I'm holding onto the idea that it might be faster for Quartus.

#

Even though I know it won't be. lol

#

Each Xeon core is less than HALF the speed of this 3700X, apparently.

thorn pagoda
#

a big part of the build is single core limited iirc

untold cloud
#

Yep, Quartus really sucks for taking advantage of more cores.

#

But I heard that it compiles faster, with the later gen Intel CPUs?

mortal mist
#

for me it's about 28min

untold cloud
#

The only way to really do this more quickly, short of buying the World's fastest workstation, is to partition the design.

#

And use a smaller FPGA for the part of the logic you're working on.

#

And the bulk of it on a larger FPGA.

#

With enough IO between them, to transfer what you need.

#

Or... just run far more stuff via simulation.

#

Even if the sim can't run "realtime", it translates Verilog into a C model VERY fast.

#

For the DC PVR tests, Verilator runs in about ONE second.

thorn pagoda
#

or just wait for faster CPUs to get cheaper which seems to be working kind of ok so far, its steady anyway

untold cloud
#

I think it's mainly just that Quartus sucks. lol

thorn pagoda
#

isn't there some like $50k a year version of quartus that can do part-recompiles

untold cloud
#

I can understand that parts of the compile (synthesis) process are probably hard to parallelize, but it still sucks.

#

When Intel bought altera (even though Intel have made the chips for them for decades), I stupidly thought they would do a ton more work to improve Quartus.

#

Then again, I haven't tried the very latest version, which is like 22 or 23 now.

#

There is the Partition and Smart recomp thing, yeah. I don't know how much faster it could be.

#

One of the main reasons I built a 5900X as well, is to help with compiles and simulation.

#

I need to swap the two PCs around soon, so I'm at least using the better one.

#

(since I swapped the rooms around, I ended up using the older 3700X, and kinda stuck with it)

#

I talk too much.

#

I see what happened now...

#

When some of the menu / status bits were overlapping earlier.

#

The main MiSTer app defaults those to OFF, if the CONF_STR has changed since the last time it ran the core.

#

(ie. If the mapping of some of the status bits changed, vs which line they appear on the menu.)

thorn pagoda
#

oh i always wondered how that works

untold cloud
#

The main MiSTer app on the ARM, has to read in the entire CONF_STR from the core, when it first loads.

#
    wire       gun_p1_xy_mode    = status[46];
    wire       gun_p1_btn_mode   = status[47];
    wire [1:0] gun_p1_cross_size = status[49:48];
#

The bits set in the CONF_STR (menu items) just tells the app which bits of the "status" bus to twiddle, based on the choices for each menu option.

#

So, most of the time, main MiSTer doesn't need to know (or care) what those bits actually do.

#

It only cares when it's an option to Load a File, and specific things like that.

#

It's quite clever, because it keeps the majority of the cores more generic.

thorn pagoda
#

yeah and its doing like, something sensible for new unknown settings

untold cloud
#

(for many years, you had to choose the Letter that relates to the status bit number, which really really really really sucked.)

#
    // Status Bit Map:
    //             Upper                             Lower              
    // 0         1         2         3          4         5         6   
    // 01234567890123456789012345678901 23456789012345678901234567890123
    // 0123456789ABCDEFGHIJKLMNOPQRSTUV 0123456789ABCDEFGHIJKLMNOPQRSTUV
    // XXXX XXXXXXXXXXXXXXXXXXXXXXXXX     XXXXXXXXXXXXXXXX X  XXXXXXXXXX
#

Worst of all - the entry in CONF_STR used either a lowercase or uppercase "o". lol

#

Now you can just use "P2O[46]" etc.

#

"Page 2... Output on status bit [46]".

#

Page 2, just means "Plonk these menu entries on a separate page of the OSD".

#

The MiSTer app does detect overlapping bits, too.

#

I should probably check the output more often.

#

And the way you do that is...

#

Log in via SSH, do a "killall MiSTer", then run it again. lol

#

Ok, that's weird.

#

It's never done this before.

#

Seems to get stuck, and doesn't display all of the info.

#

I think that's my queue to quit for the night. lol

warped saddle
#

debug=1 in mister.ini

untold cloud
#

Ohhh. WHY, Sorg? Whyyyyy. lol

thorn pagoda
#

oh yeah debug=1 is newish

untold cloud
#

All those years, it output the stuff.

#

sigh

thorn pagoda
#

the terminal output was actually messing stuff up

#

when there was too much

warped saddle
#

because it is normally attached to a serial console and it it too slow and it stalls main

thorn pagoda
#

yeah

#

also it wasn't sorg who came up with that it was someone else ๐Ÿ˜„

untold cloud
#

THAT's better.

#

I don't see any real reason to hide that stuff. lol

#

Most people won't ever see it.

#

But devs often need it.

thorn pagoda
#

it caused issues for users including slow video resolution transitions

#

and dropped controller inputs

untold cloud
#

Fair enough.

#

Even printfs slow down C code quite a bit, especially over serial.

#

It's just... it's nice to have an extra thing to worry about. ๐Ÿ˜›

thorn pagoda
#

yeah and some of the output was like, just insanely verbose

#

like reprint the entire ini

untold cloud
#

I just saw that - that's pretty rough.

#

It only really needs to parse the INI, and show any errors.

thorn pagoda
#

so yeah, off by default now ๐Ÿ™‚

untold cloud
#

OK

#
INFO: Video resolution: 352 x 240, fHorz = 15.7KHz, fVert = 59.8Hz, fPix = 7.16MHz, fVid = 57.27MHz
INFO: pr = 8, de_h = 384, de_v = 16
INFO: Frame time (100MHz counter): VGA = 1671508, HDMI = 1666118
INFO: AR = 128:105, fb_en = 0, fb_width = 0, fb_height = 0
#

Virtua Cop. ^

#

Even stuff like that is useful.

#

'tis also shown in the OSD, though.

#

Bring up the menu, then hit Left.

thorn pagoda
#

oh yeah i could've just checked that earlier

#

my arms are tired from shooting so much today, you've been developing even longer than i've been shooting heh. don't forget to take a break. you already made my sunday

untold cloud
#

Thanks. ๐Ÿ˜‰

#

Gonna get some food. I feel the need... the need for Cheese.

untold cloud
#

Menu options will be grouped together later.

#

So the LGun options, with their respective Pad / port setting.

#

And the Lightgun stuff will also get grey-out, unless Virt LGun is set.

#

And now the Crosshairs logic becomes more complex.

#
    .R((lg_p1_target && lg_p1_ena && (~&status[44:43])) ? {8{lg_p1_target[0]}} : R),
    .G((lg_p1_target && lg_p1_ena && (~&status[44:43])) ? {8{lg_p1_target[1]}} : G),
    .B((lg_p1_target && lg_p1_ena && (~&status[44:43])) ? {8{lg_p1_target[2]}} : B),
#

No point replicating the logic there.

#
wire lg_p1_targ_draw = lg_p1_target && lg_p1_ena && (status[49:48]==2'd0);
wire lg_p2_targ_draw = lg_p2_target && lg_p2_ena && (status[60:59]==2'd0);

.R(lg_p1_targ_draw ? {8{lg_p1_target[0]}} : lg_p2_targ_draw ? {8{lg_p2_target[0]}} : R),
.G(lg_p1_targ_draw ? {8{lg_p1_target[1]}} : lg_p2_targ_draw ? {8{lg_p2_target[0]}} : G),
.B(lg_p1_targ_draw ? {8{lg_p1_target[2]}} : lg_p2_targ_draw ? {8{lg_p2_target[0]}} : B),
#

Tada!

#

Works as a priority encoder.

#

So the colour (p1 target) will always be drawn on top of the p2 target.

wise brook
untold cloud
#

P1 crosshair set to Red.
P2 as Green.

#

Could add the colour choice to the OSD, but it's a waste of status bits

#

[127:0] status

#

status bus does have 128 bits, but I'm not sure if you can directly access them.

warped saddle
#

you can

untold cloud
#

Ahh, thanks.

#

I wish I'd remembered that earlier. lol

#

Don't see many cores using more than 64 bits.

#

#ultra64

thorn pagoda
#

hey nice it built with 2p support?

untold cloud
#

It did, but I forgot to change some status bits, so the Crosshair doesn't work.

#

It's really hard to make a "neat" PR.

#

And I don't yet know if Dual Lightguns will work properly.

thorn pagoda
#

i dont mind the crosshair not working if you want me to test

untold cloud
#

It seemed to register each player before, with a different colour "splodge" in Virtua Cop.

#

But I'm not 100% sure it will actually work with separate XY control for each.

#

Might be some other bits broken in that RBF.

#

I said "2X" instead of "Dual" in the filename, to not confuse with the Dual SDRAM thing.

#

That RBF is the Single SDRAM core, so should work on all setups.

thorn pagoda
#

brb then

untold cloud
#

You might find one Virt Lightgun only works when enabled on Pad 2, with Digital pad on 1.

#

Or vice-versa. lol

thorn pagoda
#

Nice one - they work

#

Using a light gun on both ports

untold cloud
#

Awesome, thanks. ๐Ÿ˜‰

thorn pagoda
#

The crosshair isnโ€™t working so I canโ€™t tell about the horizontal offset thing

untold cloud
#

np

#

Next compile should fix that, if it doesn't crash.

thorn pagoda
#

Having too much fun in virtua cop anyway lol

untold cloud
#

Was that a pair of GunCon 3's?

thorn pagoda
#

Pair of retroshooter3s

untold cloud
#

OK

thorn pagoda
#

Wickerwaka added support yesterday so this is basically like Xmas lol

untold cloud
#

So those probably emulate analog joystick, then.

#

Ahh. hehe

thorn pagoda
#

Yeah joystick mode

untold cloud
#

Mr Martin

thorn pagoda
#

Me rn

untold cloud
#
OREGs...

Digital Pad on both ports...
F1 02 FF FF  F1 02 FF FF

Virt LightGun on Pad 1, Digital on Pad 2...
A0 F1 02 FF  FF F0 FF FF

Digital on Pad 1, Virt LightGun on Pad 2...
F1 02 FF FF  A0 F0 FF FF

Virt LightGun on both...
A0 A0 F0 FF  A0 F0 FF FF
#

Not quite sure how to interpret that.

#

But since the LG ID = 0xA0, I think the lower nibble denotes how many Bytes follow it.

#

No extra bytes after 0xA0, as it's a "simple ID".

#

That's why the F1 02 gets shuffled along, with the LG on Pad 1, and Digital on Pad 2.

#

Probably.

#

@inner token Does that sound correct?

#

Looks like the actual detection in the SMPC is OK.

#

But there is a weird issue, when you have Virt LG on Pad 1.

#

In Virtua Cop, on the Gun Adjust menu, both cursors either side (for P1 and P2 guns) flash.

#

And looks like one is flashing at half (or less) of the rate of the other.

#

Like it's checking the LG stuff during Vblank, but only half as often for the other LGun.

#

Even though there is only one LG actually enabled.

#

Could just be the way the game is, as it maybe forces the Digital pad on Pad 2 as a second "light gun" ?

#

Maybe that is a bit wrong.

#

Digital on Pad 1, LG on Pad 2, and it puts the 0xA0 in the FOURTH byte along.

#

Which is how I thought it worked originally.

#

ie. Each "half" of the OREGs assigned to each player.

#

Gonna chill for a bit. This is super tiring.

thorn pagoda
#

Dual wielding light guns is actually really hard lol

#

I never knew if you start virtua cop 2 with the lightgun in port 2 you play as the lady cop

untold cloud
#

I was mostly using it on port 2 as well, and never even noticed. lol

clear condor
#

Whoa!

#

You're great!

untold cloud
#

Freddo, right now ^

#

Crosshairs still broken.

#
        "D6P2O[49:48],LGun P1 Crosshair,Small,Medium,Big,None;",
#

You don't generally see menu options where 3 == none.

#

Nearly impossible to calib without the Crosshairs.

#

Recompiling... for the 400th time

inner token
#
F1 02 FF FF  F1 02 FF FF

Virt LightGun on Pad 1, Digital on Pad 2...
A0 , F1 02 FF  FF

Digital on Pad 1, Virt LightGun on Pad 2...
F1 02 FF FF , A0

Virt LightGun on both...
A0 , A0```
#

those are the only bytes that matter, the rest don't matter and can be leftovers from something you had connected before. like mission pad uses alot of bytes, if you had it selected before you switched to LG some of the mission pad bytes would still be there

untold cloud
#

OK, thanks. That clears it up a lot.

#

So, if you had both LGs enabled, you'd expect to see the 0xA0 then 0xA0 right after, yep?

#

oic, yeah.

#
F1 02 FF FF
#

ID, then "Two bytes follow"?

#

Or, the lower nibble of the first byte, denotes it's an extended packet, erm, something.

inner token
#

f1 = port status, 0 2 nibble is datasize. and the data FF FF changes with button presses

untold cloud
#

OK, that looks good then.

#

Other issues with the LG, might be to do with the actual SMPC implementation.

#

Or the way it's clearing the "Light" flag, for each player.

#

But it's mostly working now.

#

I guess if it were really broken, Freddo wouldn't have been able to use the tracking, with both guns at once.

#

Might have a snooze for a while.

#

Thanks everyone, for your help. ๐Ÿ˜‰

ebon oracle
#

Hi everyone ! I am not new to Mister but am new to the Discord channel. I am super excited with the possibility of playing Sega ST-V games. I have downloaded the nightly build already that supports it but it looks like I need additional MRA files in order to actually play these games ? Can anybody give me some direction on the correct way to setup these ? Trully appreciate it.

high bramble
#

#1046941029296779344 message

naive whale
#

There you go. Directions are in the github page

ebon oracle
naive whale
naive whale
warped saddle
#

unless you enjoy loading things and watching them boot into black screens

#

I'm not here to shame

visual grove
#

Blessed black emptiness like my soul

high bramble
#

One time I booted and got a green screen.
I could barely contain myself.

visual grove
#

You almost died..hard

celest lake
#

sometimes the void is preferably to everything else

#

we donโ€™t kinkshame

high bramble
#

I shame. That's my kink.

naive whale
high bramble
#

So that means you can't kinkshame my shamekink.

naive whale
#

I donโ€™t want to die walking out of a cold pool thatโ€™s for sure

high bramble
#

Damn... beat me to it. ๐Ÿ˜„

celest lake
#

honestly we lost a little bit of our humanity when they shuttered vine

high bramble
#

Kinkception.
Well played...

untold cloud
#

Both crosshairs working.

wise brook
#

heck yeah

untold cloud
#
        "P2,Input;",
        "P2-;",
        "P2O[27],Pad 1 SNAC,OFF,ON;",
        "P2-;",
        "D5P2O[17:15],Pad 1,Digital,Virt LGun,Wheel,Mission Stick,3D Pad,Dual Mission,Mouse;",
        "P2-;",
        "D6P2O[46],LGun P1 XY Ctrl,Joy 1,Mouse;",
        "D6P2O[47],LGun P1 Buttons,Joy 1,Mouse;",
        "D6P2O[49:48],LGun P1 Crosshair,Small,Medium,Big,None;",
        "P2-;",
        "P2-;",
        "P2O[20:18],Pad 2,Digital,Virt LGun,Wheel,Mission Stick,3D Pad,Dual Mission,Mouse;",
        "P2-;",
        "D7P2O[57],LGun P2 XY Ctrl,Joy 2,Mouse;",
        "D7P2O[58],LGun P2 Buttons,Joy 2,Mouse;",
        "D7P2O[60:59],LGun P2 Crosshair,Small,Medium,Big,None;",
#

Scrolling past the Wheel setting, still quits out of menus, or sometimes back to the CD player app.

#

Not sure why that happens. It's either triggering some button combo, or something in the SMPC doesn't like it.

#

ie. It was doing that before I added any of the Lightgun stuff.

#

The Lightgun menu options are grey-out, unless you select "Virt Lgun" for the Pad 1 or Pad 2 option.

#

P1 crosshair is Red.

#

P2 crosshair is Green.

#

That's currently hard-coded.

#

Enabling SNAC greys out the Pad 1 settings, which I think could be worth adding to other cores that are able to use SNAC.

#

There is no "Off" option for Pad 1 nor Pad 2 now. The Virt LGun has replaced that.

wise brook
#

with this update you can now play Policenauts on the big screen and with a gun in pad 2.

#

while snac, which is currently stuck to pad 1 canโ€™t.

untold cloud
#

Some combinations of LGun and standard controller might not work. Needs some testing.

#

oic, yeah, some games expect the LG on port 2.

#

SNAC could easily be mapped to either port, btw.

#

Another tweak. lol

#

So the menu option would just be SNAC: Disabled, Pad 1, Pad 2.

#

Ohh, I know - could just add SNAC to the controller "Type"... no, that won't work.

#

Can't allow SNAC to be applied to both joyports at once.

#

Two ports, One SNAC.

#

It would be like a Pam Anderson boating video.

median tartan
#

I have a Saturn Controller I want to test out. Anyone know a game that uses the L and R buttons?

wise brook
#

ninpen manmaru

#

bulk slash

thorn pagoda
#

amazing work btw! PR time?

untold cloud
#

I'm a little bit worried it looks like I've changed too much at once.

#

But most of it is for the Lightgun stuff.

#

I also changed the CONF_STR, to use the newer-style bit selects.

#

I'm fairly certain they are correct, but I need to triple-check.

#

Then I guess just do the PR, and see if I get "Sorg'ed" or not.

thorn pagoda
#

srg does the merges for saturn he seems a bit kinder ๐Ÿ™‚

untold cloud
#

PR done.

#

Not sure if I wrote too much, or too little in the PR. lol

#

I really hope there isn't some Saturn audio which is passed via ALSA.

#

I don't think there is?

#

Anyway, let's see what happens.

#

I was gonna say "This took over 30 Quartus compiles to get working, please be gentle..."

#

Forgot the commits were done via my JAMMIX account. Oh well.

warped saddle
#

no, nothing should be using alsa

#

it requires you to run an audio playing app on the linux side

untold cloud
#

Yeah. Just in the back of my mind, I thought maybe somebody added some weird esoteric extra sound chip emulation. lol

warped saddle
#

no, that'll be ST-V, lol

untold cloud
#

I just simplified the Crosshair logic a tiny bit, as it didn't look great before.

#

I think he might not like the fact that the core is using 99% now.

#

Might try to get the spoofer working, for Radiant.

#

But I expect it checks the Protection IC far more often, between each stage, or multiple times each stage.

#

No way I'm good enough to play the game, to test that theory.

#
  //SCU
  bit  [24:0] CA;

  assign STVIO_CS_N = ~(CA >= 25'h0400000 && CA <= 25'h040007F && ~CCS0_N && CART_MODE == 3'h5);
  assign STVPROT_CS_N = ~(CA >= 25'h4fffff0 && CA <= 25'h4ffffff && ~CCS0_N);
#

Need to figure out which memory range the Protection IC is in.

#

'cos the CA bus (C Bus address) from the SCU only has 25 bits.

#

And the Prot IC is clearly mapped with addr bit [26] High.

#
0x04000000    0x04FFFFFF    CS1    Cartridge 1
#

Oh, OK, it's mapped to the very end of the Cart space.

#

Technically, that's the Saturn CS1 range above, but it's the same for ST-V.

#
map(0x02000000, 0x04ffffff).rom().mirror(0x20000000).region("abus", 0); // cartridge
#

Yep, I reckon it's just the second half of that.

#
    assign STVIO_CS_N   = ~(CA >= 25'h0400000 && CA <= 25'h040007F && ~CCS0_N && CART_MODE == 3'h5);
    assign STVPROT_CS_N = ~(CA >= 25'h0fffff0 && CA <= 25'h0ffffff && ~CCS1_N);
#

Sorry, Lightguns are old news, gotta keep on movin'

#

Compiling with the Radiant spoofer thingy added.

#

It's gonna need some debugging.

#

But just seeing if I can get it to react to the Start button would be great.

warped saddle
#

what are you outputting to spoof it?

untold cloud
#

From the MAME debugger last night...

#
Radiant Silvergun...

Writing   00 to 4FFFFF1
Writing 0800 to 4fffff8
Writing 0010 to 4fffffA
Writing 7777 to 4fffffC
Writing   01 to 4FFFFF1

All subsequent reads from 4FFFFFC...

00000000 (x4)
10101010 (x4)
20202020 (x4)
30303030 (x4)
40404040 (x4)
50505050 (x4)
60606060 (x4)
70707070 (x4)
80808080 (x4)
90909090 (x4)
A0A0A0A0 (x4)
B0B0B0B0 (x4)
C0C0C0C0 (x4)
D0D0D0D0 (x4)
E0E0E0E0 (x4)
F0F0F0F0 (x4)

Repeats reading this chunk, many times...
00010203
04050607
08090A0B
0C0D0E0F

And then Writes 00 to 4fffff1
#

It doesn't even read/write anything else after that, and that's enough to get into the game in MAME.
But I'm sure it will read between stages, or multiple times per stage.

#

I'm not even checking the Writes at first.

#

Just blindly incrementing the values, every time offset 0xC is read.

warped saddle
#

I don't think it does reads other than start protection

untold cloud
#

I'm hoping so.

#

It sounds like it was a case of "We already have Cart PCBs with the protection IC on, we'll use it for a quick check for this game".

#

Type thing.

#

I just realized, I don't have SignalFlap enabled on this core.

#

Going to suck, getting it to compile again. I'll have to disable the CD drive stuff.

warped saddle
#

there's some other sega game that uses the decathlete protection chip that used it only to ask to to encrypt a static string which it then compares with a constant

#

and that's it

#

went through all the trouble of putting that thing on the game, and that's how they used it

untold cloud
#

Might not be too bad, to get a few extra games running, in that case.

warped saddle
#

oh, no this was a model2 game or something

untold cloud
#

I should probably take a day off tomorrow (today), as my brain is totally fried.

warped saddle
#

all the ones that use it on ST-V are like, decrypting graphics roms or something

untold cloud
#

Yeah.

#

I had a look at some of that stuff many years ago, with a view to doing a NAOMI cart emu.

#

Of course I never finished it. I mean, what else do people expect? lol

#

Will have to tackle that soon, when I eventually get around to building the new DC mobo.

#

At least GD Emu wasn't too bad to get running, so I can "port" that over.

copper furnace
# mortal mist

๐Ÿค”
It might have something to do with my ini-settings

thorn pagoda
#

is it okay if i share the saturn lightgun build on some lightgun discords where i hang out?

untold cloud
#

@thorn pagoda Of course. ๐Ÿ˜‰

#

Just tried the Radiant Silvergun thing... nope.

#

Need to disable the CD stuff, so I can use SignalFarp to debug.

untold cloud
#

Astra Superstars

#
// ST-V hookup for 315-5881 encryption/compression chip

 Known ST-V Games using this kind of protection

 Astra Superstars (text layer gfx transfer)
 Elandoree (gfx transfer of textures)
 Final Fight Revenge (boot vectors etc.)
 Radiant Silvergun (game start protection)
 Steep Slope Sliders (gfx transfer of character portraits)
 Tecmo World Cup '98 (Tecmo logo, player movement)
#

Another good reason to NEVER used single-letter signal names in your HDL.

#

It makes it very very hard to search for those signals.

copper furnace
#

@mortal mist can I ask you what parameters are in ini-settings? I suspect that this might be the issue

median tartan
#

my friend was disappointed that we couldn't do 10 player Bomberman on the Mister so he brought his own Saturn.

untold cloud
#

I think I captured the first Writes to the protection IC.

#

Zoomed out, you can see the multiple reads.

#

I expected one of the cart Chip Select lines to be asserted at the same time, but they don't seem to?

#

MAME thing...

mortal mist
untold cloud
#

I was being dumb, of course.

#

CCSx_N are the Chip Selects for the CBUS (CPU bus).

#

I need to be looking at ACSx_N, for the Cart bus.

#

From the SCU...

#
                        if      (!ABUS_CCS1N_INNER)  ACS0_N <= 0;
                        else if (!ABUS_CA_INNER[24]) ACS1_N <= 0;
                        else                    ACS2_N <= 0;
#

Another day, another compile.

#
    assign CCS0_N   = MSHCS0_N;
    assign CCS1_N   = MSHCS1_N;
    assign CCS2_N   = MSHCS2_N;
    assign CCS3_N   = MSHCS3_N;
#

OK, so those really are direct from the Master SH2.

#

(Slave SH2 control signals pass through the Master SH2, so you just treat them like one chonky CPU)

#
wire ABUS_SEL = (~CCS1_N | (CA[24:20] <  5'h1A                      & ~CCS2_N));  //02000000-059FFFFF

wire BBUS_SEL = (          (CA[24:20] >= 5'h1A & CA[24:16] < 9'h1FE & ~CCS2_N));  //05A00000-05FDFFFF
copper furnace
quick sorrel
median tartan
quick sorrel
median tartan
quick sorrel
#

No?

median tartan
#

I'm not sure if you can mix snac with USB

#

but the core would have to support multitap

#

which it does not

quick sorrel
#

Yeah Iโ€™m not sure either

#

Oh, you said it doesnโ€™t support emulation of multitap, I thought that meant via USB, not snac

median tartan
#

yeah. That's what I mean. The same way work is being done with the light gun right now, someone would have to do that with the multitap

quick sorrel
#

So 6 human and 4 com is the current max

median tartan
#

yeah. And to get the 6 human you would need snac and a physical multitap

#
Sega Retro

The 6Player, called the Multi Terminal 6 (ใƒžใƒซใƒใ‚ฟใƒผใƒŸใƒŠใƒซ๏ผ–) in Japan and 6-Player Adaptor in PAL regions, is an accessory for the Sega Saturn that adds five controller ports to the system, thus allowing more users to play simultaneously in compatible games.

quick sorrel
#

Just need a Saturn snac then

quick sorrel
median tartan
# quick sorrel Just need a Saturn snac then

this part is a little tricky because a lot of the compatible boards use a 40 pin and you lose a ram chip. I'm probably going to wind up cobbling one together because no one sells the right parts to just use the Arduino GPIOs

mortal mist
#

@untold cloud congrats !

#

you have been merged ๐Ÿ˜„

quick sorrel
quick sorrel
mortal mist
rich violet
#
63.68 Error (23031): Evaluation of Tcl script /opt/intelFPGA_lite/quartus/common/tcl/internal/qsh_flow.tcl unsuccessful
63.68 Error: Quartus Prime Shell was unsuccessful. 11 errors, 19 warnings
#

Failed after 2m

#

But the singe ram one is still running (9m into the build)

wise brook
#

soon

rich violet
#

#unstable-nightlies message Single ram build worked ๐Ÿ”ซ zapper

wise brook
#

besides the single Dazamon missing tile on the title screen, i donโ€™t think thereโ€™s a single known & unresolved bug

#

just a couple of feature requests of value left. and only one of which is, imo, essential for the library to play right; analog triggers

marble laurel
#

I tried to compiled 2SDRAM on my side but it fails

mortal mist
wise brook
#

a simple mistake?

mortal mist
#

I'll check it out soon

hard reef
mortal mist
#

yeah

marble laurel
#

simple fix ๐Ÿ™‚

mortal mist
#

i will add it to the files

hard reef
#

Something I was wondering - Now we can no longer set that there is no pad in port 2 , the instructions to work around the bug (in the game itself) that prevents Shinobi X starting when 2 pads connected aren't right? I did notice that if Pad2 is set to "Dual Mission" or "Virt Gun" it does boot but obv. we can't choose "Off" as an option any more.

wise brook
#

oh yeah, thatโ€™ll need tweaking

#

a simple regression post on git might be required

rich violet
mortal mist
#

yes

wise brook
rich violet
#

There should be a fix soon from srg320

mortal mist
mortal mist
manic mica
#

can anyone help me figure out saving on the saturn core?

#

its supposed to make a save file but i dont see it ever loading

#

im not sure if its supposed to output a file per game or what- or if i need to have the cartridge set to -BACKUP of if it uses the internal memory by default

wise brook
#

@burnt matrix-san time to close your lightgun issue iโ€™m happy to report!

#

huh, looks like heโ€™s been gone a week

hard reef
manic mica
#

okay. do chd games need to put in a folder?

wise brook
#

yes

manic mica
#

OH OKAY

#

damn this was probably the problem then

wise brook
#

if itโ€™s multidisk, make folder and put all disks in there

manic mica
#

okay

#

appreciate it

wise brook
#

so what yโ€™all playing today?

manic mica
#

silvergun/guardian heores

wise brook
#

a fellow treasure enjoyer

rich violet
#

Sega Rally if I get around to it

wise brook
#

itโ€™s all light guns today for me

manic mica
#

yeah sometimes i forget how fun those games are

wise brook
#

gonna see that they all work with the new lightgun solutions

rich violet
wise brook
#

obviously Sinden is off doing itโ€™s own thing but guncon 2/3 wiimote and everything else is now supposed to work

#

and that now means MiSTer finally has a 2player co-op lightgun game

#

sadly Time Crisis was only ever single player

manic mica
#

oh- to be clear- i dont need to use the BACKUP cartridge?

#

in the menu?

wise brook
#

nope

manic mica
#

okok

wise brook
#

thatโ€™s if you want the extra storage

#

itโ€™s useful for some games with huge save files

#

but for everything else itโ€™s excessive

#

and youโ€™ll have to wait a while for your saves to, well, save

manic mica
#

gotcha

#

okay so im trying to save and its still not working

#

i dont get what could be wrong

wise brook
#

would you be able to post a pic of your settings?

manic mica
#

sure

wise brook
#

what game have you got booted?

manic mica
#

guardin heores

wise brook
#

ok so youโ€™re in a game at least. some folks get confused and wonder why the bios wonโ€™t save

manic mica
#

mb here you go

wise brook
#

turn autosave on, then press right once, then press down a few times and press save settings

manic mica
#

so when i use auto save- does it always consider the loading of the save before hand?

#

that is to say- it doesnt save over what i had previously ?

wise brook
#

mister will update the save if it detects the state of the save has changed

#

when on autosave enabled

#

if you donโ€™t want it to that, manually save the game with the option โ€œsave backup ramโ€ each time

wise brook
#

yes, i forgot to mention

#

am trying to lay out the instructions in a way that prevents misunderstanding and still i forget that

kind bough
wise brook
#

yes, ElectronAsh has made my month already

rich violet
#

Yeah, thanks @untold cloud great work! ๐Ÿ™

manic mica
#

okay so autosave will write over previous saves to be clear? so just manually save ? sorry im just not clear if auto save will default to just overwriting things

#

on start up

wise brook
#

itโ€™s not going to wipe your save on game boot

manic mica
#

okay

wise brook
#

it simply means committing the save from the fpga core to your sdcard

manic mica
#

yeah i swear i have some possible unique issue with it. never have this problem on other cores

wise brook
#

ready for use next time you boot the game

thorn pagoda
#

sinden should work now if you can apply the border with an external scaler

manic mica
#

i cant wait to try sinden sometime

wise brook
rich violet
dense sundial
manic mica
#

so whats happening is that i make a save for guardina heroes.

thorn pagoda
#

it needs a custom main and stuff too but the forked cores only add the border so if you've got another way to do that you can play saturn today

manic mica
#

and then it just dissapears when i exit the core

#

and boot back in

#

is there any particular cfg i can delete or something from before?

dense sundial
#

Turn auto save on and never forget to open OSD before quitting

rich violet
manic mica
#

i have multiple unstables of saturn as well so i hope its not getting jumbled up somehow

wise brook
#

the horror

manic mica
#

using save autosave or save backup ram. ive tried both

#

so basically when you start a game. there is a load prompt that has your previous game

#

it dissapears after i leave the core

#

and there is no unique save in the game folder (if there should be)

wise brook
#

so you might need to backup your saves, clear them out, remove unnecessary old cores and see if everything starts working, then you can look at restoring your saves

#

get your games right too, every game in a separate folder

#

wether itโ€™s bin/cue or chd

manic mica
#

sounds good yeah ill just do an update all and - is there anything else i should delete save related ? ill keep the games folder and delete the rbfs

#

but if there is any other CFG or something to get rid of

wise brook
#

remember, update all isnโ€™t gonna get you very upto date

manic mica
#

also does it make any particular save file?

wise brook
#

manually add the latest unstable nightly

manic mica
#

like how ps1 has .mem and so on?

#

okay i can do that now

wise brook
manic mica
#

okay

#

so which saturn folder?

#

i dont wanna delete the games folder. but is there another saturn folder?

wise brook
#

saturn saves only

manic mica
#

where do i find that?

wise brook
#

thereโ€™s nothing else to worry about

manic mica
#

oh i see

wise brook
#

pls only do this after copying them

#

iโ€™d hate for you to loose something precious to you

manic mica
#

okay let me make folders for my chd games real quick before i do anything else

rich violet
wise brook
#

worth noting that by moving games into a folder the old save wonโ€™t connect to the game anymore.
the core doesnโ€™t see it as itโ€™s under a different name

manic mica
#

that makes sense

#

yeah thankfully i have 0 saves i care about

wise brook
#

we will get you sorted! iโ€™ve made it my mission

manic mica
#

appreciate it so much

#

okay i think we good.

#

god damn what a ride lol

#

this has been driving me crazy for ages

#

because it would work, and then not work

wise brook
#

now youโ€™ve got it right tho itโ€™ll be right going forward!

manic mica
#

hell yeah thanks

ripe valley
thorn pagoda
#

oh yeah you should do the folders thing for all cd-based cores on mister or weird stuff can happen

manic mica
#

oh word i was playing those earlier today lol

rich violet
#

There's a new Astal issue

manic mica
#

yeah freddo i have for the others

rich violet
#

Final boss

manic mica
#

just never considered it for chd saturn

wise brook
rich violet
#

srg320's already commented on it

thorn pagoda
#

btw this is my list of tested saturn lightgun games so far:
Virtua Cop
Virtua Cop2
House of the Dead
Die Hard Trilogy

they all worked. die hard is 1p only and the gun must be in port 2

wise brook
#

yup, iirc that issue went away with a puyopuyo fix

mortal mist
#

boss is ok with latest unstable

#

there is another

wise brook
#

this one

#

ahh memories

thorn pagoda
#

does anyone know what that level select code is? should probably add it to the bug report

rich violet
ripe valley
#

Already added

#

Gotta go fast.

ancient surge
#

Speaking of Puyo Puyo 2, I should attempt to do a no death run of the game's Expert Mode at some point.

Which is actually pretty daunting, because that means defeating 36 opponents in a row.

wise brook
#

you might find the menu messed up

#

if itโ€™s the same issue thatโ€™s come back with astal

#

getting ready to go out so canโ€™t test atm

ancient surge
#

Oh, something went wrong with Puyo Puyo 2? I can check real quick.

wise brook
manic mica
#

looks like everything is working great

#

thanks again!

ancient surge
#

Puyo Puyo 2 still works.

kind bough
#

Scud - The Disposable Assassin has a 480i title screen, that seems to cause an issue

#

the OSD crosshair doesn't track with the gun like normal, goes wonky

wise brook
#

when i get home ill test on original hardware

ancient surge
#

Guessing the gun detects the scanlines, and the interlacing constantly switching those scanlines trips it up.

wise brook
kind bough
#

Guncon 3 (IR tracker), and its the mister OSD crosshair that starts not matching the gun as soon as it switches to 480i title screen

#

tracks normally in the intro video

#

crosshair gets smaller in 480i mode vs 240p like in PSX core, but here it makes the crosshair no longer move proportionately to the gun and cant aim on the right of the screen

#

same issue if i set p1 'xy ctrl' and 'buttons' to mouse and use a mouse instead of guncon

thorn pagoda
#

nice find i think electronash was wondering if any lightgun games use 480i

#

guncon3 reports as a joystick right?

thorn pagoda
#

i (wrongly) guessed no ๐Ÿ˜›

naive whale
#

honestly would that work? the lightgun works on the raster drawing so I dont know if 480i would work? But Ive never thought about it til writing this

#

at least talking about Saturn

thorn pagoda
#

probably just averages it over two fields?

naive whale
thorn pagoda
#

loads of ps2 lightgun games are 480i so it must be possible

naive whale
#

but that's GunCon2 so it might be working slightly diff with the sync off the back end

#

honestly zero clue....fun question haha

kind bough
thorn pagoda
#

is it off on both axis? vertically and horizontally?

kind bough
#

it could just be the intro screen, it was acting odd and not letting me enter the game so I may need to aim at the icons on the right

#

if i hold crosshair in top right of screen, it jumps to the top centre when it hits 480i

#

vertical movement is still proportional, but horizontal is off

thorn pagoda
#

is it always off a constant amount?

#

like "pulling right"

kind bough
#

its like the horizontal range of motion is compressed to the left half of the screen

thorn pagoda
#

yep yep

#

its the 640 width

kind bough
#

can no longer go to the right of screen

thorn pagoda
#

we had similar because of 352 but this will be even more exagerated i'm guessing

kind bough
#

yeah that's what I figured

thorn pagoda
#

cheers for describing that should help ash

kind bough
#

np, the support is damn awesome, all other games worked great ๐Ÿ™‚

#

i think one other game's menu may have been odd but i got in game quickly and moved on....

rich violet
#

@naive whale Maybe a top 10 lightgun games playable on MiSTer would be a good video (regardless of which core)

thorn pagoda
#

don't tell #1046940919607345272 but virtua cop with 2 guns is more fun than time crisis ๐Ÿ˜„

naive whale
thorn pagoda
#

and yeah we finally have 3! co-op shooters which are my fave kind

rich violet
#

I heard the algorithm loves top 10s though!

naive whale
thorn pagoda
#

it's amazing the lengths i'll goto to play lightgun games heh

sudden tusk
#

My only Option to test is a Wii mote .. so I guess ima be waggling all day lol

bleak flame
#

Do latest unstable builds also go in the arcade cores folder for STV or does the unstable need to say STV in the description if STV has an update?

mortal mist
#

every new core now supports STV

bleak flame
#

Okay. I'll put latest in both arcade cores folder and my console folder. Thanks.

random shard
#

I just read about Zet-sensei's situation. Thank you for all your hard work! I hope you can solve your issues soon and get better!

hallow fossil
#

Saw that the issue about lightgun support was closed - it is best practice to not close issues until the fix/feature is in Main. Only people testing are using unstable nightlies builds and it is entirely possible that features in unstable nightlies builds wind up being reverted and don't make it live.

ancient surge
#

The most obvious problem I have with the new feature is that you can't disable the second controller anymore. Which is a problem with Shinobi Legions in particular.

wise brook
#

hopefully, itโ€™s a simple as adding an extra option for no controller

wise brook
#

unless iโ€™m misunderstanding you

kind bough
#

'Scud - The Disposable Assassin' needs player 2 set as light gun also (you play with gun as p1)
if its set as 'digital' the game's menu keeps looping back and wouldnt let me start a game

#

the game is 240p but the in-game calibration screen is 480i....
if I calibrate in-game to a little to the left of centre, it's actually pretty spot on
so you can work around the issue ๐Ÿ™‚

rich violet
hallow fossil
#

It isn't in an official release build that is distributed to the wider public, it is in an unstable nightlies build. Hopefully it does make it to a proper release, but right now it is essentially in a testing phase.

wise brook
#

oh i hadnโ€™t realized
so far thatโ€™s how all bug reports (and the call to close them) has been done, thru the lense of the latest unstable

otherwise we wouldnโ€™t be reporting regressions that havenโ€™t yet emerged on the current stable no?

rich violet
#

In an open source project it's typical to use an issue tracker to track what needs to be done by developers. So things get closed when they are merged to the main branch. There aren't enough people working on it in their spare time to have it cluttered with things that are complete and triage them all when a new release is made, unless it's a huge project with lots of backing

mortal mist
#

we have been doing this for more than two years with saturn , we did this with psx, I am not going to change it. If a feature is withdrawn it can always be reopened on github.

#

last time with saturn we waited from june to january with a new stable core.

sweet vale
#

One message removed from a suspended account.

mortal mist
#

you need boot.rom

#

not boot.bin

sweet vale
#

One message removed from a suspended account.

ripe valley
#

I agree with @mortal mist & @rich violet (thanks for stepping in about the verifications on the tracker, by the way)
I've been doing project reviews and support tasks for at least 15 years, the workflow is okay and should stay that way.

#

And worked the same way on other software emulators, nobody working actively on the core ever complained or is complaining about it right now.

sweet vale
#

One message removed from a suspended account.

celest lake
#

Plus it gives SRG the funniest patch note option: -Bug fixes and feature updates

sweet vale
#

One message removed from a suspended account.

mortal mist
#

ok , try load bios manually, maybe the file extension is still wrong and you don't see it

#

like boot.rom(.bin)

sweet vale
#

One message removed from a suspended account.

mortal mist
#

you don't need any special video settings for core

#

I assume you keep the games in the saturn folder on the sd card and put the bios there too

#

The second thing is how do you copy the files ?

#

manually or, for example, filezilla?

sweet vale
#

One message removed from a suspended account.

mortal mist
#

ok but bios

sweet vale
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

mortal mist
#

ok so it;s filezilla issue

#

you set it to binary ?

sweet vale
#

One message removed from a suspended account.

sweet vale
mortal mist
#

if you don't do this, the files will be copied incorrectly

sweet vale
#

One message removed from a suspended account.

#

One message removed from a suspended account.

celest lake
#

make sure the transfer type is set to binary

dense sundial
#

honestly from usability standpoint WinSCP is better

#

doesn't feel as limiting as FZ

wise brook
#

mapping the mister as an external drive on windows is so convenient

#

and on iphone i use this app

#

copy the latest everything wirelessly from phone to mister in seconds of it being turned on

sweet vale
#

One message removed from a suspended account.

#

One message removed from a suspended account.

floral saddle
sweet vale
#

One message removed from a suspended account.

wise brook
#

then on windows go to the file explorer homepage and click the option to map an external drive

#

then you map its IP address, add the username & password

#

only thing you might want to do is set a fixed IP address on your router

floral saddle
eternal mantle
#

Shinobi Legions doesn't work anymore on the latest Unstable Core. There's no option to turn off Pad 2 with the new lightgun implementation . This game only works with only one pad conected, also on real hardware.

untold cloud
#

So yeah, just need to add rtl/lightgun.sv, under Project -> Add/Remove Files in Project.

#

No other settings in Quartus were changed for Single SDRAM, so I think that's all that's needed to compile for Dual as well.

mortal mist
#

It's fixed ๐Ÿ™‚

untold cloud
#

Yeah. I just saw.

#

tbh, I'm not used to how Dual SDRAM has a separate Project file.

#

It's not how that kind of thing used to be done.

#

There used to just be a define (in sys_top, or in the settings) to enable/disable stuff.

#

Or a separate Revision, in the drop-down menu at the top of Quartus.

#

But from now-on, I'll try to remember to check the Dual SDRAM project before doing a PR.

mortal mist
#

@untold cloud I have a request, could you add the possibility to disable controllers in the menu?

#

We need this because some games don't work if a second controller is detected

mortal mist
#

If you have set integer scale only , then this function should not work at all (I forgot to make this function gray out when integer scaling is set)

untold cloud
rich violet
untold cloud
#

I saw your reply on that too, @rich violet I'm just catching up.

thorn pagoda
#

hey electron congrats on the merge

rich violet
#

They're bugs in the original game where they don't start if there's a second controller

untold cloud
#

Would be fairly simple to fix, to just re-add the "Off" option.

untold cloud
celest lake
#

Yeah, Ash, really killer work duder

thorn pagoda
#

we also found one lightgun game that uses 480i on its title screen

untold cloud
#

I think it was Srg320 who did the merge. I was expecting it to be Sorg, for some reason.

thorn pagoda
#

nah srg320 manages the saturn core

untold cloud
#

Yep, need to test an Interlaced LightGun game.

rich violet
#

Yeah, the interlaced lightgun game was Scud: #1046941029296779344 message

thorn pagoda
#

Scud - The Disposable Assassin

untold cloud
#
    parameter PAD_DIGITAL     = 0;
    parameter PAD_VIRT_LGUN   = 1;
    parameter PAD_WHEEL       = 2;
    parameter PAD_MISSION     = 3;
    parameter PAD_3D          = 4;
    parameter PAD_DUALMISSION = 5;
    parameter PAD_MOUSE       = 6;
thorn pagoda
#

it sounded like it was just struggling with the 640 width and needed scaling you know

copper furnace
kind bough
#

The game itself is 240p but the calibration screen is 480i

#

Just to make life interesting ๐Ÿ™‚

thorn pagoda
#

some bored developer with too much time on their hands there ๐Ÿ˜„

untold cloud
#

Yep, I expected a couple of games might used Interlace.

If I'd spent longer to test every single game, I would never have done the PR. lol

#

Hence "initial support". ๐Ÿ˜›

thorn pagoda
#

yeah no worries stuff like this happens all the time

#

it is a WIP core afterall

untold cloud
#

I think Sorg used to pretty much expect "perfect" code before a PR, but it's already hard enough getting the bulk of games working.

#

That must have been at least 40 compiles, to get LG working.

#

Would be good to find a fix for why selecting the Wheel will often jump back to the CD player screen.

#

I think the "Off" option should just be added as the 7th controller type.

thorn pagoda
#

has anyone tested if hotplugging a wheel into a real saturn on a game that doesn't support wheel makes it panic?

#

weirder things have happened

#

btw you can use L/R shoulder buttons on your pad to scroll the controller thing in either direction

#

so you dont hit wheel and crash

untold cloud
#

When there is no code/logic to support a specific controller type in HPS2PAD, it just goes to the default case.

#

Which then just shoves the PDRxO bits into PDRxI, by default.

#

So that should work.

#

It's just for Virt LGun, I kind of stole the original "Off" state.

#

So I just added that to the menu, with "Off" as the last controller type, and compiling now.

#

Also still working on getting Radiant Silvergun to react to Start.

thorn pagoda
#

nice one

untold cloud
#

It's been harder than I thought, just to figure out which signals to use, to trigger a Read or Write on.

#

I thought I would just be able to use the normal Cart control signals, but something a bit weird is going on with those.

#

So I had to use some signals direct from the Master SH2.

#

It's starting to allow the state machine stuff to work now, so I just need to keep doing tweaks.

#

I'm really hoping Radiant only does that ONE check at start-up, but that would be a pretty dumb protection.

#

HPS2PAD, for Port 2...

#
        PDR2I = (PDR2O & DDR2) | ~DDR2;
        case (JOY2_TYPE)
            PAD_DIGITAL: begin
                if (DDR2[6:5] == 2'b10) begin
                    case (PDR2O[6])
                        1'b0:  PDR2I[3:0] = JOY2[15:12];
                        1'b1:  PDR2I[3:0] = {JOY2[3],3'b100};
                    endcase
                end else if (DDR2[6:5] == 2'b11) begin
                    case (PDR2O[6:5])
                        2'b00: PDR2I[3:0] = JOY2[ 7: 4];
                        2'b01: PDR2I[3:0] = JOY2[15:12];
                        2'b10: PDR2I[3:0] = JOY2[11: 8];
                        2'b11: PDR2I[3:0] = {JOY2[3],3'b100};
                    endcase
                end
            end

            PAD_VIRT_LGUN: begin
                // PDRxI [6]=LGUN_LAT_N. [5]=Start_n. [4]=Trigger_n. [3:0]=ID Nibble (sort of, see above).
                PDR2I[6:0] = {!LGUN_P2_SENSOR, !LGUN_P2_START, !LGUN_P2_TRIG ,4'b1100};
            end
            
            PAD_WHEEL,
            PAD_MOUSE,
            PAD_MISSION,
            PAD_3D: begin
                PDR2I[4:0] = {TL2,OUT2};
            end
            
            //TODO
            default: ;
        endcase
#

Sorry, that was more code than I realized. lol

#

But anywho... at the very top, it assigns PDR2O (Port Data Register 2 - Output) to PDR2I (Input).

#

Based on how the bits of the DDR2 (Direction) reg are set.

#

Which is a very common way that IO pins are done on stuff, even things like Arduino, to this day.

#

In Verilog, though, if you assign to the same thing twice, within the same clock cycle (or in this case, it's all combo logic / continuous assigns), the one further down the page will override the first.

#

The PAD_VIRT_LGUN thing took over from the old "Off" case.

#

For "Off", there wasn't any need to have a case at all, so it would just go to the default: ; case.

#

Which in turn would allow the assign to PDR2I, at the top of the page.

#

In summary: Just re-add the "Off" to the CONF_STR, and it should work. lol

#
        "D5P2O[17:15],Pad 1,Digital,Virt LGun,Wheel,Mission Stick,3D Pad,Dual Mission,Mouse,Off;",
        "P2O[20:18],Pad 2,Digital,Virt LGun,Wheel,Mission Stick,3D Pad,Dual Mission,Mouse,Off;",
#

(the D5, at the start of the first menu entry, is just so it can be greyed-out via the menumask bits on HPS_IO, whenever the SNAC option is enabled.)

thorn pagoda
#

is snac always p1 on saturn core?

untold cloud
#

I very nearly added the option to apply the SNAC input to either Player.

thorn pagoda
#

we've actually just found 2 games that insist the lightgun be plugged in port 2

untold cloud
#

But I didn't want to confuse myself, with the whole PR thing. It was way harder than I remembered, to try to keep the code clean, and get everything working.

#

Yeah, that would be OK to add later.

thorn pagoda
#

yeah keep your PR's to one thing at a time totally

untold cloud
#

So the SNAC option would just say Off, Pad 1, Pad 2.

#

This is how SNAC works, btw...

#
    wire snac = status[27];
    reg  [6:0] USERJOYSTICK;
    wire [6:0] USERJOYSTICKOUT;
    always @(posedge clk_sys) begin
        if (snac) begin
            USERJOYSTICK <= {USER_IN[4], USER_IN[6], USER_IN[2], USER_IN[3], USER_IN[5], USER_IN[0], USER_IN[1]};//TH, C(TR), B(TL), R, L, D, U
            USER_OUT <= {USERJOYSTICKOUT[5], USERJOYSTICKOUT[2], USERJOYSTICKOUT[6], USERJOYSTICKOUT[3], USERJOYSTICKOUT[4], USERJOYSTICKOUT[0], USERJOYSTICKOUT[1]};
        end else begin
            USER_OUT <= '1;
        end
    end
#

status[27] is toggled by the actual SNAC menu option.

#

USER_IN bits are taken directly from the USERIO/SNAC port inputs.

#

USER_OUT can drive the "output" pins Low.

#

IIRC, they are actually "inout" pins, so they are open-drain outputs.

#

Which means they either get driven Low (to Ground), or they are allowed to get pulled-up, but the 10K pull-up resistors on the IO board.

#

Then, on the Saturn module instance...

#
.SMPC_PDR1I(snac ? USERJOYSTICK : SMPC_PDR1I),
#

Yes, that's it. That's all it does. lol

#
"P2O[31:30],SNAC,Off,Port 1,Port 2;",
#
wire [1:0] snac = status[31:30];
#
        .SMPC_PDR1I(snac==2'd1 ? USERJOYSTICK : SMPC_PDR1I),
        .SMPC_PDR2I(snac==2'd2 ? USERJOYSTICK : SMPC_PDR2I),
#

Can't test for a while. I'm still compiling for trying to get Radiant (ST-V) to work, so I have the Saturn CD stuff disabled.

#

Also - I don't have any SNAC stuff to hand. lol

rotund steeple
#

You can't disable the Input ports anymore. Wasn't there a problem with games like "In the Hunt" or "Shinobi X" when there was a device plugged in port 2?

untold cloud
#

Fixing that now.

rich violet
#

It's a known issue. ElectronAsh has been discussing the fix

untold cloud
#

Just need to re-add the "Off" option to the CONF_STR, for the Pad 1 / Pad 2 controller type.

#

But as the last option, so it == 7.

#

In theory, that's all that's needed.

#
"D4P2O[17:15],Pad 1,Digital,Virt LGun,Wheel,Mission Stick,3D Pad,Dual Mission,Mouse,Off;",
"D5P2O[20:18],Pad 2,Digital,Virt LGun,Wheel,Mission Stick,3D Pad,Dual Mission,Mouse,Off;",
rich violet
#

May not be needed for pad 1 ๐Ÿค”

untold cloud
#

After this next compile, I'll re-enable the CD stuff, so I can post the new RBF here, with the SNAC (Port 1 or Port 2) and controller "Off" fix.

#

Might as well keep it on Pad 1 as well, just in case.

#

I remember that one game, where you had to plug the joypad into the Player 2 port, to fight a boss. lol

#

PS1, I think?

kind bough
#

Yeah metal gear solid, mantis ๐Ÿ™‚

untold cloud
#

Ahh.

#

I... never really played much of the Playstation stuff, of any generation.

#

Just never had any Sony consoles, until about ten years ago.

#

I have a few PS1's, and a PS2 Slim.

#

Never once played on a PS3, PS4, PS5.

#

Nor Xbox Series S / Series X.

rich violet
#

My first Sony console was a PS5

#

Got it for Stray

#

๐Ÿˆ

untold cloud
#

I mean, I don't really play games much at all now, but I have this vision of one day getting back into it. lol

#

I did like the look of games like Stray. A slightly different concept, and about atmosphere etc.

rich violet
#

Yeah

untold cloud
#

I used to enjoy just driving around in GTA V, or Need For Speed, on the old-people Xbox.

kind bough
#

I really enjoyed it

#

Stray that is

untold cloud
#

Last game I completed (which was the first in a long time) was Portal 2.

#

Which was probably around 2009.

#

I never played Portal 1 at that point, still haven't.

dense sundial
#

2011 more likely

untold cloud
#

Ahh yep, it was later, then.

high bramble
#

Stray was fantastic.

untold cloud
#

I was hooked on Portal 2. I couldn't stop playing - completed it in about 7 hours, with no breaks. lol

#

I got stuck for a while, on one of the first times the floor kind of folds upwards, and boxes you in. lol

untold cloud
#

Oww, Radiant still not working. lol

#

Oops.

#
00000000 (x4)
10101010 (x4)
20202020 (x4)
30303030 (x4)
#

It's meant to be 10101010 etc. not 01010101.

#
prot_reg <= {count,4'd0,count,4'd0,count,4'd0,count}
#

Weird.

#

count is 4 bits wide.

#

So that concat should surely have worked.

#

oic.

#

Dumb.

#

The fix...

#
prot_reg <= {count,4'd0,count,4'd0,count,4'd0,count,4'd0}
#

Also don't know if I should be incrementing to the next value, every time CS_N pulses low.

#

As it seems to read in pairs or pulses.

#

Compiling... AGAIN, but with Saturn CD enabled.

#

So we can test the SNAC port 1 / port 2 thing, and controller Off thing.

rich violet
#

Is the Radiant Silvergun thing for the protection IC?

untold cloud
#

Yeah. In the MAME debugger, I saw it seems to just read a simple pattern of Words, just before the title screen appears.

#

Once in the game (in MAME), it didn't seem to read again for a while.

#

But I didn't try playing the game further. I suck at shooter games anyway.

#

This is all it did in MAME...

#
Radiant Silvergun...

Writing   00 to 4FFFFF1
Writing 0800 to 4fffff8
Writing 0010 to 4fffffA
Writing 7777 to 4fffffC
Writing   01 to 4FFFFF1

All subsequent reads from 4FFFFFC...

00000000 (x4)
10101010 (x4)
20202020 (x4)
30303030 (x4)
40404040 (x4)
50505050 (x4)
60606060 (x4)
70707070 (x4)
80808080 (x4)
90909090 (x4)
A0A0A0A0 (x4)
B0B0B0B0 (x4)
C0C0C0C0 (x4)
D0D0D0D0 (x4)
E0E0E0E0 (x4)
F0F0F0F0 (x4)

Repeats reading this chunk, many times...
00010203
04050607
08090A0B
0C0D0E0F

And then Writes 00 to 4fffff1
#

The Protection IC is mapped to the end of the Cart space on ST-V, as it's physically in the Cart.

#

But only a handful of memory locations are used.

#

So it doesn't look like it uses anything fancy, like Interrupts.

#

So can probably ignore the writes completely. And just let it read back the correct pattern of Words.

#

Prot IC read and write stuff in MAME...

coarse tokenBOT
#
uint32_t stv_state::common_prot_r(offs_t offset)
untold cloud
#

The actual code for the chip, which is NOT simple...

#

But some other games might be doing simpler checks, like Radiant does.

#

And not using the ROM (or key) decryption stuff at all.

#
    map(0x0000, 0x0001).r(FUNC(sega_315_5881_crypt_device::ready_r));
    map(0x0010, 0x0011).w(FUNC(sega_315_5881_crypt_device::addrlo_w));
    map(0x0012, 0x0013).w(FUNC(sega_315_5881_crypt_device::addrhi_w));
    map(0x0018, 0x0019).w(FUNC(sega_315_5881_crypt_device::subkey_be_w));
    map(0x001c, 0x001d).r(FUNC(sega_315_5881_crypt_device::decrypt_be_r));
#

The addr bits of the chip are likely shifted up, when they connect to the Cart addr bus.

pearl harbor
untold cloud
#

Hence MAME is accessing offset 1, 8, A, C, etc.

untold cloud
#

Looks like the MAME stv code re-maps the regs as well, just to complicate things.

#

First stuff Radiant writes to the prot chip...

#
Writing   00 to 4FFFFF1
Writing 0800 to 4fffff8
Writing 0010 to 4fffffA
Writing 7777 to 4fffffC
Writing   01 to 4FFFFF1
#

So probably the "ready" reg has to be cleared to Zero, before changing other regs.

#

addrlo / addrhi stuff, likely for setting the start address, to tell the chip where to start decrypting a chunk of Cart ROM.

#

(even though Radiant might not use that. Some leftover code maybe?)

#

And the 0x7777 likely the subkey.

#

Then it sets the ready reg to 1 again, to enable the "decryption".

#

I'm just guessing here. lol

copper furnace
sweet vale
#

One message removed from a suspended account.

#

One message removed from a suspended account.

mortal mist
#

there is no scandoubler for the core

sweet vale
#

One message removed from a suspended account.

#

One message removed from a suspended account.

thorn pagoda
#

yeah you should be able to apply a scanline filter

sweet vale
#

One message removed from a suspended account.

thorn pagoda
#

open the osd, go to the right page, add a vertical filter

#

not sure what will look good on a crt but there's tons to chose from

sweet vale
#

One message removed from a suspended account.

thorn pagoda
#

filters are 0 lag

sweet vale
#

One message removed from a suspended account.

upper dust
#

the scaler adds minimal lag, but you must use it on a 31khz CRT

sweet vale
#

One message removed from a suspended account.

thorn pagoda
#

it depends on the filter

warped saddle
#

well make sure you have vsync_adjust=2 otherwise it is triple buffered

upper dust
#

load presets at the top of the video processing section

thorn pagoda
#

you probably want a really basic one because your crt is going to do a lot of the work the complex filters do for free

sweet vale
upper dust
#

there are three basic scanlines variants in the presets

thorn pagoda
#

the presets all have a mask and stuff

#

you can start with them but you should probably disable any mask or gamma they activate

sweet vale
#

One message removed from a suspended account.

upper dust
#

Scanlines - Medium
just adds an interpolation filter for even pixels and a scanline filter

sweet vale
#

One message removed from a suspended account.

#

One message removed from a suspended account.

upper dust
#

turn off the forced_scandoubler

sweet vale
#

One message removed from a suspended account.

thorn pagoda
#

and on the vga-scaler

upper dust
#

that video mode might give you some issues too

thorn pagoda
#

you might need a minimum 480 vertical for interlaces stuff

#

the scaler cant downscale

#

actually you'll need that for scanlines to appear too

#

you can use simpler video_mode lines these days, something like
video_mode=2048,480,60

upper dust
#

a forced 240p modeline will not look good with 480i content

sweet vale
upper dust
#

many games use both 240p and 480i. If you really want scanlines via the 240p modeline, then it'll cut out half of the 480i content. You can also use bob deinterlace if your scaling to a normal resolution with filter scanlines

sweet vale
#

One message removed from a suspended account.

#

One message removed from a suspended account.

naive whale
#

new Princess Crown translation is such much better than the first version

prime hare
#

Should I wait on a ST-V stream, or do you think I should take a look at it? I have everything setup, roms grabbed, MRAs, etc, as well as the compatibility sheet.

warped saddle
#

it'll be a short stream!

prime hare
#

just like I like them ๐Ÿคฃ

willow pawn
#

ST-V works now?

mortal mist
#

6 games ๐Ÿ˜›

#

are playable

willow pawn
#

Holy Jupiter there's a lot of ST-V games

sweet vale
#

One message removed from a suspended account.

clear condor
#

the core date is in the tester field

thorn pagoda
#

take it you saw all the lightgun news nolbin ๐Ÿ™‚

clear condor
thorn pagoda
#

curse that flashing issue lol

#

it feels like it should be solvable somehow

#

maybe the scaler could be convinced to hold a white flash for a few extra frames or something

#

one day we'll puzzle it out

clear condor
#

I actually tried exactly that with PSX one time: when the trigger is pulled, white out the screen for a couple of frames, then send the trigger pull to the rest of the core. It was not a comfortable experience

upper dust
thorn pagoda
#

did it help?

clear condor
#

It did, but the long flash wasn't pleasant

#

I agree with you that it feels like there should be some way to solve it - like maybe somehow, the GC2's lag is longer than it should be

thorn pagoda
#

we ever try 1000z polling them?

clear condor
#

I tried that once, and it still gave reports at 60 Hz

thorn pagoda
#

maybe you could tune the white flash, make it grey, reduce it to the bare minimum duration

#

or make it like a checkerboard?

#

or maybe instead of like, a pure color, crank the shit out of the game image brightness for a frame or two

sweet vale
thorn pagoda
#

or maybe flash one black frame then one white? just guessing but that might make the phospher point easier to spot by making it very high contrast

sweet vale
#

One message removed from a suspended account.

upper dust
#

@sweet vale hmm, disable the custom video mode:
;video_mode=2048,40,442,200,240,3,10,8,120909
oh wait you have a custom Saturn entry at the bottom - one sec

clear condor
sweet vale
upper dust
sweet vale
#

One message removed from a suspended account.

upper dust
#

looking at your .ini N64 and PSX will need a similar setting to Saturn since they are 480i consoles and cannot use the scan_doubler