From 6adf175691f30cedd6b143dd5b6304206871eb4b Mon Sep 17 00:00:00 2001
From: Oliver Schmidt
Date: Sun, 14 Jun 2020 21:54:33 +0200
Subject: [PATCH] Optimized get_ostype() return values for asm usage.
Making sure that all but //c machines have bit 6 clear allows to use BIT/BVS to detect the //c machines.
---
include/apple2.h | 12 ++++++------
libsrc/apple2/get_ostype.s | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/include/apple2.h b/include/apple2.h
index f205fdcb9..dbed3364d 100644
--- a/include/apple2.h
+++ b/include/apple2.h
@@ -111,12 +111,12 @@
#define APPLE_IIIEM 0x20 /* Apple /// (emulation) */
#define APPLE_IIE 0x30 /* Apple //e */
#define APPLE_IIEENH 0x31 /* Apple //e (enhanced) */
-#define APPLE_IIECARD 0x40 /* Apple //e Option Card */
-#define APPLE_IIC 0x50 /* Apple //c */
-#define APPLE_IIC35 0x51 /* Apple //c (3.5 ROM) */
-#define APPLE_IICEXP 0x53 /* Apple //c (Mem. Exp.) */
-#define APPLE_IICREV 0x54 /* Apple //c (Rev. Mem. Exp.) */
-#define APPLE_IICPLUS 0x55 /* Apple //c Plus */
+#define APPLE_IIECARD 0x32 /* Apple //e Option Card */
+#define APPLE_IIC 0x40 /* Apple //c */
+#define APPLE_IIC35 0x41 /* Apple //c (3.5 ROM) */
+#define APPLE_IICEXP 0x43 /* Apple //c (Mem. Exp.) */
+#define APPLE_IICREV 0x44 /* Apple //c (Rev. Mem. Exp.) */
+#define APPLE_IICPLUS 0x45 /* Apple //c Plus */
#define APPLE_IIGS 0x80 /* Apple IIgs */
#define APPLE_IIGS1 0x81 /* Apple IIgs (ROM 1) */
#define APPLE_IIGS3 0x83 /* Apple IIgs (ROM 3) */
diff --git a/libsrc/apple2/get_ostype.s b/libsrc/apple2/get_ostype.s
index dd44aa831..71b43d174 100644
--- a/libsrc/apple2/get_ostype.s
+++ b/libsrc/apple2/get_ostype.s
@@ -49,13 +49,13 @@ value: .byte $38, $10 ; Apple ][
.byte $EA, $AD, $11 ; Apple ][+
.byte $EA, $8A, $20 ; Apple /// (emulation)
.byte $06, $EA, $30 ; Apple //e
- .byte $06, $E0, $02, $40 ; Apple //e Option Card
+ .byte $06, $E0, $02, $32 ; Apple //e Option Card
.byte $06, $E0, $31 ; Apple //e (enhanced)
- .byte $06, $00, $FF, $50 ; Apple //c
- .byte $06, $00, $00, $51 ; Apple //c (3.5 ROM)
- .byte $06, $00, $03, $53 ; Apple //c (Mem. Exp.)
- .byte $06, $00, $04, $54 ; Apple //c (Rev. Mem. Exp.)
- .byte $06, $00, $05, $55 ; Apple //c Plus
+ .byte $06, $00, $FF, $40 ; Apple //c
+ .byte $06, $00, $00, $41 ; Apple //c (3.5 ROM)
+ .byte $06, $00, $03, $43 ; Apple //c (Mem. Exp.)
+ .byte $06, $00, $04, $44 ; Apple //c (Rev. Mem. Exp.)
+ .byte $06, $00, $05, $45 ; Apple //c Plus
.byte $00
.code