mirror of
https://github.com/jeremysrand/a2bejwld.git
synced 2024-06-25 23:29:27 +00:00
Add code to handle buggy double lores HW on the Apple //e card for the Mac. Apparently it doesn't handle the colour shifting that is required in the aux bank on other Apple // HW.
This commit is contained in:
parent
d3d97db1f6
commit
49ccd2bfdc
Binary file not shown.
|
@ -19,6 +19,13 @@ extern void __fastcall__ clearDblLoRes(void);
|
||||||
extern void __fastcall__ unshowDblLoRes(void);
|
extern void __fastcall__ unshowDblLoRes(void);
|
||||||
extern void __fastcall__ mixedTextMode(void);
|
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
|
||||||
|
// routines to use the same colours in the main and aux banks.
|
||||||
|
extern void __fastcall__ setBuggyDblLoRes(void);
|
||||||
|
|
||||||
extern void __fastcall__ drawBgSquare(tSquare square);
|
extern void __fastcall__ drawBgSquare(tSquare square);
|
||||||
|
|
||||||
extern void __fastcall__ drawGem(tSquare square);
|
extern void __fastcall__ drawGem(tSquare square);
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
.export _explodeGemFrame3, _explodeGemFrame4
|
.export _explodeGemFrame3, _explodeGemFrame4
|
||||||
.export _explodeGemFrame5, _explodeGemFrame6
|
.export _explodeGemFrame5, _explodeGemFrame6
|
||||||
|
|
||||||
|
.export _setBuggyDblLoRes
|
||||||
|
|
||||||
.include "apple2.inc"
|
.include "apple2.inc"
|
||||||
|
|
||||||
SETAN3 := $C05E
|
SETAN3 := $C05E
|
||||||
|
@ -909,6 +911,24 @@ xPos: .BYTE $0
|
||||||
square: .BYTE $0
|
square: .BYTE $0
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
|
.proc _setBuggyDblLoRes
|
||||||
|
ldx #63
|
||||||
|
@L1:
|
||||||
|
lda bgColor,X
|
||||||
|
sta bgAuxColor,X
|
||||||
|
dex
|
||||||
|
bpl @L1
|
||||||
|
|
||||||
|
ldx #8
|
||||||
|
@L2:
|
||||||
|
lda gemColours,X
|
||||||
|
sta gemAuxColours,X
|
||||||
|
dex
|
||||||
|
bpl @L2
|
||||||
|
|
||||||
|
rts
|
||||||
|
.endproc
|
||||||
|
|
||||||
|
|
||||||
.DATA
|
.DATA
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "dbllores.h"
|
||||||
#include "machine.h"
|
#include "machine.h"
|
||||||
#include "vbl.h"
|
#include "vbl.h"
|
||||||
|
|
||||||
|
@ -32,9 +33,9 @@ static tMachineGSSpeed gOldSpeed = GS_SPEED_SLOW;
|
||||||
// Implementation
|
// Implementation
|
||||||
|
|
||||||
|
|
||||||
static bool machineIs2c(void)
|
static bool machineIs2c(uint8_t machineType)
|
||||||
{
|
{
|
||||||
switch (get_ostype()) {
|
switch (machineType) {
|
||||||
case APPLE_IIC:
|
case APPLE_IIC:
|
||||||
case APPLE_IIC35:
|
case APPLE_IIC35:
|
||||||
case APPLE_IICEXP:
|
case APPLE_IICEXP:
|
||||||
|
@ -47,9 +48,9 @@ static bool machineIs2c(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static bool machineIs2GS(void)
|
static bool machineIs2GS(uint8_t machineType)
|
||||||
{
|
{
|
||||||
switch (get_ostype()) {
|
switch (machineType) {
|
||||||
case APPLE_IIGS:
|
case APPLE_IIGS:
|
||||||
case APPLE_IIGS1:
|
case APPLE_IIGS1:
|
||||||
case APPLE_IIGS3:
|
case APPLE_IIGS3:
|
||||||
|
@ -86,18 +87,22 @@ static tMachineGSSpeed setGSSpeed(tMachineGSSpeed newSpeed)
|
||||||
|
|
||||||
void initMachine(void)
|
void initMachine(void)
|
||||||
{
|
{
|
||||||
if (machineIs2c()) {
|
uint8_t machineType = get_ostype();
|
||||||
|
|
||||||
|
if (machineIs2c(machineType)) {
|
||||||
gVblWait = vblWait2c;
|
gVblWait = vblWait2c;
|
||||||
} else if (machineIs2GS()) {
|
} else if (machineIs2GS(machineType)) {
|
||||||
vblInit2gs();
|
vblInit2gs();
|
||||||
gOldSpeed = setGSSpeed(GS_SPEED_SLOW);
|
gOldSpeed = setGSSpeed(GS_SPEED_SLOW);
|
||||||
}
|
}
|
||||||
|
else if (machineType == APPLE_IIECARD)
|
||||||
|
setBuggyDblLoRes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void uninitMachine(void)
|
void uninitMachine(void)
|
||||||
{
|
{
|
||||||
if (machineIs2GS()) {
|
if (machineIs2GS(get_ostype())) {
|
||||||
setGSSpeed(gOldSpeed);
|
setGSSpeed(gOldSpeed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
// Defines
|
// Defines
|
||||||
|
|
||||||
#define SAVE_OPTIONS_FILE "A2BEJWLD.OPTS"
|
#define SAVE_OPTIONS_FILE "A2BEJWLD.OPTS"
|
||||||
#define VERSION "v2.4"
|
#define VERSION "v2.5.a1"
|
||||||
|
|
||||||
#define OPTIONS_VERSION_UNSAVED 0
|
#define OPTIONS_VERSION_UNSAVED 0
|
||||||
#define OPTIONS_VERSION 2
|
#define OPTIONS_VERSION 2
|
||||||
|
|
Loading…
Reference in New Issue
Block a user