Homebrew RELEASE systemshock - Shockolate

mathew77

Lovin' life.
Member
Joined
Jan 19, 2019
Messages
1,216
Trophies
0
Age
47
XP
3,745
Country
Kazakhstan
I updated the release but did not update the keymap in the zip, but I tried this one out
Thanks, now swinging the weapon works OK!

I guess your config is missing the 'F' button to change cursor modes, so here's my cfg just if you need it:
Code:
TOUCH_MOUSE_ABS=TRUE
DOUBLE_TOUCK_KEYBOARD=TRUE
RSTICK_MOUSE=TRUE
DUP=w
DDOWN=s
DLEFT=a
DRIGHT=d
LSTICK_UP=w
LSTICK_DOWN=s
LSTICK_LEFT=a
LSTICK_RIGHT=d
MINUS=ESC
PLUS=SPACE
LSTICK=RETURN
L=f
ZL=MOUSE_LEFT
ZR=MOUSE_RIGHT
 

Attachments

  • keymap.keys.zip
    285 bytes · Views: 217
Last edited by mathew77,
  • Like
Reactions: cucholix

capsterx

Well-Known Member
OP
Member
Joined
Oct 14, 2020
Messages
147
Trophies
0
Age
42
XP
481
Country
United States
Nice project, thanks!

Sorry for asking that, but there's no music at all?

PS: maybe it could be useful to assign mouse click function and double click on some buttons, like ZL / ZR instead of R3, and use the A/B/X/Y buttons somehow.

Sound should be fixed
the game expects the xmis to be in
res/sound/sblaster/
so you should have a
res/sound/sblaster/titloop.xmi
and other xmis.
 

mathew77

Lovin' life.
Member
Joined
Jan 19, 2019
Messages
1,216
Trophies
0
Age
47
XP
3,745
Country
Kazakhstan
Sound should be fixed
the game expects the xmis to be in
res/sound/sblaster/
so you should have a
res/sound/sblaster/titloop.xmi
and other xmis.
I've tried to put all the 15 .XMIs into /switch/systemshock/res/sound/sblaster/, but no luck at all — no music, just silence. :(
 

capsterx

Well-Known Member
OP
Member
Joined
Oct 14, 2020
Messages
147
Trophies
0
Age
42
XP
481
Country
United States
/switch/systemshock/res/sound/sblaster> ls
-rw-rw-rw- 1 Switch Switch 14226 Nov 11 01:50 end.xmi
-rw-rw-rw- 1 Switch Switch 2442 Nov 11 01:50 endloop.xmi
-rw-rw-rw- 1 Switch Switch 1120 Nov 11 01:50 ini-mt.xmi
-rw-rw-rw- 1 Switch Switch 190 Nov 11 01:50 ini-sc.xmi
-rw-rw-rw- 1 Switch Switch 32344 Nov 11 01:50 introthm.xmi
-rw-rw-rw- 1 Switch Switch 11814 Nov 11 01:50 thm0.xmi
-rw-rw-rw- 1 Switch Switch 35352 Nov 11 01:50 thm1.xmi
-rw-rw-rw- 1 Switch Switch 32242 Nov 11 01:50 thm10.xmi
-rw-rw-rw- 1 Switch Switch 32110 Nov 11 01:50 thm2.xmi
-rw-rw-rw- 1 Switch Switch 26238 Nov 11 01:50 thm3.xmi
-rw-rw-rw- 1 Switch Switch 36494 Nov 11 01:50 thm4.xmi
-rw-rw-rw- 1 Switch Switch 35018 Nov 11 01:50 thm5.xmi
-rw-rw-rw- 1 Switch Switch 42284 Nov 11 01:50 thm6.xmi
-rw-rw-rw- 1 Switch Switch 8142 Nov 11 01:50 thm7.xmi
-rw-rw-rw- 1 Switch Switch 4956 Nov 11 01:50 titloop.xmi

is what I have
Im attaching a nro with debug logging enabled, if you can run it under
nxlink -s ./systemshock.nro
it should show if there are any errors
 

Attachments

  • systemshock.zip
    3.9 MB · Views: 219
  • Like
Reactions: mathew77

mathew77

Lovin' life.
Member
Joined
Jan 19, 2019
Messages
1,216
Trophies
0
Age
47
XP
3,745
Country
Kazakhstan
Hmm, maybe I fixed one thing and broke another. Let me know if other sound effects work correctly.
All in-game sounds and music in the first location, start screen music included are good.

