[Release] Vice3DS (C64 Emulator)

Discussion in '3DS - Homebrew Development and Emulators' started by Badda, Mar 31, 2019.

  1. Badda
    OP

    Badda GBAtemp Regular

    Member
    5
    Feb 26, 2016
    Tokelau
    Nirvana
    Good input, will check how I can easily cater to these requirements in 2.0. By the way, before remapping your grandmother, you might want to think of a way how to utilize the other two input technologies, a 3DS actually has: an Accelerometer and a Gyroscope :D
    One more thing: You can press CTRL-H by pressing CTRL and then the key where 'H' used to be. Will change the keyboard images to make this easier.
     
  2. Elwyndas

    Elwyndas GBAtemp Regular

    Member
    4
    Dec 19, 2018
    United States
    For Summer Games?
     
  3. Elwyndas

    Elwyndas GBAtemp Regular

    Member
    4
    Dec 19, 2018
    United States
    I'm trying to make the milestone game Thrust work, which can only be controlled by keyboard, but I can't map Shift to buttons. Just like C= and Control, they don't register when trying to assign.

    This important game cannot be played right now, as it is. The shift key is causing the thrust, and I don't see any workaround.

    I'm going to look into more games like that.

    Also, it will be necessary eventually to allow a description of sort to be added to key assignments. For example, in Thrust you want to add "Thrust" and "Fire" next to the key pressed, so when people pull up the help screen (which is awesome btw) see right away which button is causing what (you can ommit the redundant "key" string in order to save screen real estate). This is so important because every game is different. I'm even thinking about allowing to add a custom help doc/screen that includes instructions on how to use a certain game, ideally connected/included in the settings file. This challenge I realize is quite unusual compared to other systems. It's owed to the open design of the C64, where game designers could do anything they want with not just the joystick inputs, but also the keyboard. And while we have a virtual keyboard on the 3DS, it's useless in gaming, for obvious reasons. The convenient assignment of keys to physical buttons, and making it self-explanatory, is crucial on our quest to make your work not just perfect, but even better than that.
     
    Last edited by Elwyndas, Nov 26, 2019
  4. Badda
    OP

    Badda GBAtemp Regular

    Member
    5
    Feb 26, 2016
    Tokelau
    Nirvana
    This will be fixed soon.

    That is actually already on my ToDo list, but I cannot promise for v2.0. Right now (at least for soft buttons), you would have the workaround to create a custom icon: Create a 40x40px PNG image, place it into the "config" folder of the romfs and name it e.g. "ICON_Key_Q.png" for the Q-Key. Anyways, including all the support functionality for directly starting C64 games (which I would consider this to be a part of), only makes sense if you can save your games (e.g. the disc image is writeable) and different simultaneous game installations do not interfere with each other. Right now, the sdl-vicerc on the SD-card always overrides the one in romfs - even if it belongs to a different installation.

    — Posts automatically merged - Please don't double post! —

    This can be fixed by changing the title ID before you pack the CIA.
    Edit title ID with extracted NCCH header and ExHeader (thank you @ihaveamac).
    But - as stated before - you have to be careful because right now, if another installation of vice3DS has custom settings stored on the SD card, they will override the settings of all other vice3Ds installations. To fix this, is on the ToDo list as well - not for 2.0 though.
     
    Last edited by Badda, Nov 26, 2019
    Elwyndas and SmashinGit like this.
  5. Elwyndas

    Elwyndas GBAtemp Regular

    Member
    4
    Dec 19, 2018
    United States
    I'm working through a long list of games that I remember as being cumbersome to play because of the keyboard being involved.
    One of the worst examples is Gateway to Aphsai. It requires constantly accessing the keyboard. This otherwise great game is borderline unplayable because of this.
    For example, you need to press F5 repeatedly for actions like search, find traps etc, then press fire to activate it, and then press F7 to return to fight mode.
    I can already greatly improve this by assigning F5 and F7 to X and Y buttons, but ideally I would like to utilize a pre-defined sequence of actions. Very much like the pre-set list of BASIC commands you already have, but more like along the line of a Macro. Perhaps the commands function can simply be opened to store key strokes like Function keys, and the fire button. Right now they would not register because they don't produce a character.
    In addition, this new macro system would allow to execute simultaneous inputs, for example Joystick down and fire pressed at the same time. All of a sudden you could drop a bomb in Blue Max without going kamikaze.
    When this is achieved, and I can also assign commands to buttons, I will create the first truly playable installment of Gateway to Apshai.

    [​IMG]
    [​IMG]
     
    Last edited by Elwyndas, Nov 28, 2019
    SmashinGit likes this.
  6. Badda
    OP

    Badda GBAtemp Regular

    Member
    5
    Feb 26, 2016
    Tokelau
    Nirvana
    Here comes v2.0. Changes to RC3 are:
    • enhancement: configurable key combos
    • optimization: smooth scrolling scroll bar in menu, file and imgfile dialog
    • optimization: speed reducion/speedup ranges in slider adjusted
    • optimzation: passing end/beginning in file/imgfile dialog wraps the cursor to beginning/end
    • bugfix: fixed crash when closing the 3ds lid, home button works now
    • multiple other small enhancements, optimizations and bug fixes
    https://github.com/badda71/vice3ds/releases

    OP will be updated soon ...

    Have fun! :yay3ds:
     
    troutbelly, Muxi, arquillos and 4 others like this.
  7. Elwyndas

    Elwyndas GBAtemp Regular

    Member
    4
    Dec 19, 2018
    United States
    This is great. I'm going to report back with some small issues, but two actions I have identified that cause a total system crash:

    - switching back between full screen and "regular" multiple times causes a freeze. Rosalina can still be activated. I believe this was already identified as a bug before. It doesn't happen on the first attempt, only after switching back to regular a 2nd time.

    - similar thing happens when you try to "Restore default settings" more than once. You can restore once, but the second time it will cause an ARM11 exception.
     
    Last edited by Elwyndas, Dec 3, 2019
  8. Muxi

    Muxi GBAtemp Fan

    Member
    6
    Jun 1, 2016
    Germany
    I also can't save settings in v2.0 anymore because the custom settings are reset after each restart (even if the 3ds/vice3ds folder has been deleted before).
     
    Last edited by Muxi, Dec 3, 2019
  9. Badda
    OP

    Badda GBAtemp Regular

    Member
    5
    Feb 26, 2016
    Tokelau
    Nirvana
    Hm, I don't understand. If the folder 3ds/vice3ds is not there, the default settings are applied anyways. What error message are you getting when trying to save the settings? Is a sdl-vicerc file created in folder /3ds/vice3ds/config?
     
  10. Muxi

    Muxi GBAtemp Fan

    Member
    6
    Jun 1, 2016
    Germany
    I don't get an error message. Everything is output correctly - only if I restart Vice3DS afterwards, all settings are reset (with or without deleting the 3ds/vice3ds folder).
    Yes, this file is there.

    Edit:
    The quickest way to test this is to deactivate the help button and save it in the settings. After a restart the button is back. The same is also true for other things, like the assignment of the soft buttons. (Tested on 3 different consoles)
     
    Last edited by Muxi, Dec 3, 2019
  11. Badda
    OP

    Badda GBAtemp Regular

    Member
    5
    Feb 26, 2016
    Tokelau
    Nirvana
    Ok, I published a quick bugfix release v2.0.1. These bugs are fixed:
    • Crash when switching to fullscreen multiple times
    • Crash when restoring default settings multiple times
    • sdl-vicerc on SD card does not override the default settings
    https://github.com/badda71/vice3ds/releases
     
    Last edited by Badda, Dec 3, 2019
    Garcimak, ber71, arquillos and 2 others like this.
  12. Elwyndas

    Elwyndas GBAtemp Regular

    Member
    4
    Dec 19, 2018
    United States
    Not sure what went wrong, but the crashing bugs I reported are still present.
     
  13. urherenow

    urherenow GBAtemp Psycho!

    Member
    9
    Mar 8, 2009
    United States
    Japan
    OMG! This (EDIT: *this* == the C128 version... wish there was an easy way to move this to the proper thread) plays my file perfectly! Attach the disk image and:

    LOAD"A. BOOT",8
    RUN

    And remember, I was pretty young when I did this :P

    It's not even compiled, so you can see all of the code, and also see how easy it is to program music in BASIC for the 128. The gibberish at the beginning (of the music code... not the mouse thing) is just to set up the sound/voices. You also have to keep in mind that I transposed this directly from sheet music, so I had to do the best I could, using only 3 voices. I don't know the voodoo real programmers used to take control over the system beep, to gain a 4th...

    @Badda you really are my hero :wub:
     

    Attached Files:

    Last edited by urherenow, Dec 4, 2019
    Badda likes this.
  14. Elwyndas

    Elwyndas GBAtemp Regular

    Member
    4
    Dec 19, 2018
    United States
    I'm testing the new key combo feature.
    It works, and I can assign the combo to a button (by pressing R while hovering over the entry in the menu), but it appears that the combo is being executed indefinetely. For example I want the combo joystick down + fire in Blue Max, to drop bombs, but it keeps on going down and pressing fire.
    By default it should only be executed once. As an additional option you could add a way to keep it pressed for a certain amount of time.

    Workaround: I assign RESTORE to D-PAD down, and RUN-STOP to the B button, and then assign Y to the existing RUN/STOP-RESTORE soft button. Voila! Dropping bombs now only takes a minimum of decrease in altitude. However, the machine gun stops working if the B button is being pressed (or auto fire - doesn't matter.) You need to released that button, and press again, to make use of the machine gun. I'm not exactly sure why this is.

    The ideal custom solution would look like this: I can create a key combo that triggers [Joystick down + fire for just a split second] then [releases] that right away, and it's being followed by [Joystick up] in the same key combo, to counter the idiotic (unrealistic) drop in altitude. So not just simultaneous combos, but sequential. I know this sounds weird, but I have messed with Blue Max a lot now and if we can get this done it will become an amazing arcade game - as it should have always been. This feature will also benefit other games.

    Basically the idea is that the C64 emulator on the Nintendo 3DS can make games shine the way they were intended to be, and only because of terrible hardware limitations (like no second joystick button, or having to execute weird kamikaze moves, or accessing the keyboard while using the joystick - ugh) weren't able to back in the day. I'm revisiting countless C64 games now, and everything that was annoying me back then can now be fixed, without cracking games. It feels like a robotic engine that messes with the original hardware. A 2nd layer, but it maintains the original thing.

    Emulation 2.0?
     
    Last edited by Elwyndas, Dec 6, 2019 at 2:51 AM
  15. Elwyndas

    Elwyndas GBAtemp Regular

    Member
    4
    Dec 19, 2018
    United States
    I would like to propose a couple of changes to the default controller settings.

    The underlying reasoning is this: Obviously, the 3DS is not a device where you can actually have two people playing simultaneously. This is a crucial difference to the device we are emulating. It's a flaw, but on the other hand we gain so much.

    The only way to pull off two (or more) people playing simultaneously is through Rosalina input redirect, utilizing a 2nd controller on Windows. You could even stream the screen action to Windows, but this is a bizarre scenario. If you want to play, let's say M.U.L.E. with 2+ people, the 3DS is for sure the last gadget choice you would consider. You would just launch VICE on Windows and be done with this. And hell, you could even use the 3DS as a controller on Windows!

    I certainly have never found myself in the position where I wanted to use both joy ports simultaneously on the 3DS. Anyone? However, it has caused a great deal of confusion that there ARE two live joysticks by default, and having to re-configure them.

    In other words, there is almost no scenario where two live ports are needed. Of course for the rare case where you want it, you should keep the option as a possibility (basically the way it is now).

    Suggested changes:

    • When swapping joystick ports (soft button, or in settings) you actually don't swap anything, and instead you activate as live joystick port either joy1 or joy2. Whatever input is assigned to the "ruling" joystick, will come live. It might be necessary to create a new default entry in the menu, "Settings of live joystick".
    • The other port is disabled then. This will remove the annoying issue of joy1 interferring with keyboard inputs for good. If you really want both joy ports live for some reason, you need to change it in settings.
    • As a result of this, we free up a couple of hardware buttons. There is only one fire button (A) for both joy1 and joy2. Furthermore, there is only one auto fire button (right shoulder). In an ideal future scenario (a GUI that has pre-defined settings for each game) you don't even think about this, because the game launches with the ideal settings, incluing correct joy port.
    • The real issue, what a user wants to mess with ALL the time, is switching between the directional pads (C-Pad / D-Pad). Sometimes this feels better, sometimes the other. By default, D-Pad should remain as active because it feels most like a C64 joystick. The other pad should be activated by a different NEW soft button.
    • (A) becomes the fire button, no matter which joy port is being used.
    • (X) becomes (UP) for Joystick port 1 and 2. UP is the desperate attempt of the C64 to make "up" for the pathetic lack of a 2nd controller button (JUMP). I have tried it and it works well.
    • Auto-Fire is fixated to the (R) shoulder button. There is no need anymore to waste precious real estate on the (never used!) auto fire button from the other port.
    • The main two directional pads/joysticks on the left side will have an active joystick assigned to one of them, while the other one should be re-assigned to non-joystick default keyboard functions (like [Y]es or [N]o, or just be empty and available for re-programming. If you switch active joystick assignments, those other assigments would switch as well.
    • The C-Stick (only available on N3DS) should definitely stay the way it is, as cursor input.

    As a result, we would free three hardware buttons (B, Y and ZR) in exchange for one additional soft button. In addition, the non-joystick directional pad on the left side can be utilized with four inputs, and all this can be swapped between the two locations. I call that a win, especially since this is increasing user friendliness. The free buttons should be assigned to something by default. Space (B) comes to mind. Return (Y) could be another one. Run/Stop (ZR) because it's so commonly used. There is also the issue of tons of cracker intros forcing you to go through a dialogue where you have to say yes or no to various cheat options. This is a particular issue with all the cracks done by the German group "Remember". Their versions are always first choice. Fantastic creations, but they did not think about the limitations of the Nintendo 3DS (LOL).
     
    Last edited by Elwyndas, Dec 12, 2019 at 5:07 AM
Quick Reply
Draft saved Draft deleted
Loading...