VSP memory corruption emulation skips last page
Versatile Commodore Emulator
Brought to you by:
blackystardust,
gpz
VSP memory corruption emulation skips page $ff.
Patch:
--- vice/src/viciisc/vicii-cycle.c (Revision 45768)
+++ vice/src/viciisc/vicii-cycle.c (Arbeitskopie)
@@ -1,4 +1,4 @@
-/*
+*
* vicii-cycle.c - Cycle based VIC-II emulation.
*
* Written by
@@ -339,7 +339,7 @@
/* simulate the "VSP bug" problem */
if(vicii_resources.vsp_bug_enabled) {
if((vsp_buglines[line] + vsp_bugchannels[channel] + lib_unsigned_rand(0, 1)) > VSP_PROB_THRESH) {
- for(page = 0x00; page < 0xff; page++) {
+ for(page = 0x00; page <= 0xff; page++) {
/* keep 98,5% of all pages untouched. this is hand tweaked to result in
* somewhat convincing long term plots in vsp-lab */
if (lib_unsigned_rand(0, 1000) > 985) {
Now i am curious how you even noticed this :)
And rightfully so! :D I am working on VSP safety and wanted to patch vice in order to perform extreme VSP memory corruption - that's where I stumbled across it. ;)
This is my full diff:
patch applied in r45773 - thanks!