un nouveau moteur

This commit is contained in:
Antoine Vignau 2023-12-30 23:03:33 +01:00
parent f6bb84d690
commit b779f10ea5
14 changed files with 34623 additions and 2067 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
IIgs=Type(B3),AuxType(0000),VersionCreate(70),MinVersion(BE),Access(E3),FolderInfo1(000000000000000000000000000000000000),FolderInfo2(000000000000000000000000000000000000)

428
leretour/apple2/fr/engine.s Normal file
View File

@ -0,0 +1,428 @@
*
* Le retour du Dr Genius
*
* (c) 1983, Loriciels
* (c) 2023, Brutal Deluxe Software (Apple II)
*
mx %00
*-----------------------------------
* AFFICHE UNE IMAGE
*-----------------------------------
showIMAGE asl
tax
lda tblIMAGES,x
bne L92A5
rts
L92A5 sta dpFROM
L92A6 ldy #0
lda (dpFROM),y
and #$ff
bne L92A7
rts
L92A7 CMP #'A' ; A
BNE L92B1
JMP L9319
L92B1 CMP #'B' ; B
BNE L92B8
JMP L933E
L92B8 CMP #'C' ; C
BNE L92BF
JMP L9368
L92BF CMP #'D' ; D
BNE L92C6
JMP L9398
L92C6 CMP #'E' ; E
BNE L92CD
JMP L93C8
L92CD CMP #'F' ; F
BNE L92D4
JMP L93FD
L92D4 CMP #'G' ; G
BNE L92DB
JMP L9402
L92DB CMP #'H' ; H
BNE L92E2
JMP L9407
L92E2 CMP #'I' ; I
BNE L92E9
JMP L940C
L92E9 CMP #'J' ; J
BNE L92F0
JMP L9411
L92F0 CMP #'K' ; K
BNE L92F7
JMP L9426
L92F7 CMP #'L' ; L
BNE L92FE
JMP L943B
L92FE CMP #'M' ; M
BNE L9305
JMP L9462
L9305 CMP #'N' ; N
BNE L930C
JMP L94BC
L930C CMP #'O' ; O
BNE L9313
JMP L94D8
L9313 brk $bd
*--- A - CURSET
L9319 iny
lda (dpFROM),y ; X
and #$ff
pha
sta curX
iny
lda (dpFROM),y ; Y
and #$ff
pha
sta curY
_MoveTo
jmp skip2
*--- B - DRAW X,Y
L933E lda #$01
L9340 sta theFB
iny
lda (dpFROM),y ; X
and #$ff
sta theX
iny
lda (dpFROM),y ; Y
and #$ff
sta theY
jsr DRAW
jmp skip2
*--- C - DRAW ^X,Y
L9368 lda #$01
L936A sta theFB
iny
lda (dpFROM),y ; X
and #$ff
eor #-1
inc
and #$ff
sta theX
iny
lda (dpFROM),y ; Y
and #$ff
sta theY
jsr DRAW
jmp skip2
*--- D - DRAW X,^Y
L9398 lda #$01
L939A sta theFB
iny
lda (dpFROM),y ; X
and #$ff
sta theX
iny
lda (dpFROM),y ; Y
and #$ff
eor #-1
inc
and #$ff
sta theY
jsr DRAW
jmp skip2
*--- E - DRAW ^X,^Y
L93C8 lda #$01
L93CA sta theFB
iny
lda (dpFROM),y ; X
and #$ff
eor #-1
inc
and #$ff
sta theX
iny
lda (dpFROM),y ; Y
and #$ff
eor #-1
inc
and #$ff
sta theY
jsr DRAW
jmp skip2
*--- F - DRAW X,Y,3 = CURMOV
L93FD lda #$03
jmp L9340
*--- G - DRAW ^X,Y,3 = CURMOV
L9402 lda #$03
jmp L936A
*--- H - DRAW X,^Y,3 = CURMOV
L9407 lda #$03
jmp L939A
*--- I - DRAW ^X,^Y,3 = CURMOV
L940C lda #$03
jmp L93CA
*--- J - INK
L9411 iny
lda (dpFROM),y ; X
and #$ff
sta theINK
jsr INK
jmp skip1
*--- K - PAPER
L9426 iny
lda (dpFROM),y ; X
and #$ff
sta thePAPER
jsr PAPER
jmp skip1
*--- L - FILL
L943B iny
lda (dpFROM),y ; X
and #$ff
sta fillX
iny
lda (dpFROM),y ; Y
and #$ff
sta fillY
iny
lda (dpFROM),y ; fill color
and #$ff
sta fillCOLOR
jsr FILL
jmp skip3
*--- M - CHAR_ALT
L9462 iny
lda (dpFROM),y ; X
and #$ff
pha
iny
lda (dpFROM),y ; Y
and #$ff
pha
_MoveTo
ldy #3
]lp sty dpY
lda (dpFROM),y
and #$ff
beq L94B9
pha
_DrawChar
ldy dpY
iny
bne ]lp
L94B9 tya
clc
adc dpFROM
sta dpFROM
jmp skip0
*--- N - CIRCLE
L94BC iny
lda (dpFROM),y ; radius
and #$ff
sta theRADIUS
jsr CIRCLE
jmp skip1
*--- O - OUT
L94D8 iny
lda (dpFROM),y
and #$ff
rts
*--- Next one, please...
skip3 inc dpFROM
skip2 inc dpFROM
skip1 inc dpFROM
skip0 inc dpFROM
ldal $c034
inc
stal $c034
jmp L92A6
*-----------------------------------
* IIGS PRIMITIVES
*-----------------------------------
* FG info
* 0: points are plotted in the background color
* 1: points are plotted in the foreground color
* 2: points are inverted (NOT)
* 3: points are not drawn but cursor is updated
* Color info
* 0: black
* 1: red
* 2: green
* 3: yellow
* 4: blue
* 5: magenta
* 6: cyan
* 7: white
*-----------------------------------
DRAW lda theFB
cmp #3 ; only move
beq DRAW9
tax
lda o2gsFB,x
and #$ff
pha
_SetPenMode
PushWord theX ; On trace une ligne
PushWord theY
_LineTo
PushLong #curY
_GetPen
rts
DRAW9 PushWord theX ; On dŽplace le curseur seulement
PushWord theY
_MoveTo
PushLong #curY
_GetPen
rts
*-----------------------------------
INK ldx theINK
lda o2gsCOLOR,x
and #$ff
sta iigsINK
rts
*-----------------------------------
PAPER ldx thePAPER
lda o2gsCOLOR,x
and #$ff
sta iigsPAPER
rts
*-----------------------------------
FILL rts ; NADA FOR NOW (FillRgn ou SeedFill)
*-----------------------------------
CIRCLE lda curX
sec
sbc theRADIUS
bpl CIRCLE1
lda #0
CIRCLE1 sta circleRECT+2
lda curX
clc
adc theRADIUS
cmp #maxX
bcc CIRCLE2
lda #maxX-1
CIRCLE2 sta circleRECT+6
lda curY
sec
sbc theRADIUS
bpl CIRCLE3
lda #0
CIRCLE3 sta circleRECT
lda curY
clc
adc theRADIUS
cmp #maxY
bcc CIRCLE4
lda #maxY-1
CIRCLE4 sta circleRECT+4
PushLong #circleRECT
_FrameOval
rts
*-----------------------------------
CHAR_ALT rts
*-----------------------------------
* DONNEES
*-----------------------------------
o2gsCOLOR dfb 0,7,10,9,4,12,11,15
o2gsFB dfb 0,0,2,0
ICI = *
curY ds 2 ; cursor position
curX ds 2
iigsINK ds 2 ; translated IIgs data
iigsPAPER ds 2
iigsFB ds 2
theINK ds 2 ; original Oric data
thePAPER ds 2
theFB ds 2
theX ds 2
theY ds 2
theX2 ds 2 ; global dest X-coord (curX + theX)
theY2 ds 2 ; global dest Y-coord (curY + theY)
fillX ds 2
fillY ds 2
fillCOLOR ds 2
theCHAR ds 2
theRADIUS ds 2
nbTOURS ds 5
circleRECT ds 2 ; Y0
ds 2 ; X0
ds 2 ; Y1
ds 2 ; X1

