[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
    I had to remove a couple of things to get Vice to compile on devkitARM, e.g. anything related to RS232 emulation. Maybe that is the cause why turning off true drive emu is not working (maybe also JiffyDOS). Unfortunately, devkitARM does not feature a full fledged glibc linke Linux or Windows and some features are missing (e.g. https://devkitpro.org/viewtopic.php?f=15&t=8644 - this is the reason I had to remove RS232 support). I will check into this though ...
     
  2. Vague Rant

    Vague Rant Deceptively cute

    Member
    6
    Aug 7, 2008
    Melbourne
    Thanks Badda. I do have Render Filter set to None but there's still some filtering going on with the image.

    Here's a portion of a screenshot I took on my 3DS, blown up to 8x scale:

    [​IMG]

    There's a bit of blurring going on between individual pixels here: those castle bricks are just supposed to be solid brown, but they're taking on darker edges from the color of the black space between them, the bricks around the edges are sort of "ghosting" onto the sky, the white flag is exhibiting a sort of "bloom", etc.

    I know literally nothing about VICE, SDL or SDL-VICE, but Googling around a bit I see there's a config option to enable/disable OpenGL linear filtering in the "normal" (non-3DS-targeting!) builds--0 is for nearest-neighbor scaling, 1 is for linear scaling:

    Code:
    SDLGLFilter=0
    However, since the 3DS port isn't employing OpenGL anyway, adding this setting to your port's config doesn't do anything.

    Sorry I can't be more helpful; this is a fantastic project and I'm already having tons of fun with it!
     
    Last edited by Vague Rant, Apr 24, 2019
  3. spinal_cord

    spinal_cord Knows his stuff

    Member
    8
    Jul 21, 2007
    somewhere
    An earlier version was able to set the pixels to 1:1 ratio if you messed about with the display settings enough, can't remember what you needed to do exactly, but it didn't seem to save the settings, so you had to do it every time. Not sure about later versions.

    touch screen in the same way as a laptop...
     
    kenseiden likes this.
  4. FanNintendo

    FanNintendo GBAtemp Fan

    Member
    4
    Apr 16, 2018
    United States
    My first computer will never forget wish I still save my tape and floppy also Ahoy! Magazines
     
  5. Elwyndas

    Elwyndas Advanced Member

    Newcomer
    2
    Dec 19, 2018
    United States
    I think what's going on here is that Vice3DS is set to "CRT Emulation" ON. This is also the default setting on WinVICE 3.3
    It successfully emulates the appearance of the picture on a TV or Commodore monitor back in the day (cathode-ray tube). Even though the video chip produced exact pixels, the monitors would blur it, add scan lines. and create the effect you captured on your emulation screen shot. You will actually find that a totally perfect representation of the pixels does not look "authentic", simply because we are used to the way it was displayed on CRT screens. The CRT emulation came later because people were not happy with the perfect pixels of the first emulators. It's actually a great achievement.
    I loaded Ultima IV with CRT emulation on and it just looks perfect to me. Perfectly blurry. I guess there is a reason why it's the default in WinVICE.
    The video settings in Vice3DS don't seem to do anything. It always stays on the same CRT mode ON. IMO that's fine for now.
     
    Last edited by Elwyndas, Apr 25, 2019
  6. Vague Rant

    Vague Rant Deceptively cute

    Member
    6
    Aug 7, 2008
    Melbourne
    I don't think that's the case. Here's a screenshot of the exact same scene with the CRT filter enabled:

    [​IMG]

    It's noticeably different from my previous screenshot with the CRT filter turned off. The colors are washed out, there are faint but also inaccurate scanlines (you can't really add scanlines to an image that's the same resolution as the original image, which is what we're looking at here), there's significantly more pixel blur on the X-axis than the Y-axis (multiple pixels in the same scanline blurring together on a "CRT"), etc. This is clearly a CRT filter.

    When the CRT filter is turned off, all that's left is some kind of linear filter over the image which isn't doing anything "CRT-ish", it's just blurring equally in every direction with none of the other effects. If anything, I think I'd guess that the linear filter is being applied after the CRT filter, so with CRT mode enabled you're getting both.
     
  7. Badda
    OP

    Badda GBAtemp Regular

    Member
    3
    Feb 26, 2016
    Tokelau
    Nirvana
    I'm able to reproduce the issue. It's there on the bottom screen as well - even the keyboard comes out blurry. That seems to be an SDL issue, I'm researching the topic.
     
    Vague Rant likes this.
  8. Elwyndas

    Elwyndas Advanced Member

    Newcomer
    2
    Dec 19, 2018
    United States
    Are you taking these screenshots via Rosalina? I have done that too. It's not a perfect representation of what you see with your eyes on the real screen, not even close. Just open the 3DS and look closely. You can see that there are scan lines. I can only assume that Nintendo put them into the hardware on purpose. I attached an actual photo taken with my phone, of the default C64 screen on Vice3DS. As somebody who has stared at that screen for many years in real life on a real Commodore 64, I can attest that it looks perfect on the 3DS. The screenshots you took with the Rosalina hack are not what you actually see, they misrepresent reality.
     

    Attached Files:

    Last edited by Elwyndas, Apr 26, 2019
  9. Vague Rant

    Vague Rant Deceptively cute

    Member
    6
    Aug 7, 2008
    Melbourne
    Rosalina screenshots, yep.

    Those "scanlines" on the 3DS screen are just a side effect of the way the 3D screen works; you don't get the same quasi-scanline look on a 2DS, for example. It is a bit of a happy accident, though. Still, drawing fake scanlines to the screen (as the CRT filter does if you let it) doesn't really make sense if you've already got the "actual" scanlines from the hardware.
     
  10. Elwyndas

    Elwyndas Advanced Member

    Newcomer
    2
    Dec 19, 2018
    United States
    Sorry, but I think the photo I took would look the same on the 2DS. I have one here, and if you challenge it I will install it. I think we should discount Rosalina screenshots as a measurement of how good the emulation is. I prefer my own eye. We know from system theory that observers manipulate the subject of their observation simply by observing. It's pretty obvious to me.
     
    Last edited by Elwyndas, Apr 26, 2019
  11. Vague Rant

    Vague Rant Deceptively cute

    Member
    6
    Aug 7, 2008
    Melbourne
    These aren't my photos, credit to @captaineos, but here's what the 3DS and 2DS screens look like, side by side:

    [​IMG]

    The 3DS screen is fairly unique in that it has double the DPI horizontally to what it has vertically (for a total resolution of 800*240), because when you're using 3D, it's sending half of those pixels to each eye (400*240 each). The 2DS screen by comparison is a standard 400*240 display. The "scanline" effect when you aren't using 3D is just what happens when you're looking at pixels that are packed twice as densely, horizontally: they tend to look like one long bar, while the vertical columns of pixels are spread further apart. On the 2DS, the pixels have equal spacing in any direction, so you could either view it as no scanlines or simultaneous vertical and horizontal scanlines (which broadly don't exist in "nature").

    I've been testing out VICE on Windows to see what sort of things the CRT filter is doing, and I've realized I misunderstood part of what's going on. What I was calling "inaccurate scanlines" previously are actually the "Odd lines offset", a feature which tries to replicate the variance in color reproduction between individual lines in a PAL signal. i.e. Alternating lines are simply colored differently. Scanlines in the sense of gaps between lines are in fact are completely non-functioning in Vice3DS, because that feature requires "double size" toggle to be enabled: it doubles the image size then makes every second line a scanline. We can't double the image size on 3DS because we just don't have the resolution for it. No double size, no scanlines.

    I want to be clear that I'm in no way questioning the accuracy of the emulation, just pointing out an actual flaw in the way the image is presented on-screen in this port, which is not intentional on the part of either the VICE authors or Badda. Badda has recognized this issue and brought it up in the SDL thread. This isn't a subjective issue like whether or not the CRT filter looks nice/accurate, it's some form of bug or oversight which is unintentionally adding filtering to the image on 3DS. I'm not using the screenshots to argue that things don't look the way I find appealing, I'm using them to demonstrate a reproducible issue with the display of this app. This isn't a matter of your eyes or mine or anybody's; you can have a subjective opinion that the filtering looks good, but it's objectively an error.

    Lastly, I promise you that observing this bug definitely isn't the cause of this bug.
     
  12. spinal_cord

    spinal_cord Knows his stuff

    Member
    8
    Jul 21, 2007
    somewhere
    No matter how 'close' to a crt screen the effect give, a lot of people prefer images to be pixel perfect. On a screen that can easily create a 1:1 pixel image from the C64, that option should not be ignored. It's similar to saying new DVD players should blur the image on purpose just because old TV weren't as clear as new LCD ones.
    Defending an unintended gfx issue should never be the way to deal with a simple request and lets remember, artificially blurring a screen will never look the same as viewing an image on an old computer monitor or TV.
     
    kenseiden and Vague Rant like this.
  13. Badda
    OP

    Badda GBAtemp Regular

    Member
    3
    Feb 26, 2016
    Tokelau
    Nirvana
    @nop90 is not replying but I guess I know the reason. There is no way to easily fix this with the SDL implementation approach he chose. The way he is bringing the pixels on the screen is by means of the GPU 3D texturing functions which always do some filtering. The only way to work around this is to rewrite the video-part of his SDL-port - which would be quite some effort. Maybe someone is up for the task? :D
     
  14. Vague Rant

    Vague Rant Deceptively cute

    Member
    6
    Aug 7, 2008
    Melbourne
    You'd know much better than I would, so I apologize if this comes across badly, but I thought filtering on the GPU was optional. 3dbrew has this page about GPU registers which seems to describe a filter toggle for textures between nearest (unfiltered) and linear (filtered). Again, sorry if that's not relevant here.
     
  15. Elwyndas

    Elwyndas Advanced Member

    Newcomer
    2
    Dec 19, 2018
    United States
    Vague Rant likes this.
  16. Elwyndas

    Elwyndas Advanced Member

    Newcomer
    2
    Dec 19, 2018
    United States
    What does everybody think about the following fundamental change:

    Move the settings/loading screen to the bottom. The emulation continues to run, while you make your selection.
    This means it would temporarily overwrite the soft keyboard, and any widgets that might be there. But it will create a much better experience overall. The touch screen will still be filled by default with the keyboard and essential widgets, but when more action is needed, the settings menu pops up down there.

    Imagine, if you are in a demo or game, and need to change disks, or switch joysticks, or whatever, this can be done without interrupting the flow of the emulation.

    I basically envision the 3DS hardware being a superior controller of the C64. The top screen always stays on as it is originally. All manipulation is done on the bottom screen or with hardware buttons/d-pads etc.

    With the combination of the touch screen and the countless buttons and "joysticks", it will create the feeling of a monster controller plugged into the real C64, easily achieving the formerly tedious tasks of stuff like: Switching joystick ports, loading disks, pausing the game (!), saving states, loading them, reset, doing run/stop restore, injecting Load"*",8,1 and Run, increasing/decreasing emulation speed, adding/removing SID chips, messing around with other machine settings, all this while the emulation continues to run uninterrupted, just like it would be on the real deal.

    The C64 didn't pop up a black screen when you changed the disk.

    This to me is the ultimate usability goal, and all other Vice platforms will pale in comparison.

    It will feel like a revolutionary hardware extension of the C64, without compromising the original.
     
    Muxi likes this.
  17. snoofly

    snoofly GBAtemp Advanced Fan

    Member
    7
    Aug 18, 2015
    United States
    ^ Sounds a bit like the way ZXDS works for the Spectrum.
     
  18. Mikitok

    Mikitok Advanced Member

    Newcomer
    1
    Jan 14, 2019
    New Zealand
    So sad only for new 3ds / new 2ds
     
  19. Elwyndas

    Elwyndas Advanced Member

    Newcomer
    2
    Dec 19, 2018
    United States
    Bingo! When you look through this 5 min review of ZXDS you see a lot of great ideas already implemented on that emulator.
    For example a great looking mapping tool, where the DS buttons are represented on the touch screen and can easily be mapped to ZX keys or joystick functions. No more guessing or messing around.
    upload_2019-4-28_10-12-9.
     
  20. snoofly

    snoofly GBAtemp Advanced Fan

    Member
    7
    Aug 18, 2015
    United States
    ZXDS is exactly how I’d like to see a C64 emu evolve.
    The way the emulation runs in parallel to the actions on the bottom screen makes the whole experience seamless
    and intuitive.

    My only minor gripe with ZXDS is the border effects like loading lines are displayed on the bottom screen only and not on the main gameplay screen as expected.

    EDIT2:
    Came back just to say this is looking nice now Badda!
    Had some issues a few weeks back with screen display but coming back to my N3DS just now, after removing all remnants of older builds and installing the latest 1.1 cia, all looks good. ;)
     
    Last edited by snoofly, Apr 30, 2019
    Elwyndas likes this.
Loading...