NULL

[Release] Vice3DS (C64 Emulator)

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

  1. Badda
    OP

    Badda GBAtemp Regular

    Member
    3
    Feb 26, 2016
    Tokelau
    Nirvana
    Unbenannt.

    This is a port of the VICE C64 emulator to 3DS.
    VICE - the Versatile Commodore Emulator - http://vice-emu.sourceforge.net/

    @spinal_cord made a C64 emulator (Breadbox) based on Frodo but it does not work anymore with recent firmwares and he is not updating it anymore, so I gave it a shot to port the Vice C64 emulator v3.3 to the 3DS. Vice does support SDL1 but porting was not quite as easy as "just compile": A new sounddriver for the 3DS needed to be written, devkitpro libraries do not support all functionality required by full fledged Vice (so I had to strip them in quite some places) and lots of other things that needed tweaking or adaption.
    The result is: Vice3DS

    Download here: https://github.com/badda71/vice3ds/releases


    Installation
    Install .cia file with FBI - or - copy .3dsx file to /3ds/vice3ds on your SD card and launch in HBL - or - launch .3ds file from flashcard
    Important: If you're updating from a previous version, make sure to delete the config directory on your SD-card /3ds/vice3ds/config before starting the emulator. Otherwise new config settings, hotkeys and key mappings will not be updated and will not work.

    Usage
    Preconfigured button functions:
    • Select: open Vice menu
    • Start: quit emulator
    • The Circle Pad and A-Button are mapped to Joystick Port 1
    • The Directional Pad and X-Button are mapped to Joystick Port 2 (Keyset 1)
    • The C-Stick is per default mapped to the cursor buttons. It can be mapped to any joystick in Vice menu using Keyset 2
    • The R/ZR-buttons are mapped to autofire at joyport 1/2
    • Emulation speed can be adjusted using the 3D-slider (0 = 100%, max = Warp-mode)
    • Soft buttons functions (from left to right, top to bottom) :
      • Autostart image
      • Press RUN/STOP + RESTORE
      • Toggle Swap joystick ports
      • Toggle Warp mode
      • Hard reset
      • Quickload snapshot
      • Quicksave snapshot
      • Toggle True Drive Emulation
      • Power off bottom screen backlight
      • Pause emulation
    This (and a lot of other things) can be changed in the Vice menu. To change the mapping of a soft button (or actually any other button incl. all the 3DS- and soft keyboard buttons) to a menu item in vice menu, touch "M" when the menu item is selected, then touch/press the button. This button will now be mapped to the selected menu entry.

    Vice3DS should better run on a N3DS because it needs the extra CPU power (runs on 804MHz if possible). The frameskips on a O3DS spoil all the fun ...

    Current version is v1.2.1

    Release notes

    TODOs / known bugs:
    (in order of my own subjectively biased priority)
    - write a help page & include in menu
    - optimize settings management (why are there multiple files to save/load?)
    - add possibility to show / hide the keyboard (to have more soft buttons below keyboard)
    - Validate functionality of all vice menu entries and fix/remove if not working on 3DS
    - Revamp vice menu to be more 3DS user friendly
    - Change libSDL screen updates to have pixel perfect screen representation
    - Strip code to only include parts relevant for emulation of C64 on 3DS (ongoing ... this will be the most difficult, I believe)

    If anybody wants to help with these TODOs, you are welcome to help me with a pull request on github :D

    Thanks to:
     
    Last edited by Badda, Jun 6, 2019
  2. Elwyndas

    Elwyndas Advanced Member

    Newcomer
    2
    Dec 19, 2018
    United States
    You are a hero! I have no words!
     
  3. Rj.MoG

    Rj.MoG GBAtemp Regular

    Member
    4
    Jun 8, 2015
    United States
    I was just messing with breadbox myself and ended up using FrodoDS yesterday! Awesome job man. Thanks for this
     
  4. spinal_cord

    spinal_cord Knows his stuff

    Member
    8
    Jul 21, 2007
    somewhere
    Excellent work so far!
    If only I could be bothered to set up the 3DS dev stuff on my computer.
    I don't know if you want to use these, but these didn't make it into breadbox, they might be useful for your bottom screen keyboard...
    [​IMG]
     
  5. Badda
    OP

    Badda GBAtemp Regular

    Member
    3
    Feb 26, 2016
    Tokelau
    Nirvana
    Very useful, thank you. I was actually already looking for something like that but could not find anything suitable
     
  6. Muxi

    Muxi GBAtemp Fan

    Member
    5
    Jun 1, 2016
    Germany
    @Badda Great work! Thanks for this!
     
  7. urherenow

    urherenow GBAtemp Psycho!

    Member
    9
    Mar 8, 2009
    United States
    Japan
    :bow:

    THANK YOU! Looking forward to trying it out.

    As you get more familiar with it, please don't disregard the possibility of getting C128 working as well. Wrote my favorite music piece in C128 BASIC (not favorite music, but my proudest attempt at writing music on a computer) and would just love to be able to show it off again on the 3DS.

    EDIT: First thing I notice is the readme (yes... a man that actually reads instructions beforehand... spent 24 years in a job where people could die if you didn't, ok?). Not every system has pacman, and I'm not too sure if p7zip can be installed with the pacman/dkp-pacman that comes from dkp. I installed p7zip long ago, but used apt-get for that one. AFAIK it also works in MSYS2 on Windows.

    Next: Where to place disk images? I'm guessing you can navigate, but you could/should suggest a standard location (eg. make a floppy, tape, and cart directory in 3ds/vice3ds)
    EDIT: if you’re not using a whole library, it’s best to put your games in 3ds/vice3ds. This is always the starting point when you attach a disk image.

    EDIT2: yup, you can navigate (but it doesn't remember the path for later). And I was preparing to be mad as hell if this was an April fool's joke. But it's not :). Figuring out the shift key(s) takes a minute to figure out as well. May want to add that info to the readme. And the fact that you need to move the cursor to an unused spot on the keyboard in order to hit B to make it go away...

    Edit3: It's going to be tricky laying bait in Ghostbusters to prevent a "marshmallow catastrophe" fast enough. You may want to think about using the top screen for emulation, and the bottom touch screen for the OSK, so it's easer to use the keyboard, and allowing to use keys and joystick at the same time.

    Edit4: I played a bit of Ghostbusters. And I'm looking at, and listening to, the start screen/demo of Windham Classics: Below The Root. @Badda ... I love you, man :wub:
     
    Last edited by urherenow, Apr 1, 2019
  8. Elwyndas

    Elwyndas Advanced Member

    Newcomer
    2
    Dec 19, 2018
    United States
    The DS family is clearly the only handheld (!) device where C64 emulation makes sense. This is due to the 2nd screen, that is also a touch screen. The second (lower) screen can be used for the keyboard, besides navigation for the emulation functionality. On every other handheld without a physical keyboard, the virtual keyboard needs to be launched on top of the emulation. This makes the virtual C64 extremely annoying to use in any case where you are not just loading a game with joystick use. Any cracked game with intros etc will usually make you use the keyboard just to get through the opening screens.

    I know I'm stating the obvious here, but it really is the killer advantage and why this project has a great future ahead.

    For future keyboard customization I would love to see the ability to create a custom keyboard with just the keys you need. For example if you are playing Ultima IV you need a lot of keys, but not all of them, and if they are all neatly lined up you can use them with the fingers instead of stylus.

    Other possible features exploiting the bottom touch screen advantage: A graphic menu (icons) allowing quick access to important functions, like:
    • Switching joystick ports
    • Launching virtual keyboard
    • Save / Load state
    • Quickloading and autorun disk image image
    • Reset
    The bottom screen just sets this project apart from all other VICE ports. It will make it shine!

    I was able to play many games that wouldn't run correctly on Frodo, for example Fort Apocalypse.

    I tried to load the fan made cartridge version of "Ultima IV Remastered", but it refused to load.

    I ran some top demos from CSDb, like Booze Design's "The Edge of Disgrace" which has a crazy soundtrack and effects manipulating the hell out of the graphics engine, and it seems to be flawless!

    Very happy to finally see VICE on the 3DS!
     
    Garcimak likes this.
  9. urherenow

    urherenow GBAtemp Psycho!

    Member
    9
    Mar 8, 2009
    United States
    Japan
    lol... I still got the 1337 80's haxing skills with a sector editor. Check out that spirit and stamina :). Getting used to the interface. OSK with touch screen support on the bottom (simultaneous keyboard and joystick use) is still on the top of my wish list.



    IMG_6983.
     
    Last edited by urherenow, Apr 1, 2019
  10. Badda
    OP

    Badda GBAtemp Regular

    Member
    3
    Feb 26, 2016
    Tokelau
    Nirvana
    @Elwyndas @urherenow
    Thanks for the feedback :D Soft keyboard on bottom screen is prio 1 - I'm on it right now. The customizeable buttons are a great idea but need to wait until the most important things are fixed and working.
     
    Elwyndas likes this.
  11. Elwyndas

    Elwyndas Advanced Member

    Newcomer
    2
    Dec 19, 2018
    United States
    Thanks Badda! I'm getting all my old wishes about C64 on 3DS out now :)
    You got a great idea btw to have both joysticks active by utilizing the two "joysticks" on the left side. But we have a THIRD on the N3DS! That underused "C Stick" as Nintendo christened it on the top right. Show me any other VICE port that can work with 2-3 analog joysticks ready to go out of the box!
    It should be mapped by default to the directional keys IMO (cursor position.) The cursor keys are a huge nuisance if you don't have a real C64 keyboard because of that awkward requirement to press shift to use the opposite direction. Later down the road it can emulate the real mouse on GEOS while having two joystick ports live :) That will make every other port pale :)

    In terms of joystick emulation: All the advanced joysticks of the Atari/C64 glory times had an autofire, or rapid fire) functionality. IMO this is an important part of recreating the original feeling. Also a way to beat games without cheats. I would assign one of the two right shoulder keys with default autofire, one for each port. The left shoulder keys could be used for basic navigational stuff like opening images or save states.

    And so on.
     
  12. SLiV3R

    SLiV3R 3DS Friend Code: 0473-9069-2206

    Member
    8
    Jan 9, 2006
    Amiga next?
     
  13. urherenow

    urherenow GBAtemp Psycho!

    Member
    9
    Mar 8, 2009
    United States
    Japan
    baby steps. Next logical port would be c128. I wouldn't want to rush polishing up this one first, though. When this one is done right, I would assume c128 will be much faster to take care of.
     
  14. maorninja

    maorninja GBAtemp Advanced Fan

    Member
    5
    Feb 7, 2016
    United States
    I've never used a C64 so I guess this will be the first time I'll ever experience a "C64" by myself
     
  15. Badda
    OP

    Badda GBAtemp Regular

    Member
    3
    Feb 26, 2016
    Tokelau
    Nirvana
    Just released v0.2 - with onscreen keyboard on bottom screen (thanks @spinal_cord for the images).
    Including the keyboard was a lot harder than I thought. I had to find out that SDL1 does not support multiple screens, so I had to use one big screen that stretches across both displays and "persuade" Vice to only show in the upper portion of the screen. For this, I really had to get into the guts of Vice. I really hope, that I did not break anything while doing so and that the rest of the ToDos will be easier to implement from now on.
     
    Mark McDonut, SLiV3R, Muxi and 2 others like this.
  16. TVL

    TVL #|

    Member
    6
    Feb 17, 2004
    Sweden
    World -1
    Awesome! Could you possibly add an option so the current keysets are saved with the snapshots?

    That way each game could have it's own keyset. In every game where you can jump, and do so with up, I have to change it so that in that keyset Joystick up is coupled with the B-button. Then in the sport games where you waggle the joystick left and right you have that linked to two buttons instead. Racing games with Accelerate, break and gear shift.

    Would be good to have keyboard keys as an option too. So you can have space or F1 etc. linked to the 3DS buttons. That way you could probably have a keyset set up to play The Sentinel using every button on the N3DS. :lol:
     
    MightyJAK likes this.
  17. ArugulaZ

    ArugulaZ GBAtemp Advanced Fan

    Member
    5
    Sep 17, 2009
    United States
    Ho man, this sounds groovy. Is there a CIA version that I can install directly on my system's front page, letting me bypass the Homebrew Channel?
     
  18. urherenow

    urherenow GBAtemp Psycho!

    Member
    9
    Mar 8, 2009
    United States
    Japan
    @Badda the makefile is tailored to your personal setup. Following your directions to compile, it will do *almost everything except actually putting the .3dsx together. It will error out with “can’t open directory”.

    I say *almost, because most people should use dkp exclusively, so p7zip and pkg-config need to be installed separately using apt-get. They will get an error and nothing at all will install, unless they research how to add REPOs to pacman or dkp-pacman (depending on what setup they have).
     
    Last edited by urherenow, Apr 6, 2019
  19. Badda
    OP

    Badda GBAtemp Regular

    Member
    3
    Feb 26, 2016
    Tokelau
    Nirvana
    It's on the todo list :-)
     
    Muxi and kenseiden like this.
  20. Jayro

    Jayro MediCat USB and Mini Windows 10 Developer

    Member
    15
    GBAtemp Patron
    Jayro is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Jul 23, 2012
    United States
    Octo Canyon
    Holy shit...This was my first ever computer in the early 90's, and to see it running on such a gutless handheld impresses the hell outta me! GOOD JOB!

    (And the last version of MediCat I did in October was themed around the Commodore 64, as it turned 36.)

    main_menu.
     
    Last edited by Jayro, Apr 6, 2019
Loading...