#Sega Saturn

1 messages · Page 83 of 1

untold cloud
#

More complex controllers will change the value of the nibble, depending on what TH is set to.

#

So that's where the whole Byte-wide ID value comes from, I think?

#

Maybe it really should be outputting both nibbles?

#
#define ID_DIGITAL      0x02
#define ID_RACING       0x13
#define ID_ANALOG       0x16
#define ID_MOUSE        0x23
#define ID_KEYBOARD     0x34
#define ID_MD3B         0xE1
#define ID_MD6B         0xE2
#define ID_MDMOUSE      0xE3
#define ID_GUN          0xFA
#define ID_UNCONNECTED  0xFF
#

Dunno. I need a coffee. lol

#

MD_ID check doesn't seem to care about the full Byte.

#
                        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
#

It just checks the (merged) nibble from the Joypad, then shoves that into the top nibble in the OREG table.

#

Which results in 0xA0, here...

#

(port 2 atm, so it's the right-hand side of the table)

untold cloud
#

Very hard to read.

#

But it does look like it just ties two of the lower bits High.

#

Just not the ones I thought, so I'm sure I have that wrong in the core now.

#

The way it merges the bits, from the two nibble reads, is very strange.

#

Bits [3:2] left open / floating.

#

Bits [1:0] Grounded.

#

Great, it shows up as ID 0xF. lol

#

That's so dumb.

#
PAD_LG_EMU: begin
    PDR2I[5:0] = {JOY2[11:10],4'b1100};        // PDR2I[5]=Start. PDR2I[4]=Trigger. PDR2I[3:0]=ID Nibble?
end
#
MD_ID <= {|NIB_1ST[3:2], |NIB_1ST[1:0], |NIB_2ND[3:2], |NIB_2ND[1:0]};
#

Couldn't figure it out, from the way the OG logic was done.

wise brook
untold cloud
#

I think I'd heard of it. Not read much about it since.

#
// Stunner ID...
// 
// Bits [3:2] on the controller are tied High (or left floating, with pull-ups on the Saturn?)
// Bits [1:0] on the controller are tied to Ground / Low.
//
// For simpler controllers like the Light Gun, bits [3:2] don't change, so ignore the state of the TH pin.
//
// The SMPC then does a weird OR'ing of the bits of each nibble, to get the final ID nibble value. ElectronAsh.
//
// 1ST nib (TH Hi): [3:0] = b1100
// 2ND nib (TH Lo): [3:0] = b1100
// 
// ID3 = 1ST nib [3 OR 2]
// ID2 = 1ST nib [1 OR 0]
// ID1 = 2ND nib [3 OR 2]
// ID0 = 2ND nib [1 OR 0]
//
// Resulting ID nibble for the Stunner LightGun ends up as 0xA.
//
#

Nearly got it now. It's so dumb. lol

#

Simple controllers ignore the state of TH completely, so both Nibbles read the same.

#

But then it does a weird OR thing of the bits, to get the final ID nibble.

#

For the Stunner LightGun, bits [3:2] are tied High (or left floating, with pull-ups on the Saturn side).

#

So bits [3 or 2] is true, both times the Saturn reads the nibbles from the controller.

#

Which ends up as 0xA. sigh

#

So, even though the SMPC can read two nibbles from the controller, pairs of bits are OR'd together.

#

Which limits them to a 4-bit result, throwing away half of the bit combinations.

#

It was probably done for backwards-compatibility?

wise brook
#

a backwards compatibility that never came to be?

untold cloud
#

No idea. Maybe it's just the way most MD joypads appear, due to how they mux the Buttons onto the lower four bits.

#

But they needed a way to ID the more complex controllers for Saturn, while still allowing MD pads to be used.

#

I personally think NES/SNES did it a better way, with shift registers.

thorn pagoda
#

didn't someone make a simple adapter to use saturn lightguns on genesis once

untold cloud
#

The chip does cost money, but then so does the mux in a typical MD pad.

thorn pagoda
#

i may be thinking of something entirely different

untold cloud
#

Probably - if it wasn't for this whole ID thing, most older style (CRT) light guns simply output the "Light" signal, and Trigger.

#

(and maybe one or two extra buttons)

#

Most systems that had hardware support for a light gun would latch the H/V counter value when the trigger was pulled.

#

AND when it detects light on the Light signal.

#

And that's pretty much it.

#

But wasn't too great unless the image was quite bright, hence many games had to add the white screen flash.

#

The NES Zapper is a bit unique, as it doesn't rely on the CRT beam timing.

#

The NES games instead show a white targeting square over the enemy (or Ducks).

#

Then a black screen on the next frame, so you couldn't easily cheat.

#

(by pointing the gun at a light, etc. although it sometimes worked, because of the AC mains timing would coincide with the TV fields)

ancient surge
#

SEGA Saturn doesn't have backwards compatibility in the traditional sense, but it did have several Mega Drive ports, like several of the SEGA AGES releases. So maybe the function was used there?

untold cloud
#

No idea. It's quite strange, but I feel it must be related to how the typical MD pads used those lower pins.

thorn pagoda
#

i wonder if they ever considered letting you plug megadrive carts into some kind of adapter in the cart slot

untold cloud
#

IIRC, the Joypad button signals are generally Active-Low.

#

So, when you power up the console, and aren't pressing any buttons, all of those signals will read as High.

#

Also, AFAIK - the Select pin == TH pin.

#

Later on, they could strobe Select/TH multiple times, to read in extra buttons.

#

The Saturn stuff is an extension of that, including reading the X/Y values for the Mouse, etc.

untold cloud
clear condor
#

That's new

mighty eagle
#

Saturn_unstable_SingleSDRAM_ButtonFix_EA_20250127.rbf << anyone know where to get this RBF?

untold cloud
#

It's doing the thing.

mighty eagle
#

grazie ash-san

untold cloud
#

I can use the Start and Trigger buttons on the virtual LG now. 😉

#

So yeah, Trigger scrolls through the menu options on Virtua Cop, Start to choose.

#

LightGun is emulated on Joyport 2, leaving the Digital pad (or whatever you want) on Joyport 1.

mighty eagle
#

are any STV games playable? getting nowhere in diehard arcade

untold cloud
#

Die Hard doesn't boot yet.

#

It never booted when I tried my crappy code a few weeks back either.

pearl harbor
untold cloud
#

Not sure why, but games like Die Hard crash.... Hard.

mighty eagle
#

bruce willis must be too powerful for the de10nano

untold cloud
#

It often shows the Winners Don't Use Drugs thing, then crashes to a green or black screen.

#

The SH2 jumps to some random code, then keeps reading until the Address wraps to zero, then freezes.

mighty eagle
#

ive used drugs and i've won stuff

#

dont believe the lies

untold cloud
#

And you'll generally have to reload the MRA/RBF to get it running again.

mighty eagle
#

still, even seeing the bios stuff and bios loading animation is exciting as hell

untold cloud
pearl harbor
#

The list!

untold cloud
#

A fair few games are playable now, apparently.

mighty eagle
#

i had a saturn growing up. mostly played import stuff

untold cloud
#

Shienryu, and erm... other games other people have tested. lol

mighty eagle
#

didnt play FF7 until the terrible PC version

untold cloud
#

You'll also need a later version stvbios.zip file.

#

The older ones don't contain the epr-23603 BIOS that most Japan games need, for some reason.

#

I can't post the BIOS zip on here, sadly.

mighty eagle
#

no worries. only issue was the specific RBF

#

many thanks all

pearl harbor
#

All I will say is that I wasn't able to find the correct bios on archive. Had to look elsewhere.

warped saddle
#

it is there

#

it's in the big mame-merged archive

untold cloud
pearl harbor
#

Ah, I only kept searching for STV bios.

#

Took me forever!

untold cloud
#

@regal holly Turned out to be simpler than we thought in the end, to get it to recognize the LG.

Buttons working now, but it needs your magic powers soon, for the coord stuff. 😉

#

I can see the benefit of routing the H/V counters to the top level, and doing the crosshair and targeting stuff there.

pearl harbor
#

Dis just got real.

untold cloud
#

And adjusting the scale of the joystick XY stuffs, to match the screen res.

#

I can't tell if any of the aiming is working atm, as Virtua Cop doesn't seem to show a crosshair.

thorn pagoda
#

oh shit well done ash

untold cloud
#

Not working yet. This was just to get the games to recognize the LG.

#

And it was SO much more overcomplex than it needed to be. lol

thorn pagoda
#

yeah thats the part everyones been struggling with though i think

untold cloud
#
PAD_LG_EMU: begin
    PDR2I[5:0] = {JOY2[11:10],4'b1100};        // PDR2I[5]=Start. PDR2I[4]=Trigger. PDR2I[3:0]=ID
end
#

Was... just that. ^

tawny pendant
#

Will the STV games be a part of the _Arcade structure of mister or only played through the Saturn core?

untold cloud
#

Probably using MRAs, from now on. It does make more sense, vs loading STV carts from the OSD.

thorn pagoda
#

you got a branch up somewhere so nolbin and shane can take a look?

untold cloud
#

But I don't know - it's up to the powers-that-be (Sorg), I guess? 😛

#

Srg != Sorg.

#

@thorn pagoda For the lightgun stuff. Yep. I'll just push the latest tweak...

regal holly
untold cloud
#

I left the other code in VDP2 for now.

#

You could probably rip that out, then hijack bit[6] in hps2pad, for the Ext Latch signal.

thorn pagoda
#

@clear condor ^ just making sure you see this

untold cloud
#

I think the SMPC will route that signal to VDP2 correctly, but don't quote me on that.

#
PDR2I = (PDR2O & DDR2) | ~DDR2;

// Assigning to bits below, will override the above assign. EA

  PAD_LG_EMU: begin
    PDR2I[5:0] = {JOY2[11:10],4'b1100};        // PDR2I[5]=Start. PDR2I[4]=Trigger. PDR2I[3:0]=Weird nibble ID.
  end
#

Should in theory be able to route EXTLAT to PDR2I[6].

#

LG still on Port 2 atm.

#
        "P2OFH,Pad 1,Digital,Off,Wheel,Mission Stick,3D Pad,Dual Mission,Mouse;",
        "P2OIK,Pad 2,Digital,LightGun Emu,Wheel,Mission Stick,3D Pad,Dual Mission,Mouse;",
mighty eagle
#

golden axe: the duel working for STV?

gloomy hedge
#

I dont like this

untold cloud
#

Could ofc have it enabled on either port.

#

lol

gloomy hedge
#

my hentai should not be typing

#

anyways carry on

mighty eagle
#

i need a little stress relief after catering to your sick fantasies

warped saddle
#

no, Golden Axe not working

#

doesn't even boot

untold cloud
#

I wouldn't expect games like Radiant Silvergun to react to the Start button, any time soon.

mighty eagle
#

but i axed for it!

untold cloud
#

Did I AX you a question?

warped saddle
#

is that protection chip on the carts or the mb?

untold cloud
#

Erm, pass.

#

Probably... in the cart? (I'm guessing)

mighty eagle
#

ikaruga was a nice spiritual successor to RS

untold cloud
#

I think the common protection IC is the same (or very similar to) the one used in some NAOMI carts.

warped saddle
#

I tried the darksoft program rom for RS and it still has the start protection

untold cloud
#

And the MAME code for it looks VERRRRRRRRY complex, especially for a chump, like me.

warped saddle
#

so they either implemented that chip themselves or it's on the motherboard

untold cloud
#

Or, patch the games, but I imagine that would be even more complex.

#

Unless it's a really lame check that it does, in only a few places in the code (probably not).

#

Target seems to be at the left side of the screen atm.

#

Which would make sense, as the values X/Y from the HPS are only in the range of +/- 127.

#

Screen res is probably 320x240, something.

#

Oh, I could try the mouse. Can't remember how that even maps.

#

Nope. Don't know if it's possible to remap a USB mouse to be an "Analog" controller on joyport 2 / player 2.

#

Gonna try mapping Player 1 analog, oh, already is.

#
                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
thorn pagoda
#

i think you can use the right analog stick of a dualshock or something for lightgun testing

untold cloud
#

Worth a shot...

#
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.HCNT.HCT = {~mouse_x[7],mouse_x[6:0],1'b0};
    REGS.VCNT.VCT = {~mouse_y[7],mouse_y[6:0],1'b0};
    REGS.TVSTAT.EXLTFG <= 1;
end
mighty eagle
#

is there an STV compatibility list yet

#

im getting nothing but shmups working

#

scratch that

#

no start in guardian force

#

guardian FARCE

thorn pagoda
#

there's a new tab on the tracker for it

#

in the pins

mighty eagle
#

many thanks freddo

#

you truly are the king of kings

noble escarp
#

Nice to see Ash working on saturn lightgun. And STV is also happening. Amazing! ❤️

untold cloud
#

I think my aim is off. lol

#

Just a very rough test, using the USB mouse.

#

The aim kind of wraps the screen, and all sorts, but not bad for a quick test

thorn pagoda
#

i think it always takes a bit of trial and error to center things right

untold cloud
#

Oh, and Y is inverted atm.

clear condor
#

I would guess the gun uses Y=0 for the top of the screen or the end of vsync, since it's counting scanned lines

untold cloud
#

Yeah.

#

Mouse stuff probably starts Y at the bottom edge.

#

I had the Sight enabled, in the V Cop menu, but it doesn't show on the screen, as such.

#

And that's probably because I'm latching the H/V values on every Vblank.

#

So as soon as the game reads it, it clears the flag again, so it ends up not showing the crosshairs.

#

At least I think that's how it works.

pearl harbor
#

I knew I was always invisible...marioohno

old pasture
#

Just got back from work. Wudda miss?

rich violet
#

@untold cloud is making progress on lightgun support

#

🔫

old pasture
#

Thanks

tight haven
#

Is it possible that we'll see cheats "baked into" the Saturn core at some point in kind of a simple menu selection, kinda like how the ps1 core does it?

rich violet
ripe valley
#

Very low priority, the core takes already 98% of the FPGA space.
We're working on priority on the main system & some controllers support before anything else.

tight haven
#

Man, I'd be super down to assist if there was some low-level tedious tasks that need done to make it happen

stiff patrol
tight haven
#

ahh, so it's mostly a hardware ceiling we're hitting already with the core?

#

(I shouldn't say already, I know Saturn is a beast)

stiff patrol
#

core is over 96 %

ripe valley
#

We're almost at the limit.

stiff patrol
#

and over 90 % makes the builds harder

tight haven
#

Does ps1 core utilize a smaller portion of the FPGA?

visual grove
#

Yes

#

I think Saturn is the highest right? What’s ao486?

celest lake
#

pretty sure that’s right

thorn pagoda
#

could you get cheats by putting a cheat cartridge rom in the rom slot?

#

that shouldn't use any additional resources, assuming it works

visual grove
#

Cheaters never prosper

tight haven
tight haven
thorn pagoda
#

its worth a go anyway, maybe there's more to those carts than i think

noble escarp
#

I did something interesting that I still need to test on the core via snac. (it works on a real saturn)
A multitap with 12 controller ports. This will probably solve the problem of using multiple snac controllers.

thorn pagoda
#

huh

ripe valley
#

PS1 core is around 90-91%

#

Last time I tried to compile it.

thorn pagoda
#

there are some fpga parts that are more in shortage than others too

#

like the DSPs i think might be 100% used on a few cores

noble escarp
#

I don't think the gun works on a multitap

visual grove
#

Oh right

noble escarp
#

But if it works, a OEM multitap would already solve that problem

visual grove
#

I own no multitap to try it

thorn pagoda
#

would be good for bomberman

#

workaround the 6 pad limit on mister

noble escarp
#

Some options here. Using USB with a hub, then output as saturn (snac).
Or using two real multitaps connected to a single adapter that outputs to saturn (snac) as a single, big multitap.

west quail
#

Just catching up on the chat. Is the STV compatibility for this saturn core the same as ElectronAshs work? I thought they were.

clear condor
#

Ash is working on two things at nearly the same time

west quail
#

What 2 things?

clear condor
#

STV fixes, and USB lightgun support

west quail
#

Right

untold cloud
#

LightGuns don't kill people... SNACcers do.

#

(sorry, I'm bored)

neon python
#

That's some nice grouping

untold cloud
#

Too tired to figure out the scaling etc for the aim. I'll have to leave it in the capable hands of Mr Shane Lynch. lol

#

I was on a rifle range once, in New Zealand.

#

The real target looked a lot better. lol

#

Didn't think about the fact that I kept the (paper) target when we flew home.

#

You know... gunpowder residue... International Airports...

#

They swabbed the luggage at Sydney airport... didn't find anything. lol

#

No point compiling it yet - the mouse aiming thing is very broken.

hearty carbon
#

eh, you can repot a plant and set off some of those scanners. Not worth thinking about

untold cloud
#

Awake again.

#

Thinking about how the Saturn core wouldn't detect the lightgun being "off screen".

#

It would likely just not be triggering the EXLAT thing.

#

So that would probably have to be done using a deadzone band, around the edge of the screen.

#

eg.

#

if (cursor_x<10) || (cursor_x>310).

#

And the same for cursor_y, ofc.

#

I can't just be that the EXLAT output from the gun only works when the Trigger is pulled.

#

'cos some games I'm sure show crosshairs on the screen at all times, which would rely on EXLAT working whenever it detects light.

#

ie. I think EXLAT (light detect) and the Trigger input are totally independant.

#

When the trigger is pulled, most games will output the white screen on the next frame, and that's when the EXLAT signal latches the H/V counters in VDP2.

#

The game then reads the counter value(s) from VDP2 on the next Vblank (or possibly after an interrupt).

clear condor
#

If you show crosshairs at all times, the game needs to ensure the screen is bright enough that the gun can track the beam

untold cloud
#

Thanks. It's good to get confirmation for stuff like that.

#

I know some light guns actually do kind of latch the "light" signal when the Trigger is pressed.

#

But I had a feeling the Saturn LG was the simpler type.

wise brook
#

neat!

onyx gulch
#

For the ST-V core and if you need to check if you have the complete set, I made a full list of all existing dumps to date:

visual grove
#

It’s just a list of games so anywhere you want 😉

zinc vine
#

the mra files

heavy phoenix
#

is the Darksoft STV rom set working with the core ?

warped saddle
#

no

#

use mame

#

that's what the mras are written for

naive whale
#

I used two diff sets of files and comfirmed both work; .260 merged and a secondary MAME set on that internet library style site

warped saddle
#

I tried the RS darksoft program roms to see if maybe they were patched to defeat the protection but apparently not

ripe valley
#

Could someone check the Climax publisher logo on Dark Savior (USA) ?

#

Thanks.

ancient surge
ripe valley
#

A blinking line on the bottom right.

#

I've the same issue on the MiSTer PI on Ash version and the last unstable.

#

I will go to the living room, testing on the Dual RAM system.

ancient surge
#

Oh yeah, I did see that brief corruption I think. Not sure if that is a bug with the core or accurate to original hardware.

ripe valley
#

Corruption, it was fixed with some changes on the SCU.

#

So, that's a regression somewhere.

#

I was searching for something completely different on the game, verifying some other bugs on software emulation comparing with the current core.

#

Only the Single core is affected.

#

Using the Fast timings is worsen the situation.

ancient surge
#

For context, I saw the glitching on the dual RAM build. So I'm assuming it's not ram related.

ripe valley
#

Not RAM related, okay.

mortal mist
#

I posted the wrong main earlier , sorry !

ancient surge
#

Can anyone test Twinkle Star Sprites real quick? I keep getting this bug where on the second stage the controls keep locking up and the music cuts out. It's so consistent that it makes me wonder if it's a problem with the core.

wise brook
#

just booted in, looks good here

#

Do I have to get to stage four or something?

mortal mist
#

stage 4d

#

this is the only place where this error occurs

wise brook
#

goodness, do i need a save to stage select?

mortal mist
#

yes

#

select saturn version , select stage 4 in options + , select save file 1 from main menu

wise brook
#

no option to select stage?

#

So far will let me start on stage three a

mortal mist
#

yes , no select for a/b/c/d

#

only main

#

it's fast and easy with this firepower

wise brook
#

finally got it to work

#

my mister was over riding the save

wise brook
#

i’m at 4D now, holy smoke this is something else, no other chat boxes have come up tho

mortal mist
#

4d starts not immediately with dialogues

wise brook
#

looking fine right now, newest core and mister

#

dbl ram of course

mortal mist
#

it looks good 🙂

#

Did you use the MiSTer file I posted ?

ripe valley
#

srg320 found something interesting with Time Gal.

#

I need some time with him today and we will check together.

wise brook
#

just beat all of the chapter and now i’ve gone cross eyed

ripe valley
#

Issue closed then.

wise brook
#

honestly mind-breaking gameplay. the level of screen control, pattern perception, and total enemy awareness it demands is peak challenge

#

and what it’s doing with vdp2 is incredible to watch

mortal mist
#

Yes, masterpiece

ripe valley
#

And normal timings.

#

I'm on Stage 4.

wise brook
#

i’m in the second stage

#

and now 3rd, no issue with sound or controls

zinc vine
#

do i need to change the bios to bin?

mortal mist
#

ST-V?

zinc vine
#

forget it

proper prism
#

Is anyone else getting massive amounts of slowdown in Grandia?

#

It could just be the way the game runs. I don't have a way to test against an actual Saturn at the moment.

#

Also, I'm using the latest unstable dual ram core.

celest lake
#

I’m pretty sure that’s just how she runs. Folks have done a lot of testing with Grandia. You may want to check with Kuba or Zet as they do a ton of testing, but I’m pretty sure that’s working as intended

mortal mist
#

Slowdowns occur in Grandia on Saturn, especially when rotating the camera

wise brook
#

as a kid, I used to think slow down was the games way of drawing attention to how much cool stuff was going on on screen at once

rich violet
#

I used to appreciate the slowdown in Bangai-O on the dreamcast, gave me a change to make sense of everything that was happening

proper prism
#

Ok, cool. I kind of had a feeling that's just how the game ran, but I just wanted to make sure.

neon wind
high bramble
#

They slowed down for dramatic effect... just like when the hero slow-motion walks away from an explosion in all those cool action movies.

ripe valley
#

I checked the introduction of Grandia with a real Saturn system and two MiSTer systems today (Single and Dual), at the same time.

#

The core is synchronized with the real Saturn system.

ancient surge
#

I wonder why I keep getting unstable performance on the SEGA Saturn core. I hope it's not my hardware failing.

lofty spire
#

anyone try the newest Princess Crown translation update? is it finishable by non-Japanese speakers or does it still crash?

tacit viper
#

Dual ram build

lofty spire
#

interesting. shall give it a whirl on a single ram build

high bramble
#

Running just fine so far on single RAM.

pearl harbor
#

Did it just get another update? Last version I'm aware of was 8.0.

mortal mist
#

but it's some minor tweaks

rich violet
#

Looks like quite a big improvement. Narrower font means fewer speech bubbles, and the new font looks nicer. They've also got transparent speech bubbles instead of solid

mortal mist
#

nice!

#

core is in such good condition that I think it's time to play something not just test , maybe Princess Crown 🙂

rich violet
sacred goblet
#

What video processing is the best to emulate CRT?

mortal mist
copper furnace
mighty zephyr
sacred goblet
#

Ok i will try 🙂

tawny forge
drowsy hull
#

Does it load faster than real though?

sharp dove
#

I might go try out some PAL-games

mortal mist
#

I always check:

  1. that it starts up correctly , doesn't crash etc.
  2. check the menu , all options
  3. play about 10-15min

if you test with single sdram then in case of problems also check with fast timings option

nova marsh
#

I don't know if that's the most convincing representation of CRT but I think it looks great on my 65" 4k

acoustic sable
#

Looking great is the most important thing

gloomy hedge
#

is that by design?

#

make it pixel perfecccct

nova marsh
#

Yes it is intentional. emulating a PVM might work better for perfect pixels, but the best I grew up with my vintage consoles was with RF in an old TV.

acoustic sable
#

65” PVMs are vanishingly rare

nova marsh
#

It might be hard to tell from the pic but the scan lines add some chromatic abberation that blurs and distorts the pixels slightly

visual grove
#

Needs to be smoother/blurrier for RF

gloomy hedge
#

like the image prior to the filters should be pixel perfect

#

and then you can add the filters

#

is that the case here?

#

so are the filters causing all the like misshapped pixels?

#

ah yeah I guess maybe they are 🙂

#

def a pvm guy myself this is from a real saturn + retrotink 5x onto 1080p

#

I like a crispy image tho

nova marsh
#

Looks absolutely fine to me. on the pic the word 'night' at the top looks wonky but thats just the picture. it isn't like that in person. I'm not interested in having a PVM look. How many people in the 90s were playing these games on a PVM?

gloomy hedge
#

no one

upper dust
#

Needs integer scaling or an interpolation pass. Uneven pixels results in shimmering since the pixels resize as they move across the screen. Easy way to check is segmented life bars, like Mega Man.

gloomy hedge
#

I dont want my games to look like they did in the 90s haha

#

I understand going after that look of course

#

to each their own

nova marsh
#

I didn't even play with a composite image until the original Xbox. The RGB look was a fantasy to me.

gloomy hedge
#

whatever tickles everyones nostalgia funny bone!

pearl harbor
#

Composite on Xbox sounds like blasphemy to me!

nova marsh
#

Using interpolation with the same shadow mask and the aspect corrected. but it seems a little too wide.

ancient surge
#

SEGA Saturn typically outputs slightly wider than 4:3, comparable to the Mega Drive. I'm assuming it's the same case with the STV due to sharing the same hardware.

mortal mist
#

I think we're starting to run out of space

clear condor
#

Move some soldiers over to DSP

mortal mist
#

yeah 😄

#

compilation failed anyway

high bramble
#

100%? Bah.
You clearly have almost a couple hundred more ALMs at your disposal. 😏

celest lake
#

I was gonna say. Seems like some lazy math!

naive whale
naive whale
#

Lots I want to capture

dense sundial
#

Kinda wanna know how Saturn does its aspect ratio

#

Like, "corrected" looks alright to me on HDMI but it's horizontally squished to "normal" on my CRT?

#

Is it supposed to be "corrected" on some weird CRTs?

#

-# is this some SNES 8:7 stretched to 4:3 shit

gloomy hedge
#

so that could be part of what you're feeling

#

I have a 320 setup and a 352 setup for my saturn

mortal mist
outer relic
#

Aspect ratio vs art assets has been discussed before also. Depending on what type of screen the game devs used to create the graphics, some things will look squished or stretched on 4:3 despite being designed for that type of screen.

#

Or quick ports between systems having uncorrected graphics

thorn pagoda
#

i think that setting might just be leftover from the fact that the saturn core was based on the megadrive core in the very beginning

#

i'm not sure it even makes sense on saturn

ancient fractal
#

It does not.. the “corrected” setting that is grandfathered in from the old Genesis core (is it also available on the new Megadrive core?) is there to squish the 256px horizontal mode to square pixel aspect ratio, right?

thorn pagoda
#

i thought it made stuff slightly wider. i can't remember though

#

i remember it being hotly debated when it was new 😄

mortal mist
#
  • black transiton option set as default
  • scale and vertical crop 5x option added
ancient fractal
#

Yeah, possibly.. Anyway, Saturn’s 320px horizontal resolution should be displayed with a square PAR, while the 352px is obviously squished. Iirc the resulting image isn’t quite 4:3, I guess there was no suitable clock divider to get the same active width

#

Squished as in “narrow PAR”

twin canyon
#

we can go deeper

livid grotto
#

Has anyone got the "corrected" aspect ratio working direct on a CRT? I'm, going RGBHV right into a trinitron and Castlevania is a bit narrowly squished.

wise brook
#

it’s castlevania on Saturn my dude

dense sundial
#

Yeah, you ain't fixing it

outer relic
#

One can adjust the width of the image on a CRT...

dense sundial
green basalt
# nova marsh I use the shadow mask 1x rotated /complex/CRT style/subpixel BGR (Common)/Consum...

What resolution are you running the MiSTer at? 1080p, 1440p?

I had amazing scan lines in 1440p mode on my 4k set then realised it was adding on a fuckload of lag as opposed to essentially nothing in 1080p. Can't get integer scan lines in this mode though 😦

I can use the x5 crop which then allows nice scan lines but I've then lost a portion of the image. Fine for SNES and others with a safe zone but still not ideal

tawny forge
#

5x crop is you best bet for scanlines on 1080p without full integer scale with black bars all around

#

That or a RetroTink

nova marsh
green basalt
#

Yeah I used to have an OSSC too, got it at launch in the waiting list when it only supported 720p, DVI only, and the MiSTer is way better for scan lines for sure

nova marsh
#

There is definitely a lot more options on the MiSter for experimenting with. I try to get the RGB look from a consumer screen, but there's something for everyone's taste.

ripe valley
#

I received some personal news today, which could jeopardize my continued assistance on the project from the end of next week until an undetermined date.

I will have to deal with emergencies and job searches for at least the next 6 months and will have to do additional work elsewhere, all while having to manage with already precarious health.

There is no other possibility after discussions on my side.

I am therefore no longer taking any new requests and future issue reports to be managed for others as of today on the Saturn core.

#

Thanks for all.

shadow merlin
#

Thank you for all your work @ripe valley! I think it's fair to say that the core wouldn't be where it is without you. I really hope that things get better for you soon

wise brook
#

oh man, i wish you the smoothest 2025 possible and i hope that, as busy as it sounds you’re gonna be, you have the time you need to maintain your health, happiness & can find time to enjoy a good game or two!

thank you so much for helping nurture this project & helping answer the same newb questions day in day out

mortal mist
sacred goblet
celest lake
untold cloud
#

Thought I'd have a quick peek at how much each sub-block is using on the core.

#

Not that I think much could be saved.

#

Nor how to even do it. lol

#

Quite a lot of logic is used for the DDRAM block, as it does the cache stuff for each main thing that needs to access DDR3.

#

My brain works better if I think in terms of "Logic Elements" than "ALMs".

#

It was always LEs, on the previous Cyclone family chips.

#

Then the Cyc V came along, and now it's ALMs, because each logic block contains more stuff.

#

As a rough conversion, multiply the number of ALMs by 2.64, and you get fairly close to the typical LEs used for a core.

#

Or maybe 2.62.

#

The Cyc V on the DE10 is known to have 110,000 LEs.

#

And 41,910 ALMs.

#

110,000 / 41,910 = 2.6246

#

And the conversion does seem to be fairly linear, based on trying it on other cores over the years.

#

Anywho, that means the DDRAM block alone is using around 2,778 LEs.

#

I doubt that much could be trimmed off the 68K or SH2 CPU cores, so no point looking.

untold cloud
#

Percentage calcs might seem wrong on first glance, but I think they're correct?

#

(value/total)*100

#

I just would have expected some stuff like VDP1 and VDP2 to use a much larger chunk?

#

I haven't shown all of the blocks, when they are using very little logic.

#

But, doing a total of the percentages shown, it only comes to 64.479%. lol

#

Just shows how much all of the smaller stuff adds up.

warped saddle
#

time to cut out that pesky ASCAL

untold cloud
#

I think I'm missing a huge chunk of logic, in the Saturn top-level stuff.

#

Because Quartus does show the total for that "column" in the hierarchy thing, but doesn't tell you exactly which module that's from.

#

If that makes sense...

#

It says that the total for the entire Saturn "core", is 28,767 ALMs.

#

= 75,484.6 LEs.

thorn pagoda
#

now we have awesome external scalers could you create a minified version of the scaler that can only do directvideo mode?

untold cloud
#

AFAIK, DirectVideo already bypasses ASCAL.

#

Well, actually, not sure.

thorn pagoda
#

i think it might use it to scale to the horizontal superesolution

untold cloud
#

DV is usually just the "native" video resolution from the core, shoved into the HDMI chip.

#

And the ADV7513 chip does support pixel repetition etc.

sharp dove
thorn pagoda
#

nah its wider than native, like 2560x240p

sharp dove
warped saddle
#

not that it is much savings, alsa module can be entirely removed for this core

untold cloud
#

(which is necessary, to meet the minimum ~25 MHz "pixel" clock for the HDMI standard.)

thorn pagoda
#

oh yeah maybe itjust uses the adv pixel rep

untold cloud
#

That's true. Things like ALSA are only really for playing audio from the ARM Linux side.

thorn pagoda
#

in which case you could remove the whole scaler

untold cloud
#

The ALSA module reads a small buffer in DDR3, so it can transfer audio data from the Linux side.

zealous karma
#

@ripe valley I´m not here as active as I used to, but I´m lurking in here multiple times a week. I appreciate all you´ve done and agree that you have been instrumental for the rapid improvement of the Saturn core. Wishing you a speedy recovery in health and any workplace related issues you are facing.

untold cloud
warped saddle
#

there's probably going to need to be a separate ST-V core if there's ever any hope of that being in any working state

thorn pagoda
#

if resources are tight it makes sense to break that out

#

removing custom gamma support has precedent too, n64 does that

untold cloud
#

At first, I thought it would be good to merge the cores, as ST-V didn't seem to add too much logic.

#

But now that MRAs are working, there isn't too much point keeping the CD drive stuff when using ST-V.

#

Actually, I'll disable the CD stuff, like I did on my old ST-V attempt.

hallow fossil
#

It would make sense to split it out into a sister core, and then use mras like other arcade systems. There can't be space left for the additional hardware needed for some S-TV to run properly, and any support will be taking up space that could be used for other features and improving stability

untold cloud
#

It's usually as simple as holding the SH1 and YGR in reset.

#

Quartus will do everything it can to cull ANY logic which doesn't affect the output.

#

Or basically any logic which isn't "active" (doesn't change) whilst running. It figures it all out.

warped saddle
#

you can also define disable adaptive scanlines in ascal, but I don't know how much that saves

hallow fossil
#

I suspect srg320 will probably split it fairly soon

untold cloud
#
    SH1 #("rtl/cdb105m.mif") sh1
    (
        .CLK(CLK),
        
        //.RST_N(RST_N),
        .RST_N(1'b0),
#

And the same for the YGR chip.

#

I didn't seem to cause issues last time I did that.

#

And I can't really just comment out both blocks, because there are other signals (like Interrupts) which might screw up the core if they don't have default values.

#

ie. Usually on a core, default values are set in the registers etc., whilst in reset. So best to just leave those intact.)

wise brook
#

i would never have thought we’d get the arcade version of the Saturn before any of the arcade versions of ps1

#

quite the turnaround

untold cloud
#

(the weird 1'b thing, denotes how many bits of "width" to assign to the value, then the type, so b=binary. You don't necessarily have to include the first part, but it's good practice.)

warped saddle
#

ST-V is so close to saturn it was just sitting there. almost all of the ps1 arcade boards are ps1 + extra

untold cloud
#

Yeah, I think the Namco PS1 stuff is more complex, from vague memories from many years ago.

#

ST-V isn't too much more than a big Saturn cart, plus the new IO chip for the JAMMA edge etc.

hallow fossil
#

I don't think any of the arcades considered to be PS1 based are as close to PS1 hardware as ST-V is to Saturn, they all seem to require extra features and hardware

untold cloud
#

But, as we're finding out, maybe not quite that simple either. lol

warped saddle
#

like ZN1 has qsound

wise brook
#

ohh, i thought it was a higher clock speed and ram bandwidth

untold cloud
#

I think once we figure out why games like Die Hard crash so badly, a lot more games will start to work.

#

At least the ones which don't use an evil protection IC.

tacit viper
#

@ripe valley - Take care man, family and personal well-being above all else.

hallow fossil
#

All the best Zet, take care of yourself

untold cloud
#

Compiling a core now, with the CD stuff disabled.

#

I commented out this, too...

#
"S0,CUECHD,Insert Disc;",
warped saddle
#

so much space saved

untold cloud
#

All other stuff left the same.

#

Yeah. I think it will be quite a chunk saved.

#

Can't remember how much it was before.

#

But from the spreadsheet, probably around 8.77%.

#

I forgot to disable the HPS2CDD thing. hmm

#

Done that now. Just a bit worried it might lock-up the main MiSTer process, or something.

warped saddle
#

no, I think it works like his other cdrom interfaces

untold cloud
#

That should save roughly 9.32%

warped saddle
#

it increments a number, which the hps polls for a change in and then executes a whatever command

#

so it should just never see a change

untold cloud
#

Yeah, it's probably OK. I don't think it uses interrupts, as such.

#
        .CDD_CE(CDD_2X_CE),
        .CD_CDATA(CD_CDATA),
        .CD_HDATA(CD_HDATA),
        .CD_COMCLK(CD_COMCLK),
        .CD_COMREQ_N(CD_COMREQ_N),
        .CD_COMSYNC_N(CD_COMSYNC_N),
#

It's directly using the old-people Sony/Philips/Sanyo style command bus.

#

This is like 2nd or 3rd-gen CD drive stuffs.

#

The earlier drives mostly used I2S, for both Audio and Data. lol

#

Saturn looks to be using a very similar drive chipset to the Mega CD, which would make sense.

#

FWIW, this core will have the Virtual LightGun stuff, but using the mouse atm. And the mapping is very screwed-up.

#

That light gun I bought, arrived yesterday.

#

Waiting for a Saturn extension cable, so I can chop the end off, and build a SNAC adapter.

#

I only have ONE (working) CRT that I can use for "testing".

#

The other, is the tube from a 14" TV, hooked up to some Vector stuff. lol

wise brook
#

consider it a thank you for your work

untold cloud
#

Should be OK, but thank you. I have some SNAC adapters which I built a while back.

#

tbh...

#

And I probably should say this...

#

But I'm gonna risk not using the voltage translation. lol

#

The MiSTer IO board has 100R resistors in series with each USERIO/SNAC port pin.

#

And then 10K pull-ups to 3V3.

#

It's a small risk to the FPGA IOs, using SNAC without the voltage-translation FETs, but meh.

mortal mist
untold cloud
#

If this next core boots (lol), what should be call the RBF?

#

The "Compact Edition"?

#

"Saved a chunk of logic" edition?

warped saddle
#

'might be the last one if I fry my mister later.rbf'

untold cloud
#

Ahh... "noCD"

#

lol

#

Maybe.

#

noCD, I quite like, as it reminds me of late-90s pirate CDs.

#

Anyone tries to use it for Saturn, it will be painfully obvious when the CD option is missing from the menu anyway.

#

Can't really change the actual core name, as I think main MiSTer uses that to select the folder name on the SD card.

marble laurel
wise brook
#

neat! Doa may well be perfect now

celest lake
#

Saturnday ?

untold cloud
#

But I left SignalTap enabled. Oops.

#

Saturn BIOS still boots, but goes to a black screen after the logo.

#

As expected, with the CD stuff disabled.

#

I mean, it runs.

#

But only from MRAs. My old STV Cart binaries don't work, due to the byteflip in the core etc.

#

If you have multiple "Saturn" cores in the _Arcade/cores folder, it does look like MiSTer will choose the RBF with the later file date.

#

And there's no need to rename the core to Saturn.rbf, just keep the full filename.

warped saddle
#

yeah, I don't trust that rbf finding code for arcades, we've had way too many instances of people getting weird behavior and it turns out they had two of the same core in there

wise brook
#

so this is the future of the STV? selecting games from the arcade folder and it just booting.

i can live with that

untold cloud
#

Did somebody add extra shadowmask logic, or something? Or was that just playing with different masks earlier?

untold cloud
#

So yeah, probably worth just keeping it separate from the Saturn core.

#

Any fixes to the Saturn core should be quite easy to apply to ST-V

#

But ofc, this all depends on what Srg320 and Sorg think. lol

#

(ie. Just my two cents)

wise brook
#

does pulling the STV out of the Saturn get you back a % of logic elements?

untold cloud
#

It wouldn't be much, tbh. There really isn't much extra logic for the STV IO chip atm.

#

And very few changes, to allow (larger) ST-V carts to load, and to do the byteflip stuff.

#

The way ST-V reset the Sound hardware is also different, but that's almost no logic. Srg320 already added that, IIRC.

#

He did also hook up the RTC stuf, but I think most of that was already in the Saturn core?

#

LightGun stuff is also minimal.

#

It's just the Sat core was so jam-packed to begin with.

#

Worth leaving the BIOS and Cart load options on the menu.

#

The MRA will ofc choose the "best" BIOS for each game, but it's nice to have the menu options, for testing.

#

I just disabled SnargleFlap, and doing another compile.

#

That should save about another 2.7%

warped saddle
#

the whole split thing probably depends on how much resources all the additional stuff for ST-V takes

#

if any of the protection is even slightly complicated it probably won't fit

untold cloud
#

The most common protection IC stuff looks VERY complex, especially to me. lol

#

ie. the MAME code.

#

Just looking at the Light gun stuff used in the MD core...

#

I'd better leave the aim mapping stuff to somebody else.

#

But it works kinda how I thought - it doesn't route the H/V counters from the VDP, only the syncs etc.

wise brook
#

is this Shane’s area of expertise?

untold cloud
#

Then the Lightgun module has it's own H/V counters.

#

Then maps either the (analog) Joystick X/Y or Mouse X/Y to the LG.

#

Yeah.

#

Once it gets into even the linear algebra and weird bit concatenation stuff, my brain goes into standby.

#

OK, yeah.

#

MOUSE_XY signal just tells it to use the Mouse for the LG.

#

Else, it uses the Joystick XY stuff.

#

I'm not sure if Shane, Sorg, or somebody else wrote that module, but it's very well done.

#

And more complex than how I would have done it. lol

#

ie. it adds things like holding the "Light" signal high for a bit, to more closely mimic how a real LG would work.

#

(or have it trigger within a very small target area.)

#

Yeah - it has a Crosshair size o 0, 1, or 3.

#

So it will do a kind of bounding box thing, around the target "point".

#

Could maybe use that module almost as-is, but tweak it for the Saturn VDP2 video resolutions.

zealous karma
#

Saturnday!

untold cloud
#

Same core, but with SignalTap enabled.

#

It only saved 1%. lol

#

So down to 86% logic now.

rich violet
untold cloud
#

I've only tested it with PriKura (Princess Clara Daisakusen?) so far.

untold cloud
#

SignalTap is purely for debugging.

#

But occasionally, it can actually affect the core timings, if they timings are already marginal.

hallow fossil
#

Fresh builds in unstable nightlies

untold cloud
#

Is that a statement or request? lol

hallow fossil
#

Statement

untold cloud
#

OK

hallow fossil
#

#unstable-nightlies message

untold cloud
#

I don't think there's any point putting any of my RBF builds in any official release channel atm.

The only changes I made were: Disabling the CD drive stuff, disabling SignalTap, doing the (Direction) button fix, and some Virtual Lightgun stuff.

marble laurel
#

SRG320 added also a proper reset for STV

#

no remaining coins after reset or loading a new MRA

celest lake
#

I wonder why they're not showing up with the unstable update script yet

warped saddle
#

stuff probaby only refreshes the db every X minutes

celest lake
#

yeah, took a little bit but it grabbed it now

#

"small" update so surely this is 3DO week

tender axle
#

i tried this latest unstable

#

but it strange on Cotton 2 start button still doesnt work

old pasture
#

Do we have any more games working? I wanna do a Live Stream shortly.

marble laurel
tender axle
warped saddle
#

yeah, the start game thing is part of a protection chip

marble laurel
#

No new games also I think because no changes on this part also

warped saddle
#

the only difference on the STV side is some games that worked, the controls will actually work properly now

old pasture
#

Thanks, I may just do a Saturn Stream, and combine a bit of STD, oops I mean STV with it.

untold cloud
#

Started hooking up the Lightgun module from MD -> Saturn.

#

But now I'm realizing I'll have to re-enable the CD stuff.

#

'cos I don't know any ST-V games that use the Lightgun in the same way as the Saturn.

#

Quite a lot of button-handling stuff is done in the MD Lightgun module.

#

Which is kind of duplicating a lot of what's already in the HPS2PAD module on Saturn/ST-V.

#

So some of that can be trimmed down.

#

I removed all of the crap logic I added to VDP2, so it's basically the same as Srg's now.

#

The lightgun stuff will all be done via HPS2PAD (and the Lightgun module), to more closely resemble the real signal path.

#

Also started changing the CONF_STR stuff, to use the newer style bit selects.

tawny forge
#

What does “fix joystick” mean?

untold cloud
#

The old style has been confusing AF, for years.

#
        "P2[17:15],Pad 1,Digital,Off,Wheel,Mission Stick,3D Pad,Dual Mission,Mouse;",
        "P2[20:18],Pad 2,Digital,Virt LGun,Wheel,Mission Stick,3D Pad,Dual Mission,Mouse;",
        "P2[27],SNAC,OFF,ON;",
        "-;",
        "P2O[41:40],Gun Control,Disabled,Joy1,Joy2,Mouse;",
        "D4P2[42],Gun Fire,Joy,Mouse;",
        "D4P2[44:43],Cross,Small,Medium,Big,None;",
#

"fix joystick", I'm guessing is the fix for the Direction buttons.

#

Srg originally skipped a bit there, so Left didn't work at all, and Up, Down, Right were mapped wrong.

tawny forge
#

Whoa! So previous unstable was broken then

untold cloud
#

Now I'm struggling to keep up with Srg's changes. I'll have to add them later. lol

#

I believe so.

tawny forge
#

Thanks

untold cloud
#

Directions were broken (for STV) in his "Initial ST-V support" thing.

#

I'd love to see any new devs make sense of the status bit thing. lol

#
    // Status Bit Map:
    //             Upper                             Lower              
    // 0         1         2         3          4         5         6   
    // 01234567890123456789012345678901 23456789012345678901234567890123
    // 0123456789ABCDEFGHIJKLMNOPQRSTUV 0123456789ABCDEFGHIJKLMNOPQRSTUV
    // XXXX XXXXXXXXXXXXXXXXXXXXXXXX     XXXXXXXXXXXXX 
pearl harbor
#

Nice, Princess Clara Daisakusen plays great now on STV.

untold cloud
#

Especially when the original method used a lower-case or upper-case "O". sigh

#
        "P4oU,SCSP slot 26,Enable,Disable;",
        "P4oV,SCSP slot 27,Enable,Disable;",
        "P4OS,SCSP slot 28,Enable,Disable;",
        "P4OT,SCSP slot 29,Enable,Disable;",
#

It looks clearer on this font, than it does on Quartus, put it that way.

#

But still very ambiguous.

#

Basically, the letter "o" (or "O") denotes an "Output".

#

ie. it tells main MiSTer which bits of the status bus to toggle, depending on how you tweak the given menu options.

#

P4 = Page 4.

#

P4oU = Page 4... output bit 62.

#

I think.

#
assign SLOT_EN = {~status[31:28],~status[63:36]};
#

So the new method is, simply...

#
"P4[62],SCSP slot 26,Enable,Disable;",
#

FAR easier.

#

I always appreciated the ASCII art, though, which I believe kitrinx added originally.

#

Without it, it was even more confusing.

#

Looks like Srg separated the Coin and Start buttons now.

coarse tokenBOT
#
assign IN[2] = {1'b1,1'b1,JOY2[11],JOY1[11],JOY1[7],JOY1[3],1'b1,COIN1};
untold cloud
#

It's typical that I didn't see all of that, until now. lol

#

I'll probably have to just git clone the repo again, then paste in the lightgun stuff.

sharp comet
#

the new style is a lot easier than the letter tokens

untold cloud
#

For sure. It was SO confusing, for so long.

#

I think the bit selects in Verilog/SV, are one of the best features ever.

#

Which it was the same in C/C++.

#

Yep, Srg did fix the Direction buttons, in the latest commit

#
    //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]};
    assign IN[1] = {JOY2[14],JOY2[15],JOY2[12],JOY2[13],1'b1,JOY2[9],JOY2[8],JOY2[10]};
#

JOY bits [15:12] are the direction bits.

naive whale
#

Ooh left is now in the main core eh?

celest lake
#

Feature Complete™

untold cloud
#

Zoolander Fix (tm)

ripe valley
#

Thank you all for your kind messages earlier.
Difficult decision to make today.
I will continue to watch it sometimes but I can't finish everything I wanted to here at the moment.
Good luck in continuing all the efforts.

EDIT - I will try to do it as quickly as possible, but the next 6 months will be difficult for me and I cannot give as much time to the project as I have spent the last 3 years.

celest lake
#

Nothing but love Zet. Take care of yourself, duder

#

I won't let Robby take your Blue name

pearl harbor
#

Now we just need a screen rotate feature so Shienryu can be played correctly without interlacing! (Saturn version is interlaced to achieve its resolution in vertical orientation)

naive whale
#

Good thing I made a vid on your core @untold cloud for tomorrow then 🤣

#

Prior planning win

untold cloud
#

Oh, jeez. lol

#

As long as it's made clear that it's not "my" core. hehe

pearl harbor
#

ElectronAsh was srg320 all along! elmorise

naive whale
#

I make ahead and caveat out statements because I knew srg would merge it eventually and I don’t make videos on weekends unless it’s massive news

untold cloud
#

Case in point...

#

I totally messed up that last compile, and now it has NO video output. lol

#

Due to the crosshair thing.

#

The names for the default RGB output were different in the MD core vs Saturn.

#

And Quartus doesn't warn you of stuff like that, unless you add a keyword thingy, at the top of every file.

#
`default_nettype none
#

Which should really be made common-practice, on all cores, imho.

#

One of THE single most common mistakes made (esp. by me), is forgetting to add wire assigns, for busses.

#

ie. signals which are wider than ONE bit.

#

Quartus will happily hook up the single-bit stuff.

#

But if you don't add something like this for busses...

#
wire [7:0] my_bus;
#

Then Quartus will only hook up bit [0]. lol

#

Then you're left wondering "Why is that value only ever toggling between 0 and 1 ?".

#

For about six hours.

#

LOL

#

See.

#

The MiSTer framework now has support for dual analog sticks, on each joypad / player.

#
        .JOY1_X1(joy0_x0),
        .JOY1_Y1(joy0_y0),
        .JOY1_X2(joy0_x1),
        .JOY1_Y2(joy0_y1),
        .JOY2_X1(joy1_x0),
        .JOY2_Y1(joy1_y0),
        .JOY2_X2(joy1_x1),
        .JOY2_Y2(joy1_y1),
#

And those bus names aren't confusing in the slightest. 🙄

#

Core compiling. Grabbing some food.

analog crane
#

Hi! Can somebody point me to getting st-v roms running on the saturn core? BIN cartridges needed??

naive whale
#

Ready to release at 4 cst. With thirst trap intrigue 🤣

mighty eagle
#

should the RBF in arcade cores be updated?

#

or stick with the 1/27 version

naive whale
pearl harbor
#

Pretty sure you should use the new rbf? That's the core its using in arcade right? Otherwise why else would it need to be there?

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

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

It’s control fixes specifically for stv so yes update the one in arcade cores

untold cloud
#

(MRA pack from Zakk, will have the full name of the game as the filename. Copy all MRA files to your _Arcade folder.)

#

(you may or may not have the underscore before the _Arcade. lol)

#

AFAIK, the main MiSTer app will use the latest version Saturn RBF when running from an MRA, based on the filename.

#

And if the filename doesn't contain the date, it seems to use the actual file date.

#

Either way, probably best to only ever have ONE version of the Saturn/ST-V core in the _Arcade/cores folder.

#

You then load an MRA as if it's a "core".

#

The MRA tells it which ROM zip to use, and how to load the ROMs contained in the Zip. It will then also load the RBF for you.

#

To use STV, you need the later version stvbios.zip file, which contains the epr-23603 (Japan) BIOS ROM.

sacred goblet
#

The core seems to be nearly perfect now!!

timber lagoon
untold cloud
#

The arcade rotate module doesn't use a whole lot of logic, IIRC.

#

But with the Saturn core so jam-packed, it will be very hard to fit.

#

It would likely fit on an ST-V only version of the core, though.

#

Screen rotation can only really be done by using a Framebuffer.

#

AFAIK, the arcade_rotate module kind of works in conjunction with ASCAL.

timber lagoon
#

Framebuffer a given I guess. Same as arcade cores.

untold cloud
#

Logically, it's the only way it could be done. 😉

#

Since the core video output will scan left-right, then top-bottom.

#

I would only be able to access the pixels in another corner, if an entire frame was written to a framebuffer first.

#

I totally screwed up the CONF_STR atm.

#
        "P2,Input;",
        "P2-;",
        "P2[17:15],Pad 1,Digital,Virt LGun,Wheel,Mission Stick,3D Pad,Dual Mission,Mouse;",
        "P2[20:18],Pad 2,Digital,Virt LGun,Wheel,Mission Stick,3D Pad,Dual Mission,Mouse;",
        "P2[27],SNAC,OFF,ON;",
        "-;",
        "P2O[41:40],Gun Control,Disabled,Joy1,Joy2,Mouse;",
        "D4P2[42],Gun Fire,Joy,Mouse;",
        "D4P2[44:43],Cross,Small,Medium,Big,None;",
#

Only the Gun Control stuff showed up.

#

No idea what "D4" means.

#

Oh yeah, missing the "o", before the bit selects.

brittle burrow
#

I keep getting game.zip not found , ive tried a few different mame sets, no dice.

untold cloud
#

Do you have the game zips in /media/fat/games/mame ?

#

Comment notes.

#

I'm in limbo atm, trying to remember what changes I made, so can't really work on other stuff, until Quartus has finished compiling.

#

Just looking to get the lightgun module working atm. Stolen from the MD core.

#

The LightGun will still be mapped to joyport 2 atm.

#

But the buttons from joystick 1, joystick 2, or the Mouse, can be mapped to the Lightgun buttons.

#

Somewhere around here, I do have a USB "light gun" thing, which works using an IR emitter.

#

A bit like a Wiimote, but using a quad of four light sensors on the "gun" side, like some newer arcade LGs.

thorn pagoda
#

bear in mind people will want to use two virtual lightguns at once

untold cloud
#

Yep, will be possible to add that later, so it can be assigned to either joyport, or both.

#

It just got a bit confusing earlier. lol

#

Two LGs will require two Lightgun modules, as well.

#

Erm, and I'm not even sure how the Saturn handles that atm.

#

I guess it must change the reg settings on the SMPC during Vblank, to route the signals from either joyport/gun, to VDP2.

#

I'm sure this was quite a bit cheaper when I bought it, years ago.

Not available from this seller any more, though.

#

It worked surprisingly well, and I figured out the USB HID packets at the time.

#

Which let my bypass their crappy sw, and emulate a joystick in Windoze.

#

The gun part (green PCB) worked wirelessly, too.

#

It sends the info back to the USB receiver via IR, similar to the Sega Menacer.

#

A pair of sensors in each "window".

#

So it can detect the relative amount of light (from the USB emitter thingy) falling on each sensor pair.

#

So a crude camera, but lower latency than the typical Wiimote camera.

#

Only problem was, when I did my own app, to have it emulate an analog joystick in MAME, the target would only reach halfway up the screen. lol

soft goblet
#

Using the wiimote camera with i.e. OpenFire or Blamcon on an RP2040 works pretty amazing, no really noticable latency.. makes for fairly cheap DIY guns if you can source some cheap original wiimotes

untold cloud
#

I designed my own PCBs for the above thing, intending to get some batches made.

#

Never did get around to it, like half of my other projects. 😦

untold cloud
#

Does it still talk to the PC or console via Bluetooth?

soft goblet
#

This is using wired USB (directly to the RP2040), but it should be possible to use the BT RP2040, as well.. no idea how well that deals with BT latency, though

untold cloud
#

Ahh.

#

Wired would be best, yep.

#

Although I don't think the latency on typical Bluetooth is very high at all, these days.

#

tbh, I don't know how the latency is so high on modern console controllers.

#

I've never really played light gun games in any depth, but always been interested in it.

#

Even since seeing the giant rear-projection screen at the local arcade, playing Mad Dog McCree, etc.

soft goblet
#

I spent countless hours on virtua cop and time crisis as a kid.. was sad when it was no longer possible on LCD TVs, but had a blast with the DIY guns that have come out since

untold cloud
#

Saturn compile takes more than 36 minutes on this PC. sigh

#

I have wishful thinking, that the Dual Xeon my nephew gave me, might compile faster. lol

#

But my 5900X is apparently more than twice as fast (per core) than the Xeon, in benchmarks

#

Maybe, just maybe, it's not too bad on the Xeon, as I think Quartus runs a bit better on Intel.

#

Xeon has 12MB cache.

#

5900X has 64MB. 😮

untold cloud
#

Do you have a specific example of a game it can't find?

#

ie. what the message says, etc.

#

You have me wondering if I have the wrong folder, as I haven't updated my MiSTer setup in a while.

#

I think that's correct.

#

Maybe the version of MAME zips you have, doesn't match the zip name in the MRA, or something?

#

sigh…

#

That's what happens when you have overlapping status bits.

#

How incredibly annoying. lol

#

Can't get any combination where I can test the lightgun, and see all of the graphics layers at the same time.

#

Recompiling.

#

It's because of the debug stuff in the menu, which disables the VDP layers.

mortal mist
untold cloud
#
    BTN_A <= reload ? 1'b1 : (reload_pend ? 1'b0 : (BTN_MODE ? MOUSE[0] : (JOY[4]|JOY[9])));
    BTN_C <= (JOY[6]|JOY[11]); // Not mapped to mouse. Unsure if it's used in any game.
    BTN_START <= BTN_MODE ? MOUSE[2] : (JOY[7]);
#

Original lightgun core, from MD. ^

#

It has a reload option, which I think forces the "light" signal Low, and also presses BTN_A (usually the trigger) at the same time.

#

So emulates the LG being pointed offscreen.

#

That reload thing used BTN_B originally.

#

BTN_MODE chooses whether to map buttons from the Joystick or Mouse.

#

(which is driven by the menu option)

#

It's doing an OR of the joystick button signals from MiSTer, so either of the two buttons will work.

#
        "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;",
#

For the Digital joypad type, I guess that would mean...

#
joystick_0 or joystick_1 -> JOY on the lightgun module.

JOY bits...

[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
muted cradle
#

SATURNDAY!!

naive whale
untold cloud
#

Typical that Srg is working today.

#

I'm rushing to keep up. lol

#

I'll have to re-add all of the lightgun stuff to his latest core soon.

#

Just learned something new about MiSTer ,btw.

#
"D5P2O[20:18],Pad 2,Digital,Off,Wheel,Mission Stick,3D Pad,Dual Mission,Mouse;",
#

I didn't know what the D5 part was for.

#
D{Index} - Prefix which disables the option if menumask[Index] is set.
d{Index} - Same as 'D', but disables the option if menumask[Index] is NOT set.
#

But it is in the wiki.

#

Basically, it's what lets you grey out (or not) certain menu options, based on how other options are set.

#

Or based on ANY signal from the core, I guess.

#

On the hps_io module...

#
.status_menumask({|gun_mode,1'b1,1'b1,~status[8],1'b1,~bk_ena}),
#

So D5, would relate to bit [5] of status_menumask.

#

So I'm using the gun_mode thing there, to grey out the Pad 2 menu option when the Lightgun is enabled.

#

I know - it's not very clear. lol

#

(the | symbol, is a bitwise OR)

open swan
#

You should probably just wait

untold cloud
#

So, in my case, I'm using the OR to check if either bit of gun_mode[1:0] is set. ie > 0.

open swan
#

He might be doing the mras already

#

He's already familiar with the format.

untold cloud
#

I'm just working on the lightgun thing atm. It's mostly in place now.

open swan
#

For the st-v stuff that Is.

untold cloud
#

Oh, you mean the person asking about MRAs. lol

#

np

warped saddle
#

he's done an arcade core with mras before?

open swan
#

Battletoads pretty sure

warped saddle
#

nope

open swan
#

Or maybe he didn't do the mras.

warped saddle
#

hand loaded roms from the menu

#

anyways, the mras work. your stuff isn't in the right place or something

#

well "work"

#

most of the games don't, lol

untold cloud
#

LOL

Lightgun aiming is WAYYY off.

open swan
#

Do you plan on contributing a pr?

wise brook
#

but it exists!

untold cloud
#

I can't explain how badly the LG stuff works right now, but at least most of it is there.

#

It, like... if you move the mouse a certain amount, you get a miniscule area at the lower-left of the screen where erm, "something" appears.

#

Sometimes the crosshair fills the entire screen with Red. lol

#

Sometimes just one line.

#

I'm thinking the Blanking signals from the core are inverted, vs what the lightgun module expects.

#

So the crosshair is pretty much only working during blanking, which is obviously wrong.

warped saddle
#

at some point yeah, but it's really not worth it at this point

open swan
#

It's best to wait till the core is mostly done before adding features like this.

untold cloud
#
// On the video_mixer...
        .ce_pix(DCLK),    
        .HBlank(~HBL_N),
        .VBlank(~VBL_N)
open swan
#

Feeding inverts is kinda common

#

For the blanks

untold cloud
#
// On the lightgun module...
        .HDE(~HBL_N),
        .VDE(~VBL_N),
        .CE_PIX(DCLK),
#

Yep, just doing sanity checks atm.

#

That looks OK.

open swan
#

Was the real lightgun operating at the dot clock?

untold cloud
#

I'm thinking the Saturn shouldn't be using the gun_sensor_delay thing.

#

Dunno, but I have to start somewhere, then I'll start adding some of the counter values to SignalFarp.

open swan
#

He probably just has it as placeholder stuff copied from the megacd core.

#

I'll still be the advocate for you working on a pocketstation core instead.

#

Or a VMU core for fun.

untold cloud
#

tbh, I really want to get further with DC.

#

I know what needs to be done, but it's daunting, taking the next step.

#

I've never tried doing actual pipelining for a core before, so that should be interesting.

#

Pretty much just means, buffering the result from each stage in a reg.

#

Then delaying when I start writing the pixels back to the tile buffer (or direct to framebuffer).

#

It's the only way to mitigate the latency, and get it rendering frames fast enough.

#

With textures enabled, it's only about 4-5 FPS, at 30 MHz. lol

#

Would also be nice to get ASCAL to display the full 640x480 res, but I couldn't figure it out, and Grabulosaure has gone AWOL.

#
assign TARGET = { 2'd0, ~offscreen & draw};
#
        .R((lg_target && gun_mode && (~&status[44:43])) ? {8{lg_target[0]}} : R),
        .G((lg_target && gun_mode && (~&status[44:43])) ? {8{lg_target[1]}} : G),
        .B((lg_target && gun_mode && (~&status[44:43])) ? {8{lg_target[2]}} : B),
#

OK, so the bits of TARGET (lg_target) are just Red, Green Blue.

#

Well, backwards.

#
lg_target[2] = Blue.
lg_target[1] = Green.
lg_target[0] = Red.
#
    case(SIZE)
            0: cross_sz <= 8'd1;
            1: cross_sz <= 8'd3;
    default: cross_sz <= 8'd0;
    endcase

            x  <= lg_x;
            y  <= lg_y;
            xm <= lg_x - cross_sz;
            xp <= lg_x + cross_sz;
            ym <= lg_y - cross_sz;
            yp <= lg_y + cross_sz;

    draw <= (((SIZE[1] || ($signed(hcnt) >= $signed(xm) && hcnt <= xp)) && y == vcnt) || 
             ((SIZE[1] || ($signed(vcnt) >= $signed(ym) && vcnt <= yp)) && x == hcnt));
#
"P2O[44:43],Cross,Small,Medium,Big,None;",
#

It's... maybe a bit overcomplex. lol

#

Just need to check hcnt and vcnt with SignalTap first. I reckon the Blanking signals are inverted.

thorn pagoda
#

i think the psx core has a much simpler dot crosshair if that helps

analog crane
#

I´m getting the stv menu ...it´s telling me to "power up again" for system start....how do I do this??

untold cloud
#

The crosshair from the MD lightgun thing, looks to be lines that straddle the whole screen.

#

It can be quite fun, to code something in Verilog, to do different shapes.

#

I'd personally want it to be more like the cursor from HOTD2.

#

Or just a simple aiming box.

#

I think the above code is meant to draw a small cross, though?

untold cloud
#

Or the settings on the Input menu not correct, so it thinks a button is stuck.

#

Because the Factory Test menu can be triggered, by holding down the Test button on the core.

#

(which is mapped from one of the Saturn buttons. Can't remember now. lol)

#

You also need to be sure to set the Cartridge option to ST-V, then best to Save Settings, in the other-other menu.

#

ie. before loading any games / loading via an MRA.

#

Yeah, AFAIK, the "power up again" thing only appears on the Factory test menu.

#
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 ?
#

Something like that.

#

Srg changed his latest core, to map a Coin button separately.

#

He used to have it so the "Start" button was mapped to both Start and Coin on the STV.

#

That would explain it.

#

I do think the HDE and VDE signals from the core are already inverted, somehow.

#

No idea how that works OK for the video_mixer.

untold cloud
#

I have no idea how this happened...

#
        .HDE(HBL_N),
        .VDE(VBL_N),
        .CE_PIX(DCLK),
#

Yes... the blanking signals are supposed to get inverted. lol

topaz cairn
#

Can someone explain to me the setup of the st-v portion? Im a bit confused because VGE was loading the like regular games in the core, but PCN said he had mra files for each game. Where do the roms and Bios files go?

untold cloud
#

Originally, I was merging the ROMS from MAME, into a single "Cart" file, to load them.

#

When Srg did the recent changes, he made it so you don't have to go through all those steps to load.

#

It's best to use the MRA files instead, plus the MAME ROM zips.

#

The MRA pack from Zakk.

You should unzip this file, into the _Arcade folder on the SD card.

untold cloud
#

(or /media/fat/_Arcade, if copying via Linux / SCP etc.)

#

If your stvbios.zip file is too old, it won't have the 23603 (Japan) BIOS that most of the games use.

#

DM me, if you need that.

#

Then, when you want to load a game, you go to the Cores menu, then load an MRA file, almost as if it's a "core".

topaz cairn
#

Thanks for the info. Greatly appreciate you!

untold cloud
#

fwiw, you're not the only one to be confused - it took me months to get used to the MRA thing when it was first added to MiSTer.

And I still forgot it all again, a few weeks back. lol

topaz cairn
untold cloud
#
Saturn_MiSTer_STV-only_noCD_EA_20250201.rbf -> /media/fat/_Arcade/cores
stvbios.zip -> /media/fat/games/mame

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

stvbios.zip has to be in games/mame, AFAIK?

#

I'm not sure which other folders MiSTer will scan.

#

The ROM files (MAME zips) likely do need to be in games/mame, too, because they are MAME ROMs, not standard Cart ROMs, etc.

topaz cairn
#

ok awesome. in that rbf file available under test cores?

untold cloud
#

/media/fat, is just the root of the SD card, btw. (from the point-of-view of the Linux filesystem, on the DE10 itself).

If you're copying files directly onto the card from Windows or Mac, you can ignore the /media/fat part.

#

Not sure which RBF to recommend atm.

#

Srg has done some other tweaks to the core today, so maybe best to use the latest "unstable" build.

#

From the #unstable-nightlies channel.

topaz cairn
#

ok thanks again!

untold cloud
#

np

#

Oh, and apparently there's no need to rename the RBF to Saturn.rbf or anything.

#

If you have multiple "Saturn" core RBFs in that folder, MiSTer should in theory choose the latest one.

#

Based on the actual file date

warped saddle
#

plz don't encourage that

untold cloud
#

But it's best to keep only one RBF in that folder anyway.

untold cloud
warped saddle
#

like I have NO IDEA what it does with unstable named rbfs

#

with the github hash in them. it might do the right thing?

untold cloud
#

Oh, I assumed everyone was just using the file as-is.

warped saddle
#

I mean I"m sure some people are

untold cloud
#

AFAIK, the main MiSTer process only checks to see if the RBF filename has the date, etc.

#

Well, and the name of the core, at the start.

warped saddle
#

yeah, I've just seen too many arcade related bugs end up being 'oh I had two in there'

untold cloud
#

ie. I believe it would just ignore the "unstable" part of the filename.

#

As long as it starts with "Saturn", it should choose whichever file date is the latest.

#

But yeah, always best to have only ONE file in the folder at a time.

#

So really, best to just rename it to Saturn.rbf, or at least Saturn_20250202.rbf, or whatever?