263 lines
3.7 KiB
ArmAsm
Raw Normal View History

2023-12-30 23:03:33 +01:00
*
* Le retour du Dr Genius
*
* (c) 1983, Loriciels
* (c) 2023, Brutal Deluxe Software (Apple II)
*
lst off
rel
dsk iigs.l
mx %00
xc
xc
*-----------------------------------
* MACROS
*-----------------------------------
2023-12-31 22:49:51 +01:00
use 4/Event.Macs
2023-12-30 23:03:33 +01:00
use 4/Locator.Macs
use 4/Mem.Macs
use 4/Menu.Macs
use 4/Misc.Macs
use 4/QD.Macs
2023-12-31 10:56:15 +01:00
use 4/QDAux.Macs
2023-12-30 23:03:33 +01:00
use 4/Util.Macs
use 4/Window.Macs
GSOS = $e100a8
2023-12-31 21:27:37 +01:00
dpFROM = $70
2023-12-30 23:03:33 +01:00
dpTO = dpFROM+2
refIsPointer = $0
refIsHandle = $1
refIsResource = $2
TRUE = 255
FALSE = 0
2023-12-31 10:56:15 +01:00
ptr012000 = $012000
ptrE12000 = $e12000
2023-12-31 21:27:37 +01:00
modeForeCopy = $0004 ; QDII Table 16-10
2023-12-30 23:03:33 +01:00
mode320 = $00
mode640 = $80
maxX = 320
maxY = 200
*-----------------------------------
* DU 16-BITS
*-----------------------------------
2023-12-31 10:56:15 +01:00
ICI phk
2023-12-30 23:03:33 +01:00
plb
clc
xce
rep #$30
tdc
sta myDP
lda #ICI
stal $300
lda #^ICI
stal $302
_TLStartUp
pha
_MMStartUp
pla
2023-12-31 21:27:37 +01:00
sta appID
ora #$0100
2023-12-30 23:03:33 +01:00
sta myID
pha
pha
PushWord myID
PushWord #refIsPointer
PushLong #toolTBL
_StartUpTools
PullLong ssREC
_HideMenuBar
_InitCursor
_HideCursor
PushLong #0
PushWord #5 ; SetDeskPat
PushWord #$4000
PushWord #$0000
_Desktop
pla
pla
2023-12-31 21:27:37 +01:00
*-----------------------------------
* INITIALISATIONS DESKTOP
*-----------------------------------
2023-12-30 23:03:33 +01:00
PushLong #0
_GetPort
PullLong mainPORT
PushLong mainPORT
_SetPort
PushWord #0
_SetBackColor
PushWord #15
_SetForeColor
PushLong #whitePATTERN ; white pattern
_SetPenPat
PushWord #0
_ClearScreen
2023-12-31 21:27:37 +01:00
PushWord #0
_GetMasterSCB
pla
bmi okSHADOW ; shadowing is on if bit 15 is set
2023-12-30 23:03:33 +01:00
2023-12-31 21:27:37 +01:00
lda #^ptrE12000 ; shadowing is off, use slow RAM
sta srcLocInfoPtr+4
2023-12-30 23:03:33 +01:00
2023-12-31 21:27:37 +01:00
okSHADOW
2023-12-30 23:03:33 +01:00
2023-12-31 21:27:37 +01:00
*-----------------------------------
* IL FAUT JOUER MAINTENANT
*-----------------------------------
2023-12-30 23:03:33 +01:00
2023-12-31 21:27:37 +01:00
jsr PLAY
2023-12-30 23:03:33 +01:00
*-----------------------------------
* AU REVOIR LE IIGS
*-----------------------------------
2023-12-31 21:27:37 +01:00
QUIT _GrafOff
2023-12-30 23:03:33 +01:00
PushWord #refIsPointer
PushLong ssREC
_ShutDownTools
PushWord myID
_DisposeAll
2023-12-31 21:27:37 +01:00
PushWord appID
_DisposeAll
PushWord appID
2023-12-30 23:03:33 +01:00
_MMShutDown
_TLShutDown
jsl GSOS
dw $2029
adrl proQUIT
brk $bd
*-----------------------------------
* DES DONNES 16-BITS
*-----------------------------------
myINDEX ds 2
*-----------------------------------
2023-12-31 10:56:15 +01:00
palette320 dw $0000,$0777,$0841,$072C,$000F,$0080,$0F70,$0D00
dw $0FA9,$0FF0,$00E0,$04DF,$0DAF,$078F,$0CCC,$0FFF
palette640 dw $0000,$000F,$0FF0,$0FFF,$0000,$0D00,$00E0,$0FFF
dw $0000,$000F,$0FF0,$0FFF,$0000,$0D00,$00E0,$0FFF
2023-12-31 05:18:24 +01:00
blackPATTERN ds 32,$00
ds 32,$11
ds 32,$22
ds 32,$33
ds 32,$44
ds 32,$55
ds 32,$66
ds 32,$77
ds 32,$88
ds 32,$99
ds 32,$aa
ds 32,$bb
ds 32,$cc
ds 32,$dd
ds 32,$ee
2023-12-30 23:03:33 +01:00
whitePATTERN ds 32,$ff
*----------------------------------- New Tool table
ssREC ds 4
2023-12-31 21:27:37 +01:00
toolTBL dw $0000 ; flags
dw $C000 ; videoMode (shadowing + fast port)
dw $0000 ; resFileID
ADRL $00000000 ; dPageHandle
2023-12-31 10:56:15 +01:00
dw $0010
dw $0003 ; Miscellaneous Tool
2023-12-30 23:03:33 +01:00
dw $0300
2023-12-31 10:56:15 +01:00
dw $0004 ; QuickDraw II
2023-12-30 23:03:33 +01:00
dw $0301
2023-12-31 10:56:15 +01:00
dw $0005 ; Desk Manager
2023-12-30 23:03:33 +01:00
dw $0302
2023-12-31 10:56:15 +01:00
dw $0006 ; Event Manager
2023-12-30 23:03:33 +01:00
dw $0300
2023-12-31 10:56:15 +01:00
dw $000B ; Integer Math Tool Set
2023-12-30 23:03:33 +01:00
dw $0200
2023-12-31 10:56:15 +01:00
dw $000E ; Window Manager
2023-12-30 23:03:33 +01:00
dw $0301
2023-12-31 10:56:15 +01:00
dw $000F ; Menu Manager
2023-12-30 23:03:33 +01:00
dw $0301
2023-12-31 10:56:15 +01:00
dw $0010 ; Control Manager
2023-12-30 23:03:33 +01:00
dw $0301
2023-12-31 10:56:15 +01:00
dw $0012 ; QuickDraw II Auxiliary
2023-12-30 23:03:33 +01:00
dw $0301
2023-12-31 10:56:15 +01:00
dw $0014 ; LineEdit Tool Set
2023-12-30 23:03:33 +01:00
dw $0301
2023-12-31 10:56:15 +01:00
dw $0015 ; Dialog Manager
2023-12-30 23:03:33 +01:00
dw $0301
2023-12-31 10:56:15 +01:00
dw $0016 ; Scrap Manager
2023-12-30 23:03:33 +01:00
dw $0300
2023-12-31 10:56:15 +01:00
dw $0017 ; Standard File Tool Set
2023-12-30 23:03:33 +01:00
dw $0301
2023-12-31 10:56:15 +01:00
dw $001B ; Font Manager
2023-12-30 23:03:33 +01:00
dw $0301
2023-12-31 10:56:15 +01:00
dw $001C ; List Manager
2023-12-30 23:03:33 +01:00
dw $0301
2023-12-31 10:56:15 +01:00
dw $001E ; Resource Manager
2023-12-30 23:03:33 +01:00
dw $0100
*-----------------------------------
proQUIT dw 2 ; pcount
ds 4 ; pathname
ds 2 ; flags
*-----------------------------------
2023-12-31 21:27:37 +01:00
appID ds 2
2023-12-30 23:03:33 +01:00
myID ds 2
myDP ds 2
mainPORT ds 4
*-----------------------------------
* CODE BASIC EN ASM :-)
*-----------------------------------
2023-12-31 21:27:37 +01:00
put leretour.s
2023-12-30 23:03:33 +01:00
put engine.s
2023-12-31 21:27:37 +01:00
put fr.s
2023-12-30 23:03:33 +01:00
put ../common/images.s
*--- It's the end