1. capsterx

    OP capsterx GBAtemp Regular
    Member

    Joined:
    Oct 14, 2020
    Messages:
    132
    Country:
    United States
    https://github.com/capsterx-switch/iortcw/releases/tag/pre-release

    The code is not pushed because the source tree is a mess and I dont feel like cleaning it up right now.

    Ok, this game was a pain. The build system is designed to either A) use a hardware specific bytecode reader or B) dynamically link to code. Lucky for me there is A) not a arm8-a encoder there and B) there is no support for dynamic loading! There is however a fully software implementation...... but the vm_interpreted was a nightmare for me to trackdown a 'simple' bug that would not exist on x86 or 64 or other strong memory machines. However arm has no such memory guarantees so I *think* my patch fixes it, it at least appears to. I spent the first long while where all the fonts were totally unreadable so I had to pull the game up on my mac just to see what to click on. It's also very annoying how it interacts with the SDL mouse events and only uses relative motions when enabled, so my generic touch screen -> mouse events never worked right. The SDL version does work, but i dont want to have to drag the curser around like an actual mouse, i just want to click on things.

    Ok, so note, this is a fully software, non hardware specific loading of the quake virtual machine bytecode. That means loading the next menu or stage is slow. Takes around 20 seconds or so to get to the title screen. If someone wants to write a bytecode compiler for arm8a or implement dynamic loading or figure out how to build a static library with gcc so that all symbols are hidden except an entry point....well let me know!

    I would also like to yell very loudly at the person did not allow for cut sceen skipping. In developing this i have seen the first set of cut scenes so many times I almost threw my switch at a wall (well, not really).

    Ok, now for the key mappings. There are basically 3 sets of mappings currently configured: default (gameplay), UI (in a menu) and console (the command console `). For the default one I do not override anything in switch code land as the game has pretty good gamepad support. I did include a default key mapping in switch/iortcw/main/autoexec.cfg. This comes from https://steamcommunity.com/sharedfiles/filedetails/?id=1118116602 edit it as you see fit.

    In UI and console
    lstick/dpad map to up/down/left/right
    minus=escape
    plus=enter
    a=space
    L=` (console)
    R=keyboard
    touch screen and r stick act as a mouse


    So when you are in a game, you can press + to get into the menu, click on save, the click the save until it blinks, click R and the keyboard should pop up, and when you close it, it should fill in the name. There is no way to edit a mistake as the way i hacked the virtual keyboard in it just dumps all the text you enter into the games event loop. It's a lil finicky but it works. Just back out and try again. This is similar when you are in the console. To get into the console from a game, you have to get into a UI state, hit +.

    The controls can be overridden by create files:
    sdmc:/switch/iortcwsp/ui.switch_keys
    sdmc:/switch/iortcwsp/console.switch_keys
    sdmc:/switch/iortcwsp/default.switch_keys

    I dont think there should be much reason to do so, but let me know if there is something missing that should be a default.

    As for setting up the game, extract the zip onto your sd card from the github. Then you will need the original game installed (https://store.steampowered.com/app/9010/Return_to_Castle_Wolfenstein/) and you have to install it in windows. As I use a mac, it was anyoing as I had to load up a VM, buy the game, install the game, and then copy files I need to the sd card. Once you have installed the game copy pak0.pk3, sp_pak1.pk3, sp_pak2.pk3, and sp_pak3.pk3 from the "Main" to sdmc:/switch/iortcwsp/main

    If you dont have it setup right the game will just bail and for right now. If you dont run under nxlink -s, you wont be able to see the errors. It took me some time to fidangle it the first time and I have not tried from a clean state, so, let me know if these instructions are not right or something doesnt work (if the game just bails and you dont use nxlink i prob wont be able to help you).

    Im not sure how well the game works with the switch sleep state. Ive seen it hang when i wasnt looking at it and the switch went to sleep. Not really sure if there is anything I can do about that. I dont think I can hijack home key or context switch?

    There are a few things I hardcoded to enable which I'll likely remove and move to the autoexec.cfg, but that should not effect the use of it (I cant imagine someone wanting to disable the gamepad and such).

    I havent done much actual playing of the game, it's not really my style of game and I really only bought it to see if i could make it run. So let me know how it plays beyond the first room :)

    And I have not even *looked* at the multiplayer code, so dont ask...

    PS: i just realized I misspelled wolfenstein in the title...whoops
     
    Last edited by capsterx, Nov 20, 2020
    Dodain47, lordelan, eyeliner and 12 others like this.
  2. cucholix

    cucholix Banners guy
    Member

    Joined:
    Jan 17, 2017
    Messages:
    2,550
    Country:
    Chile
  3. Smoker1

    Smoker1 GBAtemp Psycho!
    Member

    Joined:
    Feb 17, 2015
    Messages:
    3,938
    Country:
    United States
    Would be nice to see about Wolfenstein (2009), so there could be a Trilogy on the Switch
     
  4. ShadowOne333

    ShadowOne333 QVID PRO QVO
    Developer

    Joined:
    Jan 17, 2013
    Messages:
    10,295
    Country:
    Mexico
    Woa what the hell?
    A full on source port of Return to Castle Wolfenstein?!
    DAMN!
     
    mathew77 likes this.
  5. angelhp

    angelhp GBAtemp Fan
    Member

    Joined:
    Nov 30, 2014
    Messages:
    497
    Country:
    United States
    ohh !!
    you managed to port it to switch
    thank you ... !! @capsterx
     
  6. cucholix

    cucholix Banners guy
    Member

    Joined:
    Jan 17, 2017
    Messages:
    2,550
    Country:
    Chile
    Thanks for the port :)
    Trying to change aspect ratio to 4:3 by setting
    Code:
    cg_fixedAspect "1"
    In wolfconfig.cfg but it doesn't change the AR in game.
     
    ShadowOne333 likes this.
  7. cucholix

    cucholix Banners guy
    Member

    Joined:
    Jan 17, 2017
    Messages:
    2,550
    Country:
    Chile
    When you click the right stick it kick and fire the weapon at the same time, trying to change autoexe.cfg file but changes are no applied.
    It would be useful to have the crouch button mapped to ZL, weapon-alt to R, use item to A, because the crouch method is not toggle.

    Could you explain more about how create sdmc:/switch/iortcw/default.switch_keys?
     
    bad361 and ShadowOne333 like this.
  8. capsterx

    OP capsterx GBAtemp Regular
    Member

    Joined:
    Oct 14, 2020
    Messages:
    132
    Country:
    United States
    When I click the right stick it only kicks and when i fire and click it does both. Are you saying when you right click it does both?. Am I missing something?

    https://pastebin.com/rk505kKi

    Any key combination that is mapped bypasses the normal event loop and sends a keyboard key, everything else is passed to the normal system. So for example if you map L+A as something, but use L as a key in the game, that would not be a great combination as the L press would go though and the L+A would be 'hijacked'

    I'll look into the aspect ratio and see if it's something I did.
     
    Last edited by capsterx, Nov 20, 2020
    mathew77 and cucholix like this.
  9. octopus

    octopus Custom Title
    Member

    Joined:
    Sep 6, 2013
    Messages:
    407
    Country:
    Somalia
    For me it crashes back to the hbmenu, I even rolled back mesosphere and that did not help, I also tried disabling sysmodules, that did not help either. Paks are from steam, so I'm not sure what could have gone wrong. AMS 0.15.0, HOS 10.2.0
     

    Attached Files:

  10. capsterx

    OP capsterx GBAtemp Regular
    Member

    Joined:
    Oct 14, 2020
    Messages:
    132
    Country:
    United States
    Hmm, not sure, I'm running 10.1.0|AMS0.14.EJE
    Was there any console output in running it in nxlink?

    Also, i think it should create a sdmc:/switch//iowolfsp/main/crashlog.txt even if not started with nxlink

    The paths are hardcoded for sdmc:/switch/iowolfsp/main/
     
    Last edited by capsterx, Nov 20, 2020
    octopus likes this.
  11. octopus

    octopus Custom Title
    Member

    Joined:
    Sep 6, 2013
    Messages:
    407
    Country:
    Somalia
    It says iortcw in the OP, problem probably solved. :)

    sp_pak4.pk3 is required too.
     
    Last edited by octopus, Nov 20, 2020
  12. capsterx

    OP capsterx GBAtemp Regular
    Member

    Joined:
    Oct 14, 2020
    Messages:
    132
    Country:
    United States
    NICE! I'll fix it when i post a full release. Thanks.
     
    octopus likes this.
  13. cucholix

    cucholix Banners guy
    Member

    Joined:
    Jan 17, 2017
    Messages:
    2,550
    Country:
    Chile
    Yeah when I click right stick it does both kick AND fire
     
  14. bad361

    bad361 GBAtemp Advanced Fan
    Member

    Joined:
    Jun 18, 2018
    Messages:
    788
    Country:
    Russia
    i had the same issue and fixed it just by changing stuff in controls in-game options. I think you shouldn't be supposed to change stuff there, but i tried and it worked, i firstly accidentally mapped fire to right stick and it stopped kicking at all, then i just mapped kicking to right stick and now it works properly.

    What i'm wondering about is the sensitivity... Can i turn it down a bit somehow? Its too high for aiming with a stick, too inaccurate.
     
    Last edited by bad361, Nov 20, 2020
  15. mathew77

    mathew77 Lovin' life.
    Member

    Joined:
    Jan 19, 2019
    Messages:
    575
    Country:
    Kazakhstan
    Could you post your fixed autoexec.cfg file please?
     
  16. bad361

    bad361 GBAtemp Advanced Fan
    Member

    Joined:
    Jun 18, 2018
    Messages:
    788
    Country:
    Russia
    You can fix it in-game, why upload autoexec?
     
  17. mathew77

    mathew77 Lovin' life.
    Member

    Joined:
    Jan 19, 2019
    Messages:
    575
    Country:
    Kazakhstan
    Can anybody post autoexec.cfg file with fixed right stick button, please?
     
  18. bad361

    bad361 GBAtemp Advanced Fan
    Member

    Joined:
    Jun 18, 2018
    Messages:
    788
    Country:
    Russia
    And i just compared two autoexec files (one before changing controls in options and one after) and they are absolutely the same. So just change it in-game options, that's all. Autoexec seems not be the issue with right stick.
     
  19. mathew77

    mathew77 Lovin' life.
    Member

    Joined:
    Jan 19, 2019
    Messages:
    575
    Country:
    Kazakhstan
    ..And, I need to do it every time I launch the game? Or they must be saved somewhere.
     
  20. bad361

    bad361 GBAtemp Advanced Fan
    Member

    Joined:
    Jun 18, 2018
    Messages:
    788
    Country:
    Russia
    No, it works after re-launching the game, but i only tried it after loading my save, i assume its bound to a save file.
     
    mathew77 likes this.
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - Wolfenstein, Return, Castle