diff --git a/a2bejwld.xcodeproj/project.xcworkspace/xcuserdata/jrand.xcuserdatad/UserInterfaceState.xcuserstate b/a2bejwld.xcodeproj/project.xcworkspace/xcuserdata/jrand.xcuserdatad/UserInterfaceState.xcuserstate index 7e6f502..89574b3 100644 Binary files a/a2bejwld.xcodeproj/project.xcworkspace/xcuserdata/jrand.xcuserdatad/UserInterfaceState.xcuserstate and b/a2bejwld.xcodeproj/project.xcworkspace/xcuserdata/jrand.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/a2bejwld/dbllores.h b/a2bejwld/dbllores.h index 1e408ee..5959a95 100644 --- a/a2bejwld/dbllores.h +++ b/a2bejwld/dbllores.h @@ -22,7 +22,10 @@ extern void __fastcall__ mixedTextMode(void); // The Apple //e card does not implement double lores correctly. The colours // used on the aux bank need to be shifted but the //e card expects unshifted // colour values (ie the same as those on the main. This function is called -// when the game detects it is runing on a //e card which causes the graphics +// when the game detects it is not running on a //c or //gs. I would like to +// get_ostype() from the cc65 runtime but it doesn't work reliably for detecting +// the //e card. So I put in my own detection based on the technote. If the +// function detects it is runing on a //e card, it causes the graphics // routines to use the same colours in the main and aux banks. extern void __fastcall__ setBuggyDblLoRes(void); diff --git a/a2bejwld/dbllores.s b/a2bejwld/dbllores.s index 962a499..4b76e2b 100644 --- a/a2bejwld/dbllores.s +++ b/a2bejwld/dbllores.s @@ -912,6 +912,20 @@ square: .BYTE $0 .endproc .proc _setBuggyDblLoRes + bit $c082 + + lda $fbb3 + cmp #$6 + bne @L3 + + lda $fbc0 + cmp #$e0 + bne @L3 + + lda $fbdd + cmp #$02 + bne @L3 + ldx #63 @L1: lda bgColor,X @@ -925,7 +939,9 @@ square: .BYTE $0 sta gemAuxColours,X dex bpl @L2 - + +@L3: + bit $c080 rts .endproc diff --git a/a2bejwld/machine.c b/a2bejwld/machine.c index b820d9c..651d431 100644 --- a/a2bejwld/machine.c +++ b/a2bejwld/machine.c @@ -94,8 +94,7 @@ void initMachine(void) } else if (machineIs2GS(machineType)) { vblInit2gs(); gOldSpeed = setGSSpeed(GS_SPEED_SLOW); - } - else if (machineType == APPLE_IIECARD) + } else setBuggyDblLoRes(); } diff --git a/a2bejwld/ui.c b/a2bejwld/ui.c index f0ddb68..35ce470 100644 --- a/a2bejwld/ui.c +++ b/a2bejwld/ui.c @@ -26,7 +26,7 @@ // Defines #define SAVE_OPTIONS_FILE "A2BEJWLD.OPTS" -#define VERSION "v2.5.a1" +#define VERSION "v2.5.a3" #define OPTIONS_VERSION_UNSAVED 0 #define OPTIONS_VERSION 2