bug: openROM=true overwrites persisted roms
mithrendal opened this issue · 2 comments
mithrendal commented
when only floppy rom is missing and all three other roms are already choosen by the user and persisted in the localStorage.
the preconfig openROM=true
overwrites these user choosen roms when receiving MSG_ROM_MISSING from the wasm core
because it thinks there are no roms yet => and then openROMS will be loaded without question to the user
solution: only auto load openROMS when one of the three romtypes is missing: basic, kernal or charset
mithrendal commented
it turned out that it was an error in vc64_ui.js
in the following code the condition has to be
param_link != null && param_link.match(/[.](d64|g64)$/i) != null
erroneous code ...
var the_rom=loadStoredItem('vc1541_rom.bin');
if (the_rom==null){
var param_link=get_parameter_link();
if(
param_link == null ||
param_link.match(/[.](d64|g64)$/i) != null
)
{
all_fine=false;
}
$("#rom_disk_drive").attr("src", "img/rom_empty.png");
$("#button_delete_disk_drive_rom").hide();
}
else
{
$("#rom_disk_drive").attr("src", "img/rom.png");
$("#button_delete_disk_drive_rom").show();
}
and I was blaming the core 😢... I am so sorry 🙏🏻 ...
mithrendal commented
fixed