vc64web / virtualc64web

vc64web - Commodore C64 Emulator for iPad iPhone Android and the Web with CSDb access for thousands of demos at your fingertip.
https://vc64web.github.io/doc/about.html
GNU General Public License v3.0
45 stars 5 forks source link

NTSC support #239

Closed ejelly closed 5 months ago

ejelly commented 5 months ago

It would be great if the emulator had NTSC support.

mithrendal commented 5 months ago

Hi, first the virtualC64 emulation core which is used by vc64web has basically a NTSC support. 😎

image

why would one like to use that ? 🤔

use case A: run NTSC titles use case B: get butter smooth scrolling on 60Hz displays (vsync)

discussion: we can easily get case B without using NTSC VICII modes at all by just running the system around 20 % faster in vsync mode. i.e. every host frame triggers exactly one c64 frame. 😊

on the other hand we can also make the NTSC VICII modes configurable in the vc64web settings but for compatibility reasons have also a look to here https://github.com/dirkwhoffmann/virtualc64/issues/754

ejelly commented 5 months ago

I’d like to use Flight Simulator II though, and that really only works properly with NTSC. Then there’s of course other games and demos.

North Americans (for example) will also be more familiar with the aspect ratio and differing border scanline count of NTSC C64s.

ejelly commented 5 months ago

Oh, I see now. Looks like Virtual C64 doesn’t really support NTSC, that of course affects this project as well, yeah.

Pity, because FS2 is really still worth using today. It has a certain challenge, and great charm with its many, many scenery disks.

mithrendal commented 5 months ago

Pity, because FS2 is really still worth using today. It has a certain challenge, and great charm with its many, many scenery disks.

have you already tried in VirtualC64 for mac ?

lets try with the NTSC VICII 8562

image

ok I can see the aspect ratio and borderscan lines are now different with this VICII model.

now I am in flight II

image image

I see the instruments are oval in NTSC instead of circles in PAL.

dirkwhoffmann commented 5 months ago

VirtualC64 does have real NTSC support (simply select the proper VICII revision). However, NTSC is not as compatible as PAL. Most titles will work, but not all. I didn't spend as much dev time on NTSC modes as on PAL modes, as most C64 titles have been made for the PAL market back in the day.

mithrendal commented 5 months ago

VirtualC64 does have real NTSC support (simply select the proper VICII revision).

👍 nice ! Good to know, then I just use that API to switch between NTSC and PAL... working on it right now...

mithrendal commented 5 months ago

status update

I am able to switch between NTSC and PAL without any reset...

image image

in NTSC mode it renders 60 frames per second and in PAL 50 frames.

😎

the colors are slightly different ... it seems that the core adapts the colors according to the VIC2 model, that is cool

ejelly commented 5 months ago

Sweet! Yeah, there are a few details different between PAL and NTSC devices.

mithrendal commented 5 months ago

I will do some more testing and code cleanup… but I would say that you can expect an NTSC update in the coming days if test results are ok…

mithrendal commented 5 months ago

it is online .... https//vc64web.github.io supports now switching between different NTSC / PAL VIC-II revisions. 😎 PAL runs at 50.125 Hz whereas NTSC is running at 60Hz.

should we also add a setting to enable the gray dot bug, or switching between different revisions of the CIAs ?

gooddosh commented 5 months ago

Outstanding!

mithrendal commented 5 months ago

😬 I forgot to update the value of the vic rev in the settings dialog when restoring from a snapshot ...

fixed and published 😎

now we can enjoy american titles in orginal sound speed, 60 fps and american aspect ratio of the screen

mithrendal commented 5 months ago

@ejelly as NTSC VIC2s are now supported I will close the issue... if anything is wrong with it just reopen