#Sega Saturn

1 messages · Page 84 of 1

untold cloud
#

Not sure what the concensus is.

hollow quiver
#

sorry but where can I find this file? Saturn_MiSTer_STV-only_noCD_EA_20250201.rbf The internet is not being kind to me.

untold cloud
#

That's just one I compiled earlier as a test, with the CD stuff disabled, to see how much logic it would save.

#

Best to stick with the RBFs in #unstable-nightlies for now.

hollow quiver
#

ah ok. so the normal unstable one should be ok to use

untold cloud
#

Yeah.

hollow quiver
#

alright giving it a whirl

untold cloud
#

Now that Srg has fixed the direction buttons, and a few other things.

warped saddle
#

reading that code, just do Saturn.rbf

#

it does ZERO date parsing

untold cloud
#

Probably, but...

#

I know it doesn't matter, when using MRAs to "launch" the RBF...

#

But for all other RBFs (console, computer, etc.), if you don't have the date in the filename, it will hide the RBF from the MiSTer file browser.

#

Personally, I would vote for leaving the date in the filename. Not sure.

#

But just be sure to have only one copy of each core in there.

warped saddle
#

it's easier to tell people to just copy to saturn.rbf

untold cloud
#

Maybe you're right - for all arcade cores, just rename it to the "base" name.

#

Yeah.

warped saddle
#

the unstable builds have more than a date there

untold cloud
#

Good point.

warped saddle
#

and the process just uses the last matching filename, based on the opendir() order

hollow quiver
#

I guess it's expecting some specific rbf name to launch?

untold cloud
#

It's just weird, not immediately seeing the date in the filename itself, as that's all I've ever known... for about 9 years. lol

#

It will be expecting Saturn.rbf, as a minimum.

warped saddle
#

so anything that matches Saturn_*.rbf or Saturn.rbf matches. last match wins

untold cloud
#

(I don't think it cares whether it starts with lowercase or uppercase?)

warped saddle
#

it does not

untold cloud
#

I mean, you could argue that it's best to do the same for all other cores. lol

#

But then, as I say, for Console/Computer cores, it will hide the entire RBF from the MiSTer file menu, if you don't have the date in there.

hollow quiver
#

do I put the rbf into _Arcade?

warped saddle
#

_Arcade/cores/Saturn.rbf

untold cloud
#

But for Arcade RBFs (launched via an MRA), I agree, I think it's best to ditch the date.

warped saddle
#

ehh ok, the unstable filenames have the date before the hash, but still just use Saturn.rbf. it'll save us all some dumb debugging time in the future

untold cloud
#

Yep

hollow quiver
#

it's working evilGe

untold cloud
#

Light gun stuff still not working, btw.

#

It's very frustrating.

#

I sincerely hope the "SENSOR" output from the lightgun module isn't active-Low.

hollow quiver
#

wait what do I do

warped saddle
#

which game did you launch?

hollow quiver
#

tried Columns '97 and Radiant Silvergun

ancient condor
#

you just need to get cart type to stv...BUT

#

that's as far as I can get

rich violet
#

Radiant Silvergun doesn't work yet

ancient condor
#

I can't get any controllers to do anything

hollow quiver
#

what's one that guaranteed runs

rich violet
#

Some copy protection thing

#

Cotton 2

warped saddle
#

yeah, bring up OSD, set cart type to STV and then save

rich violet
#

And Shienryu

untold cloud
#

Yep, set to Cartridge to STV, and Save the settings, from the other-other menu page thingy.

rich violet
#

Probably others too

untold cloud
#

Also might need to try a core Reset, from the menu, on the first try?

ancient condor
#

so the input doesn't work on some games?

untold cloud
#

ie. I thought the Factory Test menu only appeared if you hold Test during reset / MRA / core load.

#

Games like Cotton 2 / Cotton BM used a protection IC originally.

#

The core doesn't have that yet.

#

So those games won't react to the Start button, sadly.

ancient condor
#

ahh

untold cloud
#

Actually, sorry, Radiant Silvergun won't.

#

The Cotton issue is a separate problem.

#

I reckon the problem with the Cotton games (and others?) might be fixable, with some tweaks to the SMPC.

#

But Srg might have to do it.

ancient condor
#

ok cool

untold cloud
#

I only managed to get it partially "working", where it would move the cursor around the game's on Test menu.

#

But I still couldn't get it to react to Start, in the game itself.

#

If that makes sense. lol

ancient condor
#

I think I saw a compatibility list somewhere, can't seem to find it now

untold cloud
#

The protection IC stuff for games like Radiant, looks VERY complex.

#

So could be a while until we see those games playable.

warped saddle
#

compat list is in channel pins, the google spreadsheet. there's an ST-V tab

untold cloud
#

Games like Die Hard seem to crash completely. No idea if any of the fixes Srg did will help there.

warped saddle
#

waiting for the SRG 'in my spare time I implemented this protection ic'

topaz cairn
#

I think my rom pack has way too many roms. I have 101 roms and only 61 nra files. Will that cause an issue?

ancient condor
#

thanks

warped saddle
#

no, having more won't matter. you could also have a split set?

#

I think there's a lot more 'roms' than the mame stv software list contains

#

also a bunch of those are like, print club stuff

#

which is never going to work

untold cloud
coarse tokenBOT
#
Known ST-V Games using this kind of protection
topaz cairn
warped saddle
#

I think that might be ok for the simple ones, but my understanding is there are some games where that ic might be involved in graphics ops

#

merged generally prefered, but I wrote the mras so split should also be ok

untold cloud
#

There's ZERO chance of me trying to implement that in Verilog.

#

Since I don't know the maths involved, I'd never be able to debug it.

hollow quiver
#

Thank you all. I got Shienryu to boot up

naive whale
warped saddle
#

even darksoft didn't bother doing that

#

also I think for some games that shit is deep

#

interestingly it is very much like the cps2 decryption

untold cloud
warped saddle
#

I’m blind

wise brook
untold cloud
#

It actually works spot-on, once I bothered to actually do the calib, by shooting the bullseye.

#

It just has a slight issue with not having enough horizontal range atm.

wise brook
#

do you also need to f9 calibrate the core too?

untold cloud
#

Don't think so, as this is just mapping the mouse X/Y to the core right now.

#

It's counting 352 active horizontal pixels.

#

Aiming cursor only allows up to 324.

#
        if(HRES[0]) lg_x <= j_x + (j_x >> 2);    // HRES[1:0]. [1]:0-normal,1-hi-res; [0]:0-320p,1-352p
        else lg_x <= j_x;
#

oic

#
        if(old_ms ^ MOUSE[24]) begin
            if(new_x[10]) lg_x <= 0;
            else if(new_x[8] & (new_x[7] | new_x[6])) lg_x <= 320;
            else lg_x <= new_x[8:0];

            if(new_y[9]) lg_y <= 0;
            else if(new_y > vtotal) lg_y <= vtotal;
            else lg_y <= new_y[8:0];
        end
#

That's the mousey version.

#

Top thing with j_x and j_y, is the joystick version.

#

I realize this lightgun module was taking from the MD core, but not sure why it would limit the mouse x thing to 320.

#

When the joystick logic, oh yeah, fair enough.

#

MD uses 8x8 tiles.

#

And it can switch between a horiz res of 32 tiles or 40 tiles.

#

So 256 pixels per line, or 320 per line.

#

I assumed the whole point of the lightgun module counting the pixels (and lines), was so it could use the full range of the mouse or (analog) joystick values across the screen range.

#

I was wrong. lol

#

Not sure I should have even used the HRES[0] bit for the joystick stuff, tbh.

#

OK, yeah. I'll just use that for the 320 vs 352 thing.

#
else if(new_x[8] & (new_x[7] | new_x[6])) lg_x <= (HRES[0] ? 352 : 320);
#

The "Big" crosshair does draw the lines across the whole width and height of the screen.

#

Not sure how to test it with the joystick sticks atm. I don't have a controller to hand.

#

Quite a few changes. That was... interesting.

#

Saturn VDP2 can do polling for the "Light" signal, instead of the Vblank flag thing.

#

I just set gun_sensor_delay to 2, for now.

#

On the MD core, it had some logic which set that value, depending on which game was loaded.

#

And the values were quite high, like 100-200.

#

Looks like it only counts the cursor as being "offscreen", for the vertical direction atm.

#

So the top and bottom edges.

#
offscreen <= !lg_y[7:1] || lg_y >= (vtotal-1'd1);
#

I don't know how most people play the games, where you have to point offscreen to reload?

#

But I would have thought quite a few people might aim off the side of the screen?

#
// HRES[1:0]. [1]:0-normal,1-hi-res; [0]:0-320p,1-352p
wire [8:0] screen_width = (HRES[0] ? 352 : 320);

  //else if(new_x[8] & (new_x[7] | new_x[6])) lg_x <= 320;        // MD
  else if(new_x >= screen_width-1) lg_x <= screen_width-1;        // Saturn.
#

Old MD code was checking for new_x >= 320, or new_x >= 384?

#

Ok, maybe there really should be a saturn-dev channel for this. lol

#

@regal holly Just wondering - did you write this lightgun module, or Sorg, or somebody else, or a bit of both? 😉

#

Looks like Sorg's style, for some of the bit twiddling stuff.

regal holly
#

A bit of both. I used one of his modules as a base.

untold cloud
#

Ahh, np.

#

Mostly working now.

regal holly
#

I forget which one I was referencing. SNES maybe?

untold cloud
#

Sounds strange, but on the iPad 9.7" LCD, and cheapo Logitech mouse, the latency feels super low.

regal holly
#

I really like those iPad displays

#

I just wish they were larger.

untold cloud
#

It is good. Can see a lot of detail, when debugging cores.

#

And the LCD controller latency is low.

#

Probably a wisecoco controller, or whatever they're called.

regal holly
#

Yeah I forget the exact measurement but I think it's a single frame.

untold cloud
#

My only gripe with the laserbear "CRT" style case, is it's too light. lol

#

I need to put some weights in it.

regal holly
#

So I have a flat one and CRT one and I put the flat one into an iPad stand

#

which was nice

#

plus I could then rotate it

untold cloud
#

Yeah.

#

I wanted the LCD one at the time, but ol' Greg didn't have any.

#

I was expecting the lightgun module to kind of "map" the joystick or mouse range to the screen range.

#

But I guess it wouldn't be very linear looking.

#

And yes, I did have the Blanking signals wrong at first. I was inverting them.

#

I changed it mid-compile, forgot I changed it, changed it back, compiled, broke, then had to compile again. lol

regal holly
#

Inverting signals is my super power

untold cloud
#

I mapped the Left mouse button to the Trigger.

regal holly
#

It's never correct the first time hehe

untold cloud
#

And Right mouse button to Start.

regal holly
#

Are you going to map a quick reload?

#

Offscreen shooting with a mouse sucks

untold cloud
#

Tell me about it.

#

I just tried the training thing, and couldn't hit a thing.

#

Presumably, the mouse bus thing, has the Middle mouse "button" on bit 2?

#

Code is still a bit fugly, but hopefully not too bad.

regal holly
#

I think so but I haven't touched any of that in a bit

untold cloud
#
    if(BTN_MODE ? MOUSE[1] : (JOY[5]|JOY[10])) begin
        if (RELOAD) begin
            BTN_B <= 1'b0;
            reload_pressed <= 1'b1;
            if(!reload_pressed) begin
                reload_pend <= 3'd5;
            end
        end
        else BTN_B <= 1'b1;
    end
    else begin
        BTN_B <= 1'b0;
        reload_pressed <= 1'b0;
    end
#

Oh, I thought the RELOAD input was a kind of "mode" thing.

#

But it's an actual input-input, yep?

#

To do an auto-reload?

#

oic, yep. At every Vblank, it decrements reload_pend.

#

And inhibits the SENSOR output at the same time.

#
SENSOR <= (!reload_pend && !reload && !offscreen);
#

And pulls the Trigger / Button A.

#
BTN_A <= reload ? 1'b1 : (reload_pend ? 1'b0 : (BTN_MODE ? MOUSE[0] : (JOY[4]|JOY[9])));
#

And does something with BTN_B. A lot going on. lol

regal holly
#

Basically makes the gun appear as it's pointing away from the screen then pulls the trigger

#

It can't do it too fast or it gets missed

untold cloud
#
    BTN_A <= reload ? 1'b1 : (reload_pend ? 1'b0 : (BTN_MODE ? MOUSE[0] : (JOY[4]|JOY[9])));
    
    if(BTN_MODE ? MOUSE[1] : (JOY[5]|JOY[10])) begin
        if (RELOAD) begin
                  // blah


    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]);
regal holly
#

At least that was the case on Genesis

untold cloud
#

OK, yep. It should work in a similar way on Saturn.

#

A bit confused now, as I'm only using MOUSE[0] (left click) and MOUSE[1] (right click).

#
        .LGUN_TRIGGER(lg_a),            // Active-HIGH input.
        
        //.LGUN_START(lg_start),        // Active-HIGH input.
        .LGUN_START(lg_b),        // Active-HIGH input.
#

Oh, I thought MOUSE[1] was the right button. Nope.

#

Probably the Middle button.

regal holly
#

I figured I would have mapped middle mouse to start

#

I can't actually remember heh

untold cloud
#

np. hehe

cold egret
#

I'm guessing there is a different bios to look out for

untold cloud
#

NOW I see why it needs the crosshairs. lol

#

Almost impossible to aim without it.

#

Virtua Cop is more fun than I remembered.

cold egret
#

Or is there something I am doing wrong?

#

Not sure if I can be helped

untold cloud
regal holly
#

Yeah, you definitely need crosshairs!

untold cloud
#

I remember playing Virtua Cop on PC in the 90s, when the PCs were only just about fast enough (software rendering).

#

Definitely didn't have a light gun back then either.

#

I do think it needs to Reload when off the sides of the screen, too.

#

Should be easy enough to add.

#

I'll try that tomorrow.

#

Gonna watch some YouTube... again. Lots of crazy stuff going on in the World atm.

#
reg  [9:0] lg_x, x;
reg  [8:0] lg_y, y;

//offscreen <= !lg_y[7:1] || lg_y >= (vtotal-1'd1);
offscreen <= !lg_x[8:1] || lg_x >= (screen_width-1'd1) || !lg_y[7:1] || lg_y >= (vtotal-1'd1);
#

Aiming works across the whole width of the screen now.

#

Added that fix for Reload off the sides (and top/bottom) of the screen.

celest hearth
umbral bluff
#

Does anybody know how to load Sega STV ROMS ?

celest lake
untold cloud
#

Auto-Reload thing messed up the controls. lol

#

Because I was using Left-Click (Button A) as the Trigger.

#

And Right-Click (Button B) for Start.

#

But with Auto-Reload enabled, Button B can't really be used for other stuff.

#

So now Left-Click = Trigger.

#

Right-Click = Auto-Reload.

#

And presumably, the Middle mouse "button" is Start.

#

Which makes sense, to have Reload on a proper button.

#

Almost all mice these days have a Middle "button" on the scrollwheel, unless you're on a Mac.

umbral bluff
celest lake
umbral bluff
#

Last question , dont know why but start button it's not detected

thorn pagoda
celest lake
untold cloud
#

I haven't tested it with a (analog) joystick yet, only with the Mouse.

wise brook
#

i will look forward to testing this in 4 hours lol

untold cloud
#

Left-click = Trigger.
Right-click = Auto-Reload.
Middle Btn = Start

#

I've only tried Virtua Cop.

#

Can't say for sure if it will work with games that use a different resolution.

#

Interlaced games might not work right.

#

Don't even know which Light Gun games would use interlaced. lol

#

Also haven't tried with a Wiimote or anything.

#

Haven't tried the F9 calibration thing in the main menu core.

#

Reload is now working at the sides (and Top and Bottom edges) of the screen, so you don't necessarily need the Auto-Reload button.

#

A menu option will be added for Auto-Reload.

#

Virtual Lightgun only on joyport 2 atm.

#

When you enable it, it greys out the Joyport 2 mode.

#

Up to 99% FPGA usage again.

#

(but with SignalTap enabled.)

#

No idea how ST-V handles light guns, so only Saturn for now.

#

Should really make it so enabling SNAC will grey-out the Pad 1 stuff.

#

Don't know if a real LightGun via SNAC (port 1), would work at the same time as Virt LG on port 2.

#
Virtual LightGun

Mouse mode...
Left-Click   -> Trigger.
Right-Click  -> Auto-Reload.
Middle-Click -> Start.

Joystick mode...
A or X -> Trigger.
B or Y -> Auto-Reload.
Start  -> Start.
untold cloud
#

Cotton 2 and Cotton BM don't react to Start, which is probably a separate issue.

#

The latter could probably be fixed. I'm fairly sure it has to do with a "bug" in the SMPC, which Saturn games don't care about, but affects some ST-V games.

#

But games that need the Protection / Decryption IC - could take a very long time before we see that working.

#

First accesses of the Protection IC, with Radiant Silvergun.

#

Don't know how that's working, as it only did a few Writes, and still let me hit Start, and get into the game.

#

Apparently it even has a Key, in ROM, for rsgun.

#
    // 610-0374-96   1998     317-5041-COM   ST-V
    ROM_PARAMETER( ":315_5881:key", "05272d01" )
#

Which doesn't appear to be an actual ROM file. It just tells it the key, in the above C code.

#

I was wrong. I only set the watchpoint to look at a range of 8 (bytes?)

#

It does loads of stuff.

#

Before it gets to the title screen.

#

Just before the attract demo runs...

#

That might just work - to do a kind of Look-Up Table attack.

#

This is MAME, btw. Before anyone gets too excited. lol

pearl harbor
# untold cloud

Seems to work pretty well so far with a mouse! I also just tried my guncon 3 for the heck of it, and I am actually getting some control with it. But the in-game cursor is wayyy slower than with the mouse. The "OSD" red cursor moves fine though.

untold cloud
#

Interesting.

#

You mean, Guncon (USB), with the core set to Joystick mode?

naive whale
pearl harbor
#

I think what's happening with the guncon 3 is that it thinks it's a d-pad moving the cursor, since it's moving just like when you control it with a d-pad.

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

Radiant might do other security checks between levels or something, but the above should be enough to get into the game.

untold cloud
pearl harbor
#

And when I set the guncon 3 to controller 2, the in-game (blue) cursor doesn't move at all anymore. So it only controls the in-game cursor when the guncon 3 is set to controller 1.

untold cloud
#

Yeah, that sounds like it would just be acting as a Digital joypad.

#

It would need to emulate a mouse, ideally.

#

But I don't know what "most" USB lightguns act as.

#

There is a standard in USB HID, for things to output the Absolute X/Y coords.

pearl harbor
#

The red OSD cursor moves perfectly though.

untold cloud
#

A mouse ofc uses relative stuff.

#

Yeah, the crosshair seems super smooth, and low-latency with a mouse.

pearl harbor
#

No, I mean the red OSD cursor controlled with the guncon 3 moves perfectly.

untold cloud
#

Mouse coords likely update at the full 1ms HID polling rate.

#

Oh, weird.

#

In-game might be using polling maybe? Which game did you try?

pearl harbor
#

So there seems to be a disconnect between that, and what the game is detecting.

#

Virtua Cop.

untold cloud
#

Strange.

#

And the OSD Gun option was set to Mouse mode, yep?

pearl harbor
#

Using the mouse, the red OSD cursor moves perfectly and the in-game blue cursor moves perfectly. With the guncon 3, the red OSD cursor moves perfectly, but the in-game cursor moves like it's being controlled by a d-pad.

untold cloud
#

I can only think that the Guncon 3 is emulating a Digital controller at the same time as emulating a Mouse?

#

I'd have to see the HID descriptor for it.

#

I'll have a look tomorrow.

pearl harbor
#

Like if the core can detect the guncon 3 as an actual mouse, it would probably work.

untold cloud
#

Supposedly, it does use the Mouse.

#

Hard to explain. lol

#

When you use a USB mouse on MiSTer, most cores use a ps2_mouse module.

#

And that spits out the X/Y coords, so the Lightgun module uses that

#

ie. it doesn't really assign the mouse to a "Player", as such.

pearl harbor
#

Yeah, the core is definitely assigning the guncon 3 to a player.

untold cloud
#

If the red crosshair is moving just fine with the GC3, but the in-game targeting is way slower, then something else must be happening.

#

Oh, I see what you mean.

#

Yeah, might need to add the option to map the Virt Lightgun onto Joyport 1.

#

It does kind of map to a player...

#

GC3 -> emulates Mouse -> ps2_mouse module -> Lightgun module -> Virt LG on Joyport 2.

pearl harbor
#

Basically the game itself is detecting it as a controller, but the OSD red cursor is detecting it as mouse control. Like the wires are crossed.

untold cloud
#

So yeah, the game likely expects it to be on Joyport 1.

pearl harbor
#

Moving the guncon 3 up down left right even controls the cursor in the Saturn's main menu (when no game is inserted).

#

Like a d-pad.

untold cloud
#

If the GC3 emulates a Joypad as well as a mouse, then it will likely do that, yep.

#

So the Buttons will map to Joystick for Player 1.

#

But the Mouse will map as a LG on Joyport 2, but the game expects it on Joyport 1, so gets confused.

#

This is why joystick mapping stuff is super confusing.

#

Especially with USB / HID involved.

#

I'll have to think about how best to add to the menu.

#

Because it will have options for enabling Virt LG on either Joyport.

#

So could just replace the "Off" thing on Pad 1 or Pad 2 with the Virt LG.

#

Which is how I had it originally.

#

But that causes another issue...

#

It can't support TWO virtual light guns yet.

#

So would only be able to enable one LG, mapped to Joyport 1, or Joyport 2, but not to both.

#

Gun Control would still need to be there. That has to match how the USB light gun "appears" as a HID device.

#

Either as a USB mouse, or a USB (Analog stick) joystick.

#

Yeah, I'll just have to add an extra menu option, to enable Virt LG on either Port 1 or Port 2.

#

But to also grey out the Pad 1 or Pad 2 option.

#

Gonna write a quick bit of Verilog for Radiator Silverback, or whatever it's called.

pearl harbor
#

Thanks for all your work on this! It's really interesting to see the progress on it and test it out.

untold cloud
#

The basis of spoofing the Radiant Silvergun initial check.

#

I'm sure there's a neater way to do it, but meh.

sudden pumice
untold cloud
#

Still awake, just.

#

SNAC option now greys-out the Pad 1 entry.

wise brook
#

good call

untold cloud
#

Light Gun can be enabled on Port 1 or Port 2.

#

As always, there is a slight issue.

#

It enables it on BOTH ports atm.

#

Or maybe that's because I had it set to Joy2 to begin with.

#

Resetting the core...

#

Quite strange.

#

Unless one player is mapped to a digital pad.

#

lol

#

You can enable the Lgun on BOTH ports, and it will fire both.

#

Both colour targets.

#

So it can definitely differentiate.

#

Pad 1: Digital
Pad 2: Virt LGun

#

^ Then it only shows up as the LGun for P2, as you'd expect.

#

But with the LGun only on Pad 1, it sort of shows up as if there's something on both ports.

#

Dunno.

#

At least it shows that Dual (Virtual) Light Guns should be possible, if the logic fits.

#

Setting Pad 2 to Digital, then using Scroll lock to map the Keyb to Player 2 joystick, doesn't seem to work.

#

Maybe it's that the SMPC isn't set up to map a light gun to either player in this way.

#

It's sort of usable, but enabling the Virt Lightgun seems to stop the Digital pads from working.

#

Unless you enable the Digital on Pad 1, and the LGun on Pad 2, then it works mostly as expected.

#

ie. in Virtua Cop, digital joystick on Pad 1 is still usable in the menu, with the LGun on Pad 2.

#

Then, only the Start button LGun lets you enter the Gun Adjust menu.

#

lightgun module is using 143 ALMs, so about 375 LEs.

wise brook
#

i’ll be out of work in an hour and will test before sleep

untold cloud
#

Possibly related to this...

#
                    PS_START: begin
                        if (!IOSEL[PORT_NUM]) begin
                            PDR_O[PORT_NUM] <= '1; 
                            PORT_ST <= PS_ID1_0;
                        end else begin
                            OREG_DATA <= 8'hA0;//8'hF0; //temporary hack
                            OREG_WRITE <= 1;
                            PORT_ST <= PS_NEXT;
                        end
                    end
#

I can't remember what the OREG stuff should say, for a LightGun on either port.

#

But I have a feeling it should be adding the PORT_NUM flag to the 0xA0, or something like that.

#

So, if the LGun is enabled on Pad 2, it works OK, and allows the Digital pad on Pad 1.

#

Because then the state machine in the SMPC writes the 0xA0 stuff, then stops.

#

But if the LGun is enabled on Pad 1, it's probably writing the same info to both parts of the OREG.

#

So makes the game "see" a Lightgun on both ports, even though it's only assigned to Pad 1.

#

Anyway, good enough for a test.

#

Definitely sleeping now. zzzzzzz

old pasture
#

We are in the same timezone too.

nova marsh
#

oh fk off sorry. youtube links are click bait

muted cradle
#

Fun findings: In Japan the Playstation was the clear winner of its generation and sold exactly as man units as the NES did over its lifetime and more units as the Super Famicom: about 19,35 millions of it

#

And the Saturn sold actually more units than the N64 in Japan

wise brook
#

wow crazy

muted cradle
#

5,8 million vs 5,5 million and much more than the mega drive before it (3,6 million). [numbers collected by chatgpt, didn't further verify them]

nova marsh
#

I don't like this bacon guy that makes yt videos on everyones work and 'forgets' to link in the description

muted cradle
#

In 1995 the Playstation was in front by a small margin (1,7 million vs 1,66 million) but in 1996 the Saturn sold actually more units than the Playstation in Japan (2,3 million vs 2,2 million). It was 1997 which broke the Saturn there: just 800.000 vs 5 million PSX. But still respectable. FF7, FF Tactics, Gran Turismo had happened there and Tekken 3 and Parasite Eve and Resident Evil 2 were on the horizon. FF 7 alone sold 3,45 million copies.

mortal mist
#

maybe someone will find these options useful. Thanks @untold cloud for helping me understand some things 🙂

wise brook
#

then is shall go to sleep

mortal mist
#

vertical crop is good for some games, like Castlevania , fills most of the screen then

wise brook
mortal mist
wise brook
#

We playing Virtua Cop on a 65’ oled!!!

#

that was with the bare minimum of calibration on my end.
incredible

muted cradle
mortal mist
#

I could even do it now. The only problem is the resources in the fpga. I don't know if such changes are a priority. Single sdram is 99% and dualsdram is 98%

#

Logic utilization (in ALMs) ; 41,343 / 41,910 ( 99 % )

#

Logic utilization (in ALMs) ; 40,951 / 41,910 ( 98 % )

muted cradle
#

Wow 😳

mortal mist
#

Perhaps there are still possible code cleanups that srg can do to still save space.

muted cradle
#

I hope that @latent wigeon will spin a new PWM build at some point

mortal mist
#

I think , changes for lightgun + crop will fit in core 😄

autumn crystal
#

2025 keeps getting better and better

mortal mist
mortal mist
#

I think it is better to do the same nomenclature and make: normal, full screen , not 4:3 , stretched

marble laurel
#

i think he started Saturn long time ago

#

and used template at the time

#

I think the change is around 2021

#

maybe he has another cores on his side not reveal 🙂

ripe valley
#

NBA Live '98 have an original game bug on the loading screen, the issue ticket should be closed.

#

I'm trying to finish everything I can before leaving some quite some time.
srg320 have an idea for the Time Gal / Ninja Hayate issue.

#

Thanks for all your hard work here.

#

That leave Dezaemon 2 to be checked once more.

mortal mist
ripe valley
#

Exactly.

#

I hope that we could have the lightgun and the crop options on a single core one day.

ripe valley
#

Cool!

mortal mist
#

we will fit in 🙂

ripe valley
#

WWF Wrestlemania and WWF In Your House have some troubles also with ODEs, intereresting.

#

I've done an almost full review of my installed games with the Saturn core yesterday night.

#

No regression, no issues found.

mortal mist
ripe valley
#

The core is in solid state, at least on the most major games.

#

Thanks to our mutual efforts and cooperation, and most of all, the major technical skills of srg320.

mortal mist
#

good to have people close to us like you Zet

#

don't disappear for too long

#

sorry if I write something wrong , but it's hard to pour thoughts from Polish 😄

ripe valley
#

I will try.
But I need to move inside the country, find a new job and such.

#

When I will have a more stable situation, I will be back.

#

I understand you clearly.

mortal mist
#

Looks good with crop

mortal mist
#

ok @marble laurel done

marble laurel
#

Great 😉

#

Thank you !

rich violet
#

Which games would use 1:1?

mortal mist
mortal mist
#

[ARC1],[ARC2]

rich violet
#

Oh, I see

mortal mist
#

; Custom aspect ratio
custom_aspect_ratio_1=16:10
custom_aspect_ratio_2=1:1

#

in ini

#

i do it for test only

noble escarp
# wise brook

Wow! Saturn virtual lightgun is a reality now?
Did anyone tested it with a guncon1?

dense sundial
#

I don't imagine GunCon1 works on anything but PS1

mortal mist
#

I'll create a PR, we'll see 🙂

kind bough
#

Has that been done with any other adapter Sonik?

#

Guessing the external sync connection helps somehow, vs other guns

mortal mist
#

yeah! it's merged elmorise

#

now only lightgun remains

untold cloud
#

But I don't think I could do a PR for Lightguns, until I have it working for two guns at once.

untold cloud
# wise brook

Ohh, you have fancy recoil. 😉

Was that with Digital on Pad 1, and Virt LG on Pad 2?

thorn pagoda
#

oh shit there's a lightgun build now? i gotta go try 😄

mortal mist
#

you rule!

ripe valley
#

I've just checked something on Wolf Fang Kuuga 2001.
The sprite priority is correct on the core compared to the real system.
"That's not a bug, it's a feature."

naive whale
nova marsh
naive whale
mortal mist
#

let's stay on Saturn here, please 🙏

naive whale
mortal mist
#

😂

naive whale
#

Speaking of Saturn I need to check out the updated Princess Crown translation tomorrow for a vid. Looks too improved not to check out

ripe valley
#

I had a rough with some Japanese journalists and fans about the core on MiSTer.
Saying the core is unprofessional, unpolished and can't be pushed on the SuperStation One later this year.
And on their 20 important games list to support, nothing was working correctly.

#

Politely, I've checked with them.

naive whale
ripe valley
#

They installed the stable core without changing the Main MiSTer file since 1 year.

#

And not using Update_All.

naive whale
ripe valley
#

Yes, so I asked a full retest and a possible change on their conclusions.

naive whale
#

Someone always wants to complain about something. Tis the way of retro gaming

ripe valley
#

We know.

dense sundial
#

They sound either too foolish or conceited to shit on it

ripe valley
#

Those people are generally cited by bigger magazines and websites like BEEP.

#

So, better to check a lttle bit.

mortal mist
#

core is in super condition, works beautifully, in truth there is nothing to complain about

naive whale
dense sundial
#

Aside from triggers on 3D pads ..

ripe valley
#

They complained too about the JPN compatibility list isn't done yet.
That we don't care about the JPN market at all.

I've explained the MiSTer project is open-source , working with people wanting to help and sharing.
Not a commercial project.

The JPN compatibility list isn't done because we don't have many people here very fluent in Japanese language and we don't have a full-time job in it.

naive whale
#

Add on top the misnomer that some people push that MiSTer is just software emulation / MiSTer is a “rip off” and you have a subset of people who are looking to “prove MiSTer wrong”

dense sundial
#

Could be worse, could be that one Canadian dumbass who keeps calling it a "scaler" that "filthy pirates enjoy in their echo-chamber cult"

ripe valley
#

And we could be more happy to have new Japanese-native (speaking) people helping on the project instead of just complaining and not explaining what's wrong.

naive whale
mortal mist
#

this is how it always is, the easiest way to complain , demand but give nothing in return

ripe valley
#

Yep

naive whale
safe trail
celest lake
#

Mr mister inc

naive whale
celest lake
#

Big Mister hates JPN

proper spruce
#

Cheers bros @untold cloud … id like to see how it loads on my mister setup some stv games i liked . i only loaded the bios … but i dont know where mra are

nova marsh
dense sundial
#

"it's open source community project"
"that makes no sense to us, tell us who MANUFACTURES them"
"..... Retro Remake"

naive whale
#

Japan is always hilariously multi faceted when it comes to games and preservation; they’ll yell into the ether about all manner of things and “piracy” and not being recognized then they will offer to let you get a single game for the X-55 data net station privately and ask 10K USD for the right to play it 🤣

dense sundial
#

I am still mad that the white city proto of Rockman X is in someone's hands and he is grubby about it

ripe valley
#

Anyway, the core is working great these days.
We're doing a superb work-chain since at least 2 years.

naive whale
#

Or you dump a lost arcade game and your inbox fills up with angry collectors telling you that you ruined their resale value

ripe valley
#

And thanks to PCN and AWBacon for the communication too.

celest lake
#

I wish the Japanese press was concerned about the x68000 core. Then maybe Puu-san would bless us with another release

ancient surge
naive whale
ripe valley
nova marsh
#

Will the saturn updates be int same core or spread across console and arcade?

naive whale
naive whale
#

Would maybe be easier as separate cores but that’s up to srg

#

My guess is it ends up being decided on whether there’s enough logic in the end to have all features in one core or removing the cd code allows fitment of the STV bits

#

Because there is still extra silicon to incorporate for a select few games if srg is focusing on the entire library

ripe valley
#

We need space, for the modem, the MPEG card and... the floppy disk drive. 😂

naive whale
#

Batman Forever being a prime example

nova marsh
#

broke my heart when Die hard Arcade didn't work. I won't lie

mortal mist
ripe valley
#

Missing some beans there.

naive whale
naive whale
warped saddle
#

yeah, unlikely the stv protection stuff fits if we're already at like 98%. I'm still wondering if jotego's cps2 decrypt implementation can be modified to work here

old pasture
#

5080 was disappointing, so I went 4080 Super with 98003DX.

Also some baked bean cooling.

warped saddle
#

more like baked bean cooking

old pasture
#

My wife does not know what I spent.

naive whale
naive whale
old pasture
naive whale
#

Or does she go by Mrs Voxel?

old pasture
warped saddle
#

yeah but how many of those aren't like 'camera and printer'. batman sound and like some weird shit like 'bash this thing with a mallet'

proper spruce
#

these are ok ?

naive whale
#

And you named your kids Polygon and Background layer didn’t you?

nova marsh
#

plug that jamma in. it messes with my OCD

naive whale
nova marsh
ripe valley
#

The protections on both systems are using some Feistel networks.

naive whale
warped saddle
#

the mame comments even say the cps2 one is very similar

#

I looked at the cps2 one in jtcps2 and it can probably be modified. I'd have to actually look though

#

also I'm not even sure if the mame stv implementation is 100% correct

naive whale
nova marsh
#

the cps2 had a dying battery on them?

stiff patrol
#

battery dies your board effectively suicides

naive whale
stiff patrol
#

but you can now recover all that

naive whale
#

Basically a battery backed chip that holds the key but that’s been solved with Phoenix’d roms for some years now

#

Used to be you’d have to carefully replace the battery with a second battery in circuit while removing the first battery. Plus they loved to leak and take boards with them via corrosion

#

(Well I think you technically had X amount of minutes removing the first battery before the ram purged its contents but most people just replaced in circuit)

warped saddle
#

you don't even need to phoenix anymore, you can just slap an infinikey on it

thorn pagoda
#

recovering boards where the battery scrambled the keys is possible now?

naive whale
#

I sold all my CPS 2 shit when the core existed. I never enjoyed setting up my CPS 2 with the multi. So I sold it for like $1500 and moved on

warped saddle
#

yes

thorn pagoda
#

nice

naive whale
#

Same with Konami boards. No battery can kill a game anymore

stiff patrol
#
naive whale
#

Capcom and Konami loved battery backed ram chips with the encryption keys on board. Or well in Konami’s case it’s not really encryption but a byte swapped string of hex that is checked for a checksum which ends up being the “key”

warped saddle
#

ok, stv has at least two protection chips. one of them is used for just decathelete and some print club games

naive whale
#

They got a LITTLE trickier in the Viper days by also adding unique serial numbers into the battery backed ram so that you couldn’t just hand write the hex file but now the serial numbers can be accessed with an arduino and some code

ripe valley
#

I remember working with people like Razoola on CPS2Shock back in early 2000's.
The first images of CPS2 emulation + Nebula, Kawaks and so on.
The drama with TheGuru about the ProGear SIMMs dumps.

warped saddle
#

hilariously for one of the print club games it compresses/encrypts the printer data

#

ah the old razoola/haze feud of the early 2000s

latent wigeon
naive whale
#

Funny enough I was just testing some NVRAM replacements for Konami boards for a video. Getting the shit off battery backed ram chips and onto long term solutions

warped saddle
#

also one st-v games uses a cdrom, and is not the same as the saturn so lol there

elfin apex
#

Is there a writeup somewhere on how these encryption schemes (which use primitives that are typically block-oriented and have multiple rounds) integrate into the overall system in CPS2 or ST-V? It seems like it wouldn't be able to transparently handle random access and would require some more structured kind of handling, like doing DMA of predetermined ROM ranges into RAM.

naive whale
naive whale
ripe valley
naive whale
#

Or Nicole Express may have

ripe valley
#

Yeah Nicole, too.

stiff patrol
naive whale
#

I mean I’ve never really 100% written up the reverse engineering of the Konami RTC security keys and I’m the one that sorted it out for real hardware

ripe valley
#

Andreas Naive blog was also essential.

#

Maybe the Wayback Machine have a copy.

stiff patrol
#

yep that was the guy who did the final work

wise brook
#

i am rizzen

#

time to test more light gun setup’s/combinations

#

today i voluntarily subject myself to death crimson

wise brook
naive whale
untold cloud
#

Gonna attempt to shove the Lightgun stuff into the latest core.

#

If only I knew how to use git properly, I'd be able to pull the new changes.

#

I'll have to just git clone the latest core, then paste the stuff in.

#

TortoiseGit is a big help.

#

But, there is quite a big problem.

#

Sergiy has all of the Debug menu options in there, which are using up most of the status bits.

warped saddle
#

there are 128 available status bits, is it really that full already?

naive whale
#

Haha I put that into a video at one point. I think about Death Crimson OX

#

About how good the music is

wise brook
#

i went with your recommended settings

untold cloud
#

OK, thanks.

#

Not sure what's up with it, when LG is on Pad 1.

#

Just did the first commit, though, trying to keep it relatively neat.

thorn pagoda
#

get a graphical git tool like sourcetree or gitkraken

#

makes all the branching/pulling/pushing/merging so much easier

untold cloud
#

It's already become super confusing. lol

#

I knew it would.

hushed hinge
#

hello 👋
is shienryu or radiant silvergun missing anything/bugged?
are they both fully playable on single RAM with no weirdness?

#

and is shienryu best played in ST-V or just plain Saturn?
or, is there a difference??

untold cloud
#

Radiant probably won't be (fully) playable for a while, as it uses the Protection IC.

#

Which is what prevents it from reacting to the Start button.

#

Shienryu, I didn't play for very long, but it appeared to be working OK.

untold cloud
#

Do you think it's necessary to keep the options for defining whether the Joystick (XY analog) or Mouse controls the Virt LGun?

#

ie. Do some USB lightguns emulate a Mouse for XY, but have the Buttons mapped as a Digital pad?

thorn pagoda
#

i think on most cores you map the lightgun buttons in the wizard

pearl harbor
# wise brook

What were your settings for this? I tried it briefly last night (the latest build) before going to bed and still couldn't get it working right with my guncon 3.

thorn pagoda
#

there are some guns that act like a mouse for the crosshairs and a keyboard for buttons too

#

but main should take care of all that ? cores don't usually need you to set anything in the osd other than enabling lightguns (in the controller carousel)

dull ridge
#

The current pinned core for single ram is linking to the dual ram build

autumn crest
rich violet
untold cloud
#

Die Hard doesn't work. It crashes the same as when I first tried ST-V. And it crashes... badly. lol

#
        "P2O[27],Pad 1 SNAC,OFF,ON;",
        "P2-;",
        "D5P2O[17:15],Pad 1,Digital,Virt LGun,Wheel,Mission Stick,3D Pad,Dual Mission,Mouse;",
        "P2O[20:18],Pad 2,Digital,Virt LGun,Wheel,Mission Stick,3D Pad,Dual Mission,Mouse;",
        "-;",
        "P2O[41],LGun P1 XY Ctrl,Joy 1,Mouse;",
        "P2O[42],LGun P1 Buttons,Joy 1,Mouse;",
        "P2O[44:43],LGun P1 Crosshair,Disabled,Small,Medium,Big,None;",
        "-;",
        "P2O[45],LGun P2 XY Ctrl,Joy 2,Mouse;",
        "P2O[46],LGun P2 Buttons,Joy 2,Mouse;",
        "P2O[48:47],LGun P2 Crosshair,Disabled,Small,Medium,Big,None;",
#

Added Dual Lightgun support, but I don't think the SMPC and VDP stuff is properly set up for that yet.

autumn crest
untold cloud
#

Yep.

#

I wasn't even getting the green screen when I tried. The fixes Srg did, got it a bit further along.

#

Die Hard causes the SH2 to jump to some random "code", then it just keeps incrementing the address, until it finally wraps to 0, and freezes. No idea why.

#

May even be some weird bank-switching stuff in the original Cart, but I don't think so

#

Doing a PR is more stressful than I remember.

#

I've only done a few in the past. Other core tweaks I've done, were kinda pass through Sorg at the time, or somebody else.

pearl harbor
# untold cloud https://discord.com/channels/647909397477195803/1046941029296779344/133565452402...

Hmm, still not working quite right for me. I was able to get it to work in the gun calibration settings in the game's options. But as soon as I try to start the actual game, it not longer tracks at all. Like it thinks the guncon 3 is a player 1 digital controller. I also noticed that with the red OSD cursor doesn't reach the right edge of the screen. So it's impossible to aim on roughly the 10% of the screen on the right side.

autumn crest
#

Thanks for the heads up though everyone, I thought I was doing something wrong LMAO

untold cloud
#

I did a PR for Gameport Joystick support on ao486 years ago, and Sorg shouted at me, because the commit contained about 300 extra files that the Quartus MegaFunction Wizard auto-generated. lol

pearl harbor
#

Might just be a guncon 3 thing regarding the game thinking it's a controller. Who knows.

untold cloud
#

Which game was that, btw. As it might be using a different screen res?

pearl harbor
#

Can't test anymore right now though. Need to drive my Dad to the store.

untold cloud
#

np at all.

pearl harbor
#

Always testing with Virtua Cop.

untold cloud
#

Hmm. Not sure. When I was using the Mouse to control it, I did a fix, so the crosshair would move to the right-hand edge.

autumn crest
#

Yup games working on that sheet boot just fine.

untold cloud
#

Unless you're using the slightly older RBF.

pearl harbor
#

It was the second rbf from late last night.

untold cloud
#

Oh, OK.

pearl harbor
#

Was there another one from this morning?

untold cloud
#

Compiling now, with Dual Lightgun support, but I don't expect it to work right.

#

Don't think so.

#

At least with Dual Lightgun support, it's a bit less confusing with the menu options, believe it or not. lol

#

As I no longer needs to have Joy 1 and Joy 2, to map to one lightgun.

#

It either has Joystick or Mouse control, for both XY and Buttons.

wise brook
untold cloud
#

And obv the joystick for each Player, will control the respective LightGun, depending on which Port/Pad you enable it on.

#

Talking of cleaning the house. It's a good point.

#

It's really quite bad in here, again.

wise brook
untold cloud
#

This probably helps explain why I haven't built any PCBs for months. lol

#

But that's only the small desk. There are two others, which are twice as wide.

#

Movies on physical media, FTW.

undone oyster
#

Ash does the GCon 3 work in the core now?

wise brook
#

it should

untold cloud
#

Got my a DVD / BR / UHD drive, to "backup" movies onto a 4K media player.

#

Sorry, back to Saturn World (tm)

wise brook
untold cloud
#

I'm still working on the core. Trying to do a "tidy-ish" PR right now, so it can be added to the main branch.

Thing is - Sorg kind of expects near-perfect PRs (I don't blame him), and there are a few issues with Virt Lightgun atm.

untold cloud
autumn crest
# untold cloud

Thats how my workbench looked about a month ago LUL until i decided to start working on my PS2 RetroGEM

untold cloud
#

I haven't had chance to test how Joystick (analog sticks) map to Virt Lightgun either.

#

It seemed to work OK when testing with a USB Mouse, but with the LG enabled on Port 2 / Pad 2.

#

And Digital Pad on Pad 1.

#

If I enabled LG on both ports, it of course used the same XY aiming for both.

#

But it did at least register a different colour when firing.

untold cloud
#

Reminds me of the Dave Chapelle sketch.

#

I love stuff like 80s synth pop, but all kinds really, from all decades.

But, as I get older, I am starting to like the heavier rock, and a bit more rap stuff.

#

We like LOUD music in our family, and giant speakers / amps.

autumn crystal
autumn crystal
#

normally it has a full calibration process and gives clean X and Y axes coordinates

untold cloud
#

gun4ir, yep?

autumn crystal
#

Something of note is that the mouse mode isn't really a mouse mode at all, it's a pointer mode (absolute coordinates instead of relative coordinates), I believe the mister mouse mode only support the former, meaning it's not aiming properly.

autumn crystal
untold cloud
#

Ahh. hehe

#

I was researching some LG stuff years ago, when attempting to design my own PCBs, similar to the AliExpress thing I bought.

#

I never did build them.

autumn crystal
#

yeah it's a very interesting tech for sure

untold cloud
#

The Lightgun module I'm using now, was taken from the MD core. Likely that Mr ShaneLynch wrote the majority of it, with tweaks from Sorg and others.

untold cloud
#

So I just hooked up the joystick XY, or Mouse XY in a similar way.

#

Somebody said F9. I don't think I've even tried it yet, as I need to hook up the Wiimote.

autumn crystal
untold cloud
#

Presumably, main MiSTer will then use the Wiimote XY to emulate a Mouse, or Joystick XY.

untold cloud
#

Yep, it's mostly working. At least with Virtua Cop, the mouse emulation was spanning the whole screen.
It also feels super smooth, and low-latency, at least for me.

autumn crystal
#

ah for basic setup I guess

untold cloud
#

MiSTer has got quite complex over the years, and the player control stuff must have been a nightmare to get working.

autumn crystal
#

yeah the main point of using the joystick input with a system like the gun4ir is that you can play without any crosshair and aim on sight like in the old time 😄

untold cloud
#

I found out yesterday, just how hard it is using a mouse to play Virtua Cop, without the Crosshairs. lol

autumn crystal
wise brook
#

worth noting that you are advised to calibrate the usb guns (guncon 2/3 gun4ir) with f9 on each core too!

untold cloud
#

I have a feeling it's gonna take me ages to figure out how to get Dual Lightguns working correctly.

#

I barely even have any controllers here.

autumn crystal
#

I should get you a gun4ir 🤣

untold cloud
#

Only an Xbox Series joypad (and now Xbox S/X), an old X360 pad which kept losing connection, some dirt-cheap AliExpress MD/SNES clones.

#

A few USB mice, a six-button MD thing (somewhere) which Mr Ricardo sent me.

#

And an 8-bit-Do SNES pad, with the SuperNT.

#

That's about it. lol

autumn crystal
#

indeed it's not much haha

untold cloud
#

The calibration thing on the menu seems a bit... rough.

#

It's possible that could be something added to the menu core itself.

#

To show an actual targets + cursor on the screen.

autumn crystal
untold cloud
#

But I'll look into that on a rainy day. lol

autumn crystal
untold cloud
#

AFAIK, it's just looking at the min and max values of the gun target XY coords, vs the edges of the screen.

autumn crystal
#

yeah

untold cloud
#

Then I would guess maps that to the min max values for the cores.

autumn crystal
#

over a 16bits variable

untold cloud
#

What a surprise.

autumn crystal
#

yeah it does a basic remap of the ranges

untold cloud
#

EVERY time you get close to a final-final compile, it breaks.

#

I think the FPGA is a bit too full now. Not sure what could possibly be trimmed down with this core.

autumn crystal
untold cloud
#

Yep

autumn crystal
#

even non FPGA

untold cloud
#

I've wasted YEARS of my life, trying to compile stuff under Linux, I know that much. lol

autumn crystal
untold cloud
#

I once had to compile a kernel driver for the Orange Pi / AllWinner SoC, and it took me over a week.

autumn crystal
untold cloud
#

(this was for running main MiSTer on an Orange Pi. It's a real shame that project couldn't easily be released.)

#

I had tons of MiSTer cores, including most Jotego stuff, running on an Orange Pi + QMtech Cyc V module.

autumn crystal
untold cloud
#

This was before Hans did his MiSTeX thing.

#

Actually, I quite like the Allwinner SoC now. It wasn't too hard to talk to the IO pins, by messing with the regs directly.

#

But, the H6 etc. doesn't appear to support DMA for the IO pins, which is a bit dumb. Unless you can abuse one of the IO periphs.

autumn crystal
#

I'm lost with all the mister clones or "successors" nowadays. Good old mister is still the way to go

#

as a daily driver I mean

untold cloud
#

It is still the "best" overall, but this was at a time when the prices were still high, and there were no real clones around.

autumn crystal
#

but I feel like it made it somehow more desirable for everyone

untold cloud
#

After I figured out how to get JTFRAME to compile stuff under WSL2/Linux (which was... interesting), I then had a template thing to run cores on my setup.

autumn crystal
#

a bit like the RPi became so popular when they were so expensive

untold cloud
#

And for MiSTer cores, I only had to overwrite about five files.

#

It also passed the native core RGB video via the Orange Pi's CSI "camera" port, then to HDMI. lol

#

That took me about three weeks to figure out.

autumn crystal
untold cloud
#

Alas, clones exist now, and QMtech sold out of the Cyc V modules (unsurprisingly).

pearl harbor
#

Parents decided to eat lunch first, so now I have to wait to take my Dad to the store. 😅

autumn crystal
thorn pagoda
#

lol i just got back from testing and there's already a new build

untold cloud
#

As long as the clones aren't using reclaimed Cyc V chips, and using half-decent switching regs, they are probably fine.

#

The one thing I'll NEVER understand, is when QMtech only went to about 95% clone, then gave up. lol...

autumn crystal
untold cloud
#

ie. They ditched the Arduino headers, and moved all of that to the top 40-pin GPIO header.

thorn pagoda
#

i have some possibly redundant feedback: using a gun thats in joystick mode (rs3) i can't get the virtual cursor calibrated correctly horizontally, there's always like a 5cm area on the right side of the screen i cant drag the cursor into for some reason

untold cloud
#

Making it totally incompatible with existing SDRAM modules, and causing confusion.

thorn pagoda
#

however, the saturns ingame gun calibration can counter that and i had an awesome time anyway

#

player 2 doesn't work which i think is expected

autumn crystal
untold cloud
#

Well, the lower GPIO header is like the standard one for SDRAM modules, IIRC, but don't quote me on that.

Then they have a version with SDRAM onboard, and kept one GPIO header, or one non-standard one, it's very confusing.

thorn pagoda
#

it does have AR correction but it shouldn't even matter, this issue doesn't occur in the PSX core

untold cloud
thorn pagoda
#

i think you can just use a joypad for testing if you want

#

or i'm happy to play as much virtua cop as you need 😄

untold cloud
#

Possibly, but best if I find a joystick with analog sticks.

autumn crystal
thorn pagoda
#

dualshock or something

untold cloud
#

I know MiSTer can map a Digital pad to the analog XY, but that's even more confusing.

#
// HRES[1:0]. [1]:0-normal,1-hi-res; [0]:0-320p,1-352p
wire [8:0] screen_width = (HRES[0] ? 352 : 320);
#

Mouse mode...

#
else if(new_x >= screen_width-1) lg_x <= screen_width-1;        // Saturn.
#

Joystick XY mode...

#
        if (HRES[0]) lg_x <= j_x + (j_x >> 2);        // Use j_x + (j_x/4) ?
        else lg_x <= j_x;                                    // Use j_x directly as lg_x.
autumn crystal
untold cloud
#

tbh, I just threw that HRES[0] thing into the joystick code. No idea what I was doing. lol

#

Don't even quite understand what the old code was doing.

#

But looks like it was adding 1/4 of j_x (joystick X) to itself.

#

So like 1.25? Dunno.

autumn crystal
untold cloud
#

OG MD core Mouse code...

#
else if(new_x[8] & (new_x[7] | new_x[6])) lg_x <= 320;
thorn pagoda
#

the left edge may of also been off in the sense i could push the cursor outside the image too come to think of it

untold cloud
#

OG MD core Joystick XY code...

#
if(H40) lg_x <= j_x + (j_x >> 2);
#

H40 is the 40-tile wide mode on MD. 8x8 pixels per tile, so 320 wide.

thorn pagoda
#

is PSX core possibly a better reference? it's newer and was written with tighter resource constraints

untold cloud
#

When H40 is Low, I believe it's only 32 tiles width, so 256.

#

Saturn looks to be either 320 or 352 wide.

untold cloud
thorn pagoda
#

yeah thats fair no need to reinvent the wheel if this works 🙂

untold cloud
#
wire [8:0] j_x = {~JOY_X[7], JOY_X[6:0]};
wire [8:0] j_y = {~JOY_Y[7], JOY_Y[6:0]};
#

OK, so the j_x and j_y values, are just the Unsigned version of the coords.

autumn crystal
untold cloud
#

Normally, they would be -127 to +128, or whatever.

#

It just flips the Sign bit, to convert to Unsigned.

#
 if (HRES[0]) lg_x <= j_x + (j_x >> 2); 
autumn crystal
untold cloud
#

So that really would just do the max Joy X value, plus 1/4 again.

#

So j_x * 1.25.

autumn crystal
#

xbox 360/one controllers for instance use 32bit ranges

untold cloud
#

Unsigned with 9 bits, must mean, oh. That makes no sense. lol

#

It shouldn't need 9 bits, unless, oh yeah.

#

Unsigned, but they are still doing some SIGNED calcs on that.

#

So the extra MSB bit means it's always zero, which is correct.

#

So j_x and j_y unsigned, are likely to be 0 - 255.

#

255 >> 2 = 63

autumn crystal
untold cloud
#

255 + 63 = 318.

#

So yeah, that's the problem.

autumn crystal
#

yeah

thorn pagoda
#

are the lightgun games actually that wide?

untold cloud
#

It looks like a cheapo way to get close-ish to 320 wide, for MD.

#

It's the actual console/cores native resolution.

thorn pagoda
#

oh

untold cloud
#

Both MD and Saturn can use different modes / pixels-per-line / width.

autumn crystal
thorn pagoda
#

odd as it may sound, since the ingame calibration can correct this does it matter?

#

you just have to play with crosshairs off is all

autumn crystal
untold cloud
#

My screen_width param, switches between 320 and 352, based on the Saturn horiz res.

thorn pagoda
#

oh right so you're losing precision

autumn crystal
#

it probably won't be noticeable as long as the game doesn't ask you to shoot on the edges I guess

untold cloud
#

352 / 256 = 1.375. lol

autumn crystal
#

but not great either I guess

untold cloud
#

352 - 256 = 96

visual grove
#

ARRR matey

thorn pagoda
#

probably best sorted out if it can be, didn't stop it being fun though 😄

untold cloud
#

(technically 255 max, for the joystick X/Y, but don't tell anyone.)

autumn crystal
untold cloud
#

How to make a value of 0-255, span 0-352, without too much effort? hmm

autumn crystal
#

damn, a lot of precision lost in the process

#

and maybe overhead 😄

untold cloud
#

Yep, pretty much 8-bit values, for most of the "analog" stuff.

autumn crystal
untold cloud
#

Mouse precision is probably higher, at least internally to the ps2 module, but ofc the mouse uses relative (delta) stuffs.

autumn crystal
#

modern ones are all between 10 and 32bits per axis

#

the gun4ir is 12bits per axis. I wish we could pass it directly to the core and convert it down. Not sure it would do much in term of added precision tho, probably just me being nitpicky.

thorn pagoda
#

oh shooting outside the screen worked perfectly too btw

untold cloud
#

Yeah, it (the MD lightgun module) used to only detect "offscreen" at the top and bottom edges.

#

I added a tweak, so it works for the sides, too.

untold cloud
#

But yeah, many cores are quite low-res anyway.

#

It would help maybe reduce a little bit of "jitter" when doing the mapping?

#

Trying to think of how to map 0-255 to a max of 352. lol

But preferably without using multipliers nor dividers.

#
352 / 256 = 1.375
#

Need to keep adding just over 1/3.

#

But as smoothly as possible.

thorn pagoda
#

ask in #dev-talk

untold cloud
#

I just need to stare at it for a while. lol

#

I was planning on having a break today, but don't mind a bit of this. Quartus apparently still compiling (again).

#

I had to delete the db and incremental_db folders, and just try another compile.

thorn pagoda
#

its always super exciting when you start seeing first results working 🙂

untold cloud
#

Oh yeah, the Mouse is different..

#

'cos relative movements.

thorn pagoda
#

yeah i don't think mouse can ever have this kind of "range" issue

untold cloud
#

So it only needs to limit it to a max 320 or 352 resolution.

#

But for joystick X, it has to map 0-255 (just call it 256. lol) to 320 or 352.

#

The old MD method gets it close enough for 320, or actually 318...

#
lg_x <= j_x + (j_x >> 2)    // j_x + (j_x/4).
thorn pagoda
#

are there actually 352 lightgun games?

untold cloud
#

Yep, I believe Virtua Cop runs in 352 width.

thorn pagoda
#

hotd and virtua cop struggle with performance i'd be surprised if they were full width

#

ah

untold cloud
#

But I was using the Mouse, so hadn't tested joystick analog sticks yet.

#

255 / 3 = 85

#

Don't know. Probably can't map it in a smooth way, without using a divider or something.

#

I suck at maths. lol

thorn pagoda
#

its not one of those things where its easier to just use a pre-baked lookuplist is it

#

i think n64 analog stick had to use those

untold cloud
#

Probably could, tbh. But it might just have to use an actual divider.

#

I'll ask chat gippity...

pearl harbor
#

The "invisible wall" on the right side of the screen is still there, and the game doesn't align the shot entirely with the red OSD cursor, but it's working.

untold cloud
#

I mean, you gotta hand it to modern "AI" language models.

It hasn't really been a thing for too long, and it's already super helpful.

untold cloud
#

Just looking at fixing that now. 😉

pearl harbor
#

I needed to set pad 1 to the lightgun and pad 2 to digital. If I set both to the lightgun, it was doubling some of the inputs (like pressing start to pause would just pause and re-pause immediately).

pearl harbor
#

That said, Virtua Cop 2 works way better, because it actually has an option to fix the aiming in game. Your shots don't line up with the red cursor, but they do line up by simply aiming down the sights of the gun and shooting. So if you turn off the red cursor in the OSD, Virtua Cop 2 just works outside of not being able to aim on the far right side of the screen.

untold cloud
#

Oh, Pad 1 as Lightgun works?

That was stopping any Digital Pads working, for me.

#

It would only allow Digital on Pad 1, and LightGun on Pad 2.

#

I think I know what the problem might be there, but that will take (me) a while to fix.

pearl harbor
#

Might be a guncon 3 thing. Since setting pad 1 to digital and pad 2 to lightgun is what was not working for me.

untold cloud
#
if (HRES[0]) lg_x <= j_x + (j_x >> 2) + (j_x >> 3);    // Saturn. Map 0-255 to 352-wide res.
else lg_x <= j_x + (j_x >> 2);                         // Saturn. Map 0-255 to 320-side res
autumn crystal
untold cloud
#

Pass. lol

#

I guess it depends what the device reports / uses, on the USB HID Descriptor.

#

Don't know if there is a limit to the max precision in the main MiSTer code, or if it just maps whatever it finds

#
// Saturn. Map 0-255 to 352-wide res. (actually 0-349, but close enough)
// Saturn. Map 0-255 to 320-side res. (actually 0-318, but close enough)
#

Two pixels short of the right-hand side, for 352 mode.

#

And one pixel short, for 320 mode.

#

Not gonna get much better than that, without having super weird jitter.

#

But means I might have to tweak the "offscreen" thing.

mortal mist
untold cloud
#
// Check if the target is off the edge of the screen. (Left, or Right, or Top, or Bottom).
offscreen <= !lg_x[8:1] || lg_x >= (screen_width-1'd1) || !lg_y[7:1] || lg_y >= (vtotal-1'd1);
#

Screw it. I'll just tweak that as screen_width-2. lol

#

Why would the Saturn core go directly to a starfield animation?

#

Oh, ffs.

#

Graphics layers missing again. sigh

#

status bits overlapping. I NEED to disable Srg's debug stuff.

#

Hopefully now, people can see how hard it is, just to confirm a core fully works. lol

#
`ifdef DEBUG
    assign SLOT_EN = {~status[31:28],~status[63:36]};
`else
    assign SCRN_EN2 = ~status[42:36];
    assign SND_EN2 = ~status[45:43];
`endif
#
        "P2O[41],LGun P1 XY Ctrl,Joy 1,Mouse;",
        "P2O[42],LGun P1 Buttons,Joy 1,Mouse;",
        "P2O[44:43],LGun P1 Crosshair,Disabled,Small,Medium,Big,None;",
        "-;",
        "P2O[45],LGun P2 XY Ctrl,Joy 2,Mouse;",
        "P2O[46],LGun P2 Buttons,Joy 2,Mouse;",
        "P2O[48:47],LGun P2 Crosshair,Disabled,Small,Medium,Big,None;",
#

Input menu is a bit fugly Betty.

#

I thought this...

#
"-;",
#

Would space out the lines, but apparently not.

copper furnace
#

Is there a plan to expand this feature? For example: 2x; 3x; 4x?

pearl harbor
#

Oh wait, Virtua Cop 1 also has the same aim adjust that 2 has. The on-screen directions were just a little different, so I didn't realize how it worked. But yeah, once you fix the aim adjustment, you can literally just turn off the red OSD cursor, and play the game like normal. The red cursor just makes it more confusing anyway, since it doesn't align with where you're aiming.

copper furnace
#

I noticed this: If you switch Vertical Crop to "Disabled" and back, the screen will remain in the "Disabled" state.

untold cloud
#

Compiling again.

#

Tons of status bits used up now.

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

Half of them are just for Srg's debugging stuff, to turn the gfx layers or Sound channels on and off.

#

I'm only using six more.

#

These are the bits that the OSD menu options use to tweak stuff in the core(s).

#

Just realized how to leave gaps between the menu options.

#
"P2-;",
#

The Input stuff is on Page 2, so you have to keep the P2 part.

#
"P1o[61],Vertical Crop,Disabled,216p(5x);",

wire       vcrop_en = status[61];
#
    video_freak video_freak
    (
        .*,
        .VGA_DE_IN(vga_de),
        .ARX((!ar) ? arx : (ar - 1'd1)),
        .ARY((!ar) ? ary : 12'd0),
        .CROP_SIZE((en216p & vcrop_en) ? 10'd216 : 10'd0),
        .CROP_OFF(voff),
        .SCALE(status[56:55])
    );
#
en216p <= ((HDMI_WIDTH == 1920) && (HDMI_HEIGHT == 1080) && !forced_scandoubler && !scale);
#

Not sure quite how all of that works.

#

But the vcrop_en flag only works if en216p is also High.

#

Unless that's purely for the 216 mode. Probably?

#

Actually, nope, that is the only place vcrop_en is used

#

I would guess it's basically when you have 2160p mode enabled (INI file?), it will allow the crop, to fit the image to a 1080p frame?

thorn pagoda
#

yeah its for doing 5x scale for 1080p displays

pearl harbor
#

Oh boy, I'm so used to arcade House of the Dead that I forgot how bad the Saturn version is. That frame rate is so bad that it really makes it difficult to play! NotLikeThis

The two Virtua Cop games though are chefkiss

thorn pagoda
#

yeah the framedrops in hotd are kinda brutal

untold cloud
#

Virtua Cop is still quite fun, even for somebody (me) who rarely plays games now.

#

But... this is the 67th time I've heard that damned Hammond Organ music. lol

thorn pagoda
#

we should probably test all the saturn lg games, anyone got a list

#

i think its like <10

untold cloud
# thorn pagoda we should probably test all the saturn lg games, anyone got a list
Sega Retro

The Virtua Gun (バーチャガン), known as the Stunner in North America, is the official light-gun peripheral for the Sega Saturn.
As the name might suggest, the Virtua Gun was built for Virtua Cop and Virtua Cop 2 in mind, and was bundled with these games as a result (though it was also available separately). It was also bundled with The House of the De...

#

I was today Years old, when I learned it's called the Virtua Gun in Japan.

thorn pagoda
#

much better name than "stunner"

untold cloud
#

Yeah.

#

A "Stunner" reminds me of what I wish I was. 😦 lol

untold cloud
#

I used to watch wrestling, when we first got Satellite TV (Sky) in the UK, around 1989.

#

WWF, back then.

untold cloud
#

Not to be confused with the World Wildlife Foundation.

median tartan
#

I picked it up in my n64 days. No Mercy is one of the best games ever made

untold cloud
#

Oh yeah.

thorn pagoda
#

there's a few games on this list i've never seen before actually, neat

untold cloud
thorn pagoda
#

16 lightgun games is pretty good as consoles go

untold cloud
#

tbh, I expected a fair few more, as I remember the Saturn being known for LG games.

#

But that's still pretty good.

thorn pagoda
#

its comparable to playstation

untold cloud
#

Only time we had a Lightgun in the 80s and 90s, was for the ZX Speccy, and the Menacer Pack on MD.

thorn pagoda
#

lightgun games are just rare things

untold cloud
#

Oh, and a NES Zapper, ofc.

thorn pagoda
#

its why mister is so cool since you can concentrate almost every lightgun game onto it

median tartan
untold cloud
#

LOL

#

I genuinely looked for a funny WWF GIF earlier. I was disappointed with the choices on here.

untold cloud
#

LightGun games aren't as rare as faux-3D on Genesis/MD, though. 😉

https://www.youtube.com/watch?v=Mc7beDZUy4A

This is a test core for a pseudo-3D effect (for 3D glasses) that I wanted to try years ago.

After seeing that Grabulosaure released versions of the NES and SMS cores for MiSTer, but with 3DTV support, I looked at doing a similar thing for the Genesis core.

(the NES and SMS already had games that were intended for use with the 3D Glasses, so th...

▶ Play video
#

I think only four people in the World have tried that yet, and one of them was Bob. lol

wise brook
#

i love my 3d glasses

untold cloud
#

Worked quite well on TMNT, due to the foreground layer stuff.

mortal mist
wise brook
#

got both the famicom and Master System ones

untold cloud
#

And I think.. oh no... now it got me wondering about faux 3D on Saturn.

#

Definitely not easy for any 3D games, put it that way.

#

Even on the MD, it basically halves the frame rate, per-eye.

#

Which... still makes Sonic look like 30 FPS.

#

It's entirely possible to have it work at 60 FPS (both eyes) on a 3DTV, but would use a ton of logic.

thorn pagoda
#

like those 3ds ports of nes games nintendo did

untold cloud
#

I bought my first 3DS about six months ago.

#

Haven't used it. lol

#

Wanted to mess with the screen. I have a spare screen somewhere.