BIN
leretour/apple2/fr/iigs Normal file

Binary file not shown.

330
leretour/apple2/fr/iigs.s Normal file
View File

@ -0,0 +1,330 @@
*
* 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
*-----------------------------------
use 4/Locator.Macs
use 4/Mem.Macs
use 4/Menu.Macs
use 4/Misc.Macs
use 4/QD.Macs
use 4/Util.Macs
use 4/Window.Macs
GSOS = $e100a8
dpY = $70
dpFROM = dpY+2
dpTO = dpFROM+2
refIsPointer = $0
refIsHandle = $1
refIsResource = $2
TRUE = 255
FALSE = 0
mode320 = $00
mode640 = $80
maxX = 320
maxY = 200
*-----------------------------------
* SOFTSWITCHES AND FRIENDS
*-----------------------------------
WNDTOP = $22 ; top of text window
WNDBTM = $23 ; bottom+1 of text window
CH = $24 ; cursor horizontal position
CV = $25 ; cursor vertical position
LINNUM = $50 ; result from GETADR
X0L = $e0 ; X-coord
X0H = $e1
Y0 = $e2 ; Y-coord
nbOaP = 10 ; on peut porter dix objets
chrLA = $88
chrRA = $95
chrDEL = $ff
chrRET = $8d
chrSPC = $a0
TEXTBUFFER = $200
maxLEN = 20
chrOUI = "O"
chrNON = "N"
idxCASSE = 200
idxTIMER = 201
PRODOS = $bf00
KBD = $c000
CLR80VID = $c00c
KBDSTROBE = $c010
VBL = $c019
MONOCOLOR = $c021
VERTCNT = $c02e
SPKR = $c030
CYAREG = $C036
TXTCLR = $c050
TXTSET = $c051
MIXCLR = $c052
MIXSET = $c053
TXTPAGE1 = $c054
TXTPAGE2 = $c055
LORES = $c056
HIRES = $c057
*--- The firmware routines
HGR = $F3E2 ; HGR
HPLOT = $F457 ; HPLOT
HILIN = $F53A ; HPLOT TO
HCOLOR = $F6E9 ; HCOLOR= (call+3)
INIT = $FB2F
TABV = $FB5B
HOME = $FC58
WAIT = $FCA8
RDKEY = $FD0C
*GETLN1 = $FD6F ; using mine now
COUT = $FDED
IDROUTINE = $FE1F
SETNORM = $FE84
SETKBD = $FE89
*-----------------------------------
* MACROS
*-----------------------------------
@draw mac
lda #]1
jsr showPIC
eom
@explode mac
jsr EXPLODE
eom
@play mac
ldx #>]1
ldy #<]1
jsr playMUSIC
eom
@print mac
ldx #>]1
ldy #<]1
jsr printCSTRING
eom
@wait mac
ldx #>]1
ldy #<]1
jsr waitMS
eom
*-----------------------------------
* DU 16-BITS
*-----------------------------------
phk
plb
clc
xce
rep #$30
tdc
sta myDP
lda #ICI
stal $300
lda #^ICI
stal $302
_TLStartUp
pha
_MMStartUp
pla
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
PushLong #0
_GetPort
PullLong mainPORT
PushLong mainPORT
_SetPort
PushWord #0
_SetBackColor
PushWord #15
_SetForeColor
PushLong #curPATTERN
_GetPenPat
PushLong #whitePATTERN ; white pattern
_SetPenPat
PushWord #0
_ClearScreen
*-----------------------------------
* AFFICHE UNE IMAGE
*-----------------------------------
stz myINDEX
loop lda myINDEX
jsr showIMAGE
]lp ldal $bfff
bpl ]lp
stal $c00f
PushWord #0
_ClearScreen
inc myINDEX
lda myINDEX
cmp #58
bcc loop
*-----------------------------------
* AU REVOIR LE IIGS
*-----------------------------------
_GrafOff
PushWord #refIsPointer
PushLong ssREC
_ShutDownTools
PushWord myID
_DisposeAll
PushWord myID
_MMShutDown
_TLShutDown
jsl GSOS
dw $2029
adrl proQUIT
brk $bd
*-----------------------------------
* DES DONNES 16-BITS
*-----------------------------------
myINDEX ds 2
*-----------------------------------
curPATTERN ds 32
whitePATTERN ds 32,$ff
*----------------------------------- New Tool table
ssREC ds 4
toolTBL dw $0000
dw $0000
dw $0000
ADRL $00000000
dw $0011
dw $0003
dw $0300
dw $0004
dw $0301
dw $0005
dw $0302
dw $0006
dw $0300
dw $0008
dw $0301
dw $000B
dw $0200
dw $000E
dw $0301
dw $000F
dw $0301
dw $0010
dw $0301
dw $0012
dw $0301
dw $0014
dw $0301
dw $0015
dw $0301
dw $0016
dw $0300
dw $0017
dw $0301
dw $001B
dw $0301
dw $001C
dw $0301
dw $001E
dw $0100
*-----------------------------------
proQUIT dw 2 ; pcount
ds 4 ; pathname
ds 2 ; flags
*-----------------------------------
myID ds 2
myDP ds 2
mainPORT ds 4
*-----------------------------------
* CODE BASIC EN ASM :-)
*-----------------------------------
put engine.s
put ../common/images.s
*--- It's the end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,18 @@
*
* Le retour du Dr Genius
*
* (c) 1983, Loriciels
* (c) 2023, Brutal Deluxe Software (Apple II)
*
* Expansion linker file
DSK IIgs
TYP $B3
* Assemble files
ASM iigs.s
KND $0000
SNA IIgs

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

Binary file not shown.