dirkwhoffmann / virtualc64

VirtualC64 is a cycle-accurate C64 emulator for macOS
https://dirkwhoffmann.github.io/virtualc64
Other
356 stars 33 forks source link

Window Roms Dialog button #463

Closed Alessandro1970 closed 5 years ago

Alessandro1970 commented 5 years ago

Hi,

is it possible to add a button in the Hardware Config Window to display the Roms Dialog Window ?

Note: to change the roms to try JaffyDos I had to rename the roms folder (so the VirtualC64 was going to ask for new Roms), but a button in the hardware config (to display the Roms in use) will be faster and more simple.

dirkwhoffmann commented 5 years ago

In V3.2, it'll be easier to replace a ROM, e.g., to install JiffyDOS.

Open menu item "VirtualC64->Preferences->ROM images" which displays a redesigned ROM dialog:

bildschirmfoto 2018-11-19 um 13 00 15

Click the trash icon for the Kernal Rom:

bildschirmfoto 2018-11-19 um 13 00 33

Drag in JiffyDOS, click OK, and perform a reset.

bildschirmfoto 2018-11-19 um 13 04 14
Alessandro1970 commented 5 years ago

Great and very easy !

dirkwhoffmann commented 5 years ago

Support is available in 3.2 alpha 4:

http://www.dirkwhoffmann.de/virtualc64/VirtualC64_3.2alpha4.zip

Any feedback is welcome.

Alessandro1970 commented 5 years ago

It works fine, thanks !

mortinus commented 5 years ago

Ok, it works but why not a button here:

schermata 2018-11-19 alle 23 35 40
dirkwhoffmann commented 5 years ago

Good idea, Mortinus! I'll a button in the hardware preferences.

dirkwhoffmann commented 5 years ago

Button is available in

http://www.dirkwhoffmann.de/virtualc64/VirtualC64_3.2alpha6.zip

The new implementation computes fingerprints for all ROMs (simple FNV-1a hash values) and can therefore recognize different ROM revision. This might be useful especially for the Kernal Rom, because there are three different revisions (the third being the most common one):

bildschirmfoto 2018-11-22 um 10 53 58

If you replace the Kernal by, e.g, JiffyDOS, it looks as follows:

bildschirmfoto 2018-11-22 um 10 54 17

If we want to, we can add JiffyDOS to the known ROMs. There is a simple array map in file RomPrefsController.swift:

let knownKernalRoms : [UInt64 : String] = [
    0x0000000000000000:
    "This 8 KB Rom contains the low-level operating system. There are three major revisions of this chip, the third being the most common.",
    0xFB166E49AF709AB8:
    "Commodore 64 Kernal (1st revision)",
    0x4232D81CCD24FAAE:
    "Commodore 64 Kernal (2nd revision)",
    0x4AF60EE54BEC9701:
   "Commodore 64 Kernal (3rd revision)",
    0x429EA22675CAB478:
    "Commodore 64 Kernal (3rd revision, Danish)",
    0x8C4548E2202CB366:
    "Commodore SX-64 Kernal",
    0x746EB1BC008B07E1:
    "Commodore SX-64 Kernal (Scandinavian)",
]

BTW, is it "ROM" or "Rom"? 🤔 I'm somewhat inconsistent on this.

Alessandro1970 commented 5 years ago

...I prefer "ROM", by the way it works well we can close...

mortinus commented 5 years ago

It works fine for me too