1. Badda

    OP Badda Nu Member
    Member

    Joined:
    Feb 26, 2016
    Messages:
    291
    Country:
    Tokelau
    vice3ds128.png

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

    As a spin-off to the vice3DS C64-emulator, I ported the C128 emulator as well. Alas, the poor 3DS (even the N3DS) is not powerful enough to run the C128 emulator at an acceptable speed (especially in VDC-mode, better known as 80-colums mode, which is painfully slow - VIC-mode runs so so).
    The UI and button mappings are mostly the same as the C64 emulator. Only the soft keyboard has slightly changed and there is a new soft button to switch between 40- and 80-columns mode (which simulates the hardware switch on your C128 monitor).
    Currently, only .3dsx-file is available. If anybody finds this emulator useful, I will create a .cia and .3ds file as well.

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

    Current version is v0.1

    Installation

    Copy .3dsx file to /3ds/vice3ds on your SD card and launch in HBL
    Important: If you have an older version (before 1.5) of vice3DS C64-emulator installed already, 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.

    Known bugs:
    • frequently crashes when switching to/from 80 columns mode
    • crash when switching to/from fullscreen many times
    • sound distortions when using bottom screen, caused by sound buffer underruns
    • 80-columns mode runs VERY slow, sound is garbled due to permanent buffer underruns
    If anybody wants to help fix these bugs, you are welcome to help me with a pull request on github :D

    Thanks to:
     
    Last edited by Badda, Aug 7, 2019
  2. Mikitok

    Mikitok GBAtemp Fan
    Member

    Joined:
    Jan 14, 2019
    Messages:
    301
    Country:
    New Zealand
    New 3DS again TT
     
  3. lone_wolf323

    lone_wolf323 GBAtemp Psycho!
    Member

    Joined:
    May 27, 2011
    Messages:
    3,855
    Country:
    Canada
    what do you expect? The old consoles have shit for power. if people find it slow on new consoles. the old ones are not going to stand a chance.
     
  4. Vague Rant

    Vague Rant Deceptively cute
    Member

    Joined:
    Aug 7, 2008
    Messages:
    2,300
    Country:
    This is really exciting stuff; I grew up with the C64 but never had a 128, this seems like the perfect time to jump on board.

    I don't have any 128 software yet, so I tried loading up a few C64 games since I recall the 128 was backward-compatible, but they all seem to crash on a blocky green screen. Is there anything I can do on my end about that, or is that a non-starter?

    Regardless, thanks so much for making this. :) Off to check out what 128 games were good!
     
  5. Badda

    OP Badda Nu Member
    Member

    Joined:
    Feb 26, 2016
    Messages:
    291
    Country:
    Tokelau
    Maybe you have to hold down the CBM-key during reset? This way, the C128 will boot into C64 mode.
    Actually, I never owned a C128 myself, too. Maybe @urherenow can give some clues?
     
    Last edited by Badda, Aug 8, 2019
    Vague Rant likes this.
  6. Vague Rant

    Vague Rant Deceptively cute
    Member

    Joined:
    Aug 7, 2008
    Messages:
    2,300
    Country:
    Aha! Yep, this does the trick. Zeropaige's Super Mario Bros. C64 port correctly identifies the system as a C128. Thank you! :D
     
    Zurdonx likes this.
  7. DjoeN

    DjoeN Captain Haddock!
    Member

    Joined:
    Oct 21, 2005
    Messages:
    5,490
    Country:
    Belgium
    It really is amazing that the N3DS can handle GBA/SNES/MD etc... emulation, but can't even handle a C128 :wacko::rofl2:
     
  8. Vague Rant

    Vague Rant Deceptively cute
    Member

    Joined:
    Aug 7, 2008
    Messages:
    2,300
    Country:
    Been reading about the C128 a bit more and just found another tidbit: you can switch to C64 mode at any time from the BASIC shell by typing "GO64".

    EDIT: I figured I should expand on why anybody would use a Commodore 128 emulator to play Commodore 64 games in backward-compatibility mode when there's already a perfectly good Commodore 64 emulator. The answer is pretty simple: both systems use 6502-based CPUs, but while the C64's is clocked at 1MHz, the C128 has a variable clockspeed that can run at 1MHz or, for C128 and C128-enhanced games, 2MHz. Because of this, there are several C64 games which take advantage of the bump to the 128's hardware to run better:

    The disk for Qix had a normal C64 version on side A, and a C128-enhanced version on side B. Ultima V has no music on the C64, but play it in C64 mode on a C128 and it uses the extra processing time to have music playing throughout the game. This also extends to homebrew, like Zeropaige's Super Mario Bros. port, which runs pretty poorly on a stock C64 but can be enhanced by CPU addons or, drumroll, the C128. There's still some slowdown, but it's really night and day.
     
    Last edited by Vague Rant, Aug 9, 2019
    Garcimak and Badda like this.
  9. urherenow

    urherenow GBAtemp Psycho!
    Member

    Joined:
    Mar 8, 2009
    Messages:
    3,738
    Country:
    United States
    WoW! All the really good stuff happens when I'm out to sea. Can hardly wait to dig into this one. Perhaps I'll upload a disk image of some music I transposed into C128 BASIC when I was young :P Gotta test it out on this first though.
     
  10. Elwyndas

    Elwyndas GBAtemp Regular
    Member

    Joined:
    Dec 19, 2018
    Messages:
    197
    Country:
    United States
    Last edited by Elwyndas, Dec 3, 2019
  11. Computer_Freak_2004

    Computer_Freak_2004 Advanced Member
    Newcomer

    Joined:
    Jun 1, 2019
    Messages:
    54
    Country:
    Germany
    Is it possible to port the Vice-VIC-20 Emulator to the 3DS as well? I think this should run at a good framerate on the Old3DS because I get around 2000% speed when in warp mode in the Vice-VIC-20 emulator on my PC. But on Vice-C64 I only get around 300% speed in warp mode.
     
  12. urherenow

    urherenow GBAtemp Psycho!
    Member

    Joined:
    Mar 8, 2009
    Messages:
    3,738
    Country:
    United States
    @Badda I've just updated my firmware to the latest, and Luma to the latest, and the c128 .3dsx file no longer works. It crashes the system! The installed c64 still works.

    Building from source is kind of messed up as well. I'm assuming that the couple of uses for GSPGPU_FramebufferFormats are meant to be GSPGPU_FramebufferFormat (in the latest libraries... unless it really needs gfxFramebufferFormats?)

    But I can't wrap my head around sceneInit in SDL_n3dsvideo.c. There is an implicit non-static declaration at line 421, but then a static declaration at line 723, and in the end, I end up with a defined but not used error on sceneInit anyway.

    Edit: sceneInit wasn't an issue (since apparently it isn't used), I had to look farther up to see another GSPGPU_FramebufferFormats that I missed taking the "s" off of. But at the end, there are a ton of "undefined reference" errors to a buttload of important stuff, as well as cart/magicvoice.c having some things WAY out of the array bounds. Something is really fishy when it comes to linking... it must be in the makefile, but I don't see what's wrong.
     
    Last edited by urherenow, Nov 30, 2020
  13. Badda

    OP Badda Nu Member
    Member

    Joined:
    Feb 26, 2016
    Messages:
    291
    Country:
    Tokelau
    I got it to compile again with the latest libctru version but I do not have enough time for testing.
    Here is the new 3dsx: http://badda.de/dl/vice3DS-C128.3dsx
    I'd be happy if you had some time to test ...
     
  14. urherenow

    urherenow GBAtemp Psycho!
    Member

    Joined:
    Mar 8, 2009
    Messages:
    3,738
    Country:
    United States
    It works! Thanks for re-compiling! Wish I could simply clone and compile myself though. You have a perfectly good .cia for C64, and I'd really like to build a .cia for 128. One thing to note, in case people with weird boot choices try to report bugs. Background first... I boot into a franken GW emunand quite often because I like their cheat engine. It seems that now, the only way for me to load up HBL (in GW mode), is via *hax.

    With that in mind, the UI (at least on 128... didn't check c-64 just now) is super sluggish, and either I am impatient, or it freezes on a red BOTTOM screen when trying to quit the emulator. Again, this is only when getting into HBL via *hax. When loading HBL via Rosalina, it seems pretty much perfect to me :). This is my main reason for wanting a .cia for 128.

    Edit: do you have local changes not committed to .git? In case you were using a wip ctrulib, I just pulled, compiled, and installed from the current source, and tried to build vice3ds again. right off the bat, it errors out on GSPGPU_FramebufferFormats (and changing that to GSPGPU_FramebufferFormat everywhere it appears gets past it). I still end up with linker problems in the end though. spits out a ton of undefined references that I know are actually in the source. All things installed under dkp-pacman are up to date, with a (now) fresh pull of the ctrulib source).

    ~/projects/vice3ds$ git checkout
    Your branch is up to date with 'origin/master'.
     
    Last edited by urherenow, Dec 3, 2020
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - [Release], Emulator), Vice3DS