But audio in the intro-videoclip (first button in main menu) is muted. :( Exactly the opposite of the r2 release.
 

capsterx

Well-Known Member
OP
Member
Joined
Oct 14, 2020
Messages
147
Trophies
0
Age
42
XP
481
Country
United States
I'll work on this, the code assumes it can open 2 audio devices, which it cannot on the switch. I think one is only used for the cut scene, so i can prob close/open them to do it or alter it to correctly use the mixer.
 
  • Like
Reactions: mathew77

capsterx

Well-Known Member
OP
Member
Joined
Oct 14, 2020
Messages
147
Trophies
0
Age
42
XP
481
Country
United States
All in-game sounds and music in the first location, start screen music included are good.

But audio in the intro-videoclip (first button in main menu) is muted. :( Exactly the opposite of the r2 release.

Ok, I couldnt figure out how to port the sdl raw stuff to sdl mixer, but it was simple enough to close mixer and open raw and vice versa, raw is only used for the intro and mixer for game. So checkout r4 and let me know.
 
  • Like
Reactions: mathew77

mathew77

Lovin' life.
Member
Joined
Jan 19, 2019
Messages
1,216
Trophies
0
Age
47
XP
3,745
Country
Kazakhstan
Ok, I couldnt figure out how to port the sdl raw stuff to sdl mixer, but it was simple enough to close mixer and open raw and vice versa, raw is only used for the intro and mixer for game. So checkout r4 and let me know.
Works like a charm, thank you!
 

mathew77

Lovin' life.
Member
Joined
Jan 19, 2019
Messages
1,216
Trophies
0
Age
47
XP
3,745
Country
Kazakhstan
@capsterx
Sorry for bothering you again — but why the right stick make some 'struggling' moves, like stuttering or sluggishnes, do you know?

For example, if your character standing still and rotating the stick to the left (or right), It's not smoothly at all, moves are jerky.. Maybe, it can be fixed via some config?..

(btw it's not about drifting joycons or whatever, tried multiple controllers)
 

capsterx

Well-Known Member
OP
Member
Joined
Oct 14, 2020
Messages
147
Trophies
0
Age
42
XP
481
Country
United States
@capsterx
Sorry for bothering you again — but why the right stick make some 'struggling' moves, like stuttering or sluggishnes, do you know?

For example, if your character standing still and rotating the stick to the left (or right), It's not smoothly at all, moves are jerky.. Maybe, it can be fixed via some config?..

(btw it's not about drifting joycons or whatever, tried multiple controllers)

Is this new or has it always done this?
 

Purple_Shyguy

Well-Known Member
Member
Joined
Nov 8, 2008
Messages
2,382
Trophies
2
Age
34
Location
Republic of Ireland
XP
4,886
Country
It was always like this. Probably something to do with the way the mouse is mapped to the right stick.
Maybe vsync issue? Mouse sensitivity issue?

If you use the touch screen with TOUCH_MOUSE=TRUE then moving left and right is smooth but with the stick its jittery and stutters.
 
Last edited by Purple_Shyguy,

cucholix

00000780 00000438
Member
Joined
Jan 17, 2017
Messages
3,246
Trophies
1
Age
44
XP
6,305
Country
Chile
@capsterx
Sorry for bothering you again — but why the right stick make some 'struggling' moves, like stuttering or sluggishnes, do you know?

For example, if your character standing still and rotating the stick to the left (or right), It's not smoothly at all, moves are jerky.. Maybe, it can be fixed via some config?..

(btw it's not about drifting joycons or whatever, tried multiple controllers)
This also happen with vanillara, the cursor movement is more fluid with Pro Controller than joy-cons.
 

capsterx

Well-Known Member
OP
Member
Joined
Oct 14, 2020
Messages
147
Trophies
0
Age
42
XP
481
Country
United States
It was always like this. Probably something to do with the way the mouse is mapped to the right stick.
Maybe vsync issue? Mouse sensitivity issue?

If you use the touch screen with TOUCH_MOUSE=TRUE then moving left and right is smooth but with the stick its jittery and stutters.

TOUCH_MOUSE turns on a feature native to SDL itself, the RSTICK emulation is my code.

My best guess is that the joystick generates a lot more events and that causes slowdowns with how the mouse look code works. A mouse and touchscreen can generate x and y events at the same time, the joystick generates one per axis. I've been slowing this down by dividing the joy value by 0x1500, but maybe there is a better method of emulating this.
 

capsterx

Well-Known Member
OP
Member
Joined
Oct 14, 2020
Messages
147
Trophies
0
Age
42
XP
481
Country
United States
So, this is pretty hacky, but see if this works.
You'll need to put a new value into your keymap.keys
RSTICK_MOTION_MODIFIER=2000

or any other number, high slows it down, lower speeds it up. The conversion algo needs to be more intelligent, but maybe this will help for now.
 

Attachments

  • sshock.zip
    3.9 MB · Views: 185

cucholix

00000780 00000438
Member
Joined
Jan 17, 2017
Messages
3,246
Trophies
1
Age
44
XP
6,305
Country
Chile
So, this is pretty hacky, but see if this works.
You'll need to put a new value into your keymap.keys
RSTICK_MOTION_MODIFIER=2000

or any other number, high slows it down, lower speeds it up. The conversion algo needs to be more intelligent, but maybe this will help for now.
It still get stuck, if you hold to the right for example it will eventually stop moving the camera view, it happens with Pro Controller, WiiU Pro Controller, PS3 controller and joycons, so I doubt it's a problem with stick deadzone, it feels like when you reach certain number of frames it stops reading the stick input, or it skips inputs between frames, giving the feeling of it getting stuck, same happen with vanillara.
 

capsterx

Well-Known Member
OP
Member
Joined
Oct 14, 2020
Messages
147
Trophies
0
Age
42
XP
481
Country
United States
It still get stuck, if you hold to the right for example it will eventually stop moving the camera view, it happens with Pro Controller, WiiU Pro Controller, PS3 controller and joycons, so I doubt it's a problem with stick deadzone, it feels like when you reach certain number of frames it stops reading the stick input, or it skips inputs between frames, giving the feeling of it getting stuck, same happen with vanillara.

The problem is that the game was written to use interrupts. When the port to SDL was made the SDL_PollEvent in a loop happens in the main loop. There is a queue, but it queues in the same thread very inefficiently. What I did was limit the number of events that can happen in a single loop and flush the rest out. Im attaching another experimental that is slightly different. The real fix would be to make the queue threadsafe and g the events from another thread.

It's also possible this is a red herring and Im chasing the wrong thing.
 

Attachments

  • sshock.zip
    3.9 MB · Views: 204
  • Like
Reactions: mathew77

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2 @ K3Nv2:
    I'm about to buy a $200 flash cart
  • Psionic Roshambo @ Psionic Roshambo:
    I think I have a 256GB card in my 3DS lol
  • Psionic Roshambo @ Psionic Roshambo:
    It's a New 3DS XL so it's still under warranty... If it ever breaks gonna make Nintendo fix it lol You said it was new.... For eternity!!!
  • Psionic Roshambo @ Psionic Roshambo:
    But my 3DS is loaded with emulators and 3DS games and DS games and GBA games probably thousands of games in total lol
  • Xdqwerty @ Xdqwerty:
    Brb going with my dad
  • Xdqwerty @ Xdqwerty:
    @Psionic Roshambo, are most of those games shovelware?
    +1
  • K3Nv2 @ K3Nv2:
    Nah gotta buy 3 1tb SD cards for 3ds the entire libraries need archived in my home
    +1
  • SylverReZ @ SylverReZ:
    >buys x3 1TB SD cards
    >stores the entire 3DS library on them
    >installs CFW
    >realised why I wasted loads of money and resources
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    Lol no I clean my sets
  • K3Nv2 @ K3Nv2:
    Cause it's in my home ready to go
  • K3Nv2 @ K3Nv2:
    Like uremum
  • Psionic Roshambo @ Psionic Roshambo:
    But 100 games on SNES and Genesis and GBA then TG16 and NES and GB and GBC then all the other random systems and arcade games it all adds up lol
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Virtual Boy alone has probably 5 games!!! Lol
    +1
  • K3Nv2 @ K3Nv2:
    I won't mention any names in chat but some of us wastes $300 on preloaded hdds :tpi:
    +1
  • SylverReZ @ SylverReZ:
    @Psionic Roshambo, The PS5 had none.
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    Lol I spent more than that on a stuffed 4TB drive lol
  • K3Nv2 @ K3Nv2:
    Honestly I've yet to fill the 1tb internal drive on my ps5
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, 1) except final fantasy 16. 2) why would I have a console's whole catalogue if most of the games are either shovelware or terrible games?
  • Psionic Roshambo @ Psionic Roshambo:
    Kind of a waste, but the allure of all those games over 100,000
  • Psionic Roshambo @ Psionic Roshambo:
    Some shovel ware with low ratings you might enjoy more than the ratings would sugest
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Cruisn on the Wii is one of my personal examples of that, it's considered one of the worst games of all time, I loved it and completed it several times.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    The trick for me was to go into the settings and crank up the Wiimote sensitivity to the max and it gets twitchy but you can win that way lol
  • Psionic Roshambo @ Psionic Roshambo:
    Lots of other games I enjoyed that reviews would say otherwise lol
  • btei @ btei:
    lethal company servers are down rn
  • btei @ btei:
    my pocket pikachu is going crazy rn
    btei @ btei: my pocket pikachu is going crazy rn