home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Amiga Demo Collection
/
TheAmigaDemoCollectionCDCUE.img
/
S
/
showtime05
/
Bonus
/
BScreen.lha
/
Blitterscreen
/
startup2.i
< prev
Wrap
Text File
|
1992-12-20
|
7KB
|
404 lines
WaitDisk equ 30
MAINCODE:
movem.l d0-d7/a0-a6,-(SP)
move.l 4.w,a6
LEA DosName(PC),A1
JSR -$198(A6)
MOVE.L D0,DosBase
BEQ.w EXIT3
LEA GfxName(PC),A1
JSR -$198(A6)
MOVE.L d0,GfxBase
BEQ.w EXIT2
LEA IntuiName(PC),A1
JSR -$198(A6)
MOVE.L D0,IntuiBase
BEQ.w EXIT1
MOVE.L d0,A0
CMP.W #39,$14(A0)
BLT.s VecchiaIntui
BSR.w ResettaSpritesV39
VecchiaIntui:
MOVE.L IntuiBase(PC),A6
move.l $3c(a6),a0
LEA $2c(A0),A0
move.l a0,VPfirstScreen
move.l 4(a0),a0
MOVEQ #0,D0
MOVE.L GfxBase(PC),A6
JSR -$246(A6)
move.w d0,SavedColor0
move.l VPfirstScreen(PC),a0
LEA colore0(PC),A1
MOVEQ #1,D0
JSR -$C0(A6)
MOVE.L $22(A6),WBVIEW
SUB.L A1,A1
JSR -$DE(A6)
SUB.L A1,A1
JSR -$DE(A6)
JSR -$10E(A6)
JSR -$10E(A6)
JSR -$10E(A6)
JSR -$10E(A6)
bsr.w InputOFF
MOVE.L 4.w,A6
SUB.L A1,A1
JSR -$126(A6)
MOVE.L D0,A1
move.l d0,ThisTask
MOVE.L $B8(A1),pr_Win
MOVE.L #-1,$B8(A1)
MOVEQ #-1,D0
JSR -$12C(A6)
LEA $DFF006,A5
lea $bfe001,a4
moveq #6,d2
MOVE.w #$dd,D0
MOVE.w #WaitDisk,D1
WaitaLoop:
btst.b d2,(a4)
beq.s SkippaWait
CMP.B (A5),D0
BNE.S WaitaLoop
Wait2: CMP.B (A5),D0
Beq.s Wait2
dbra D1,WaitaLoop
SkippaWait:
btst.b d2,(a4)
beq.s SkippaWait
MOVE.L 4.w,A6
move.l ThisTask(PC),a1
MOVEQ #127,D0
JSR -$12C(A6)
MOVE.L GfxBase(PC),A6
jsr -$1c8(a6)
jsr -$E4(A6)
JSR -$E4(A6)
move.l 4.w,a6
JSR -$84(a6)
JSR -$78(A6)
bsr.w HEAVYINIT
move.l 4.w,a6
JSR -$7E(A6)
JSR -$8A(A6)
move.l ThisTask(PC),a1
MOVE.L pr_Win(PC),$B8(A1)
MOVEQ #0,D0
JSR -$12C(A6)
MOVE.L GfxBase(PC),A6
jsr -$E4(A6)
JSR -$E4(A6)
jsr -$1ce(a6)
MOVE.L IntuiBase(PC),A0
CMP.W #39,$14(A0)
BLT.s Vecchissima
BSR.w RimettiSprites
Vecchissima:
MOVE.L GfxBase(PC),A6
move.l VPfirstScreen(PC),a0
LEA SavedColor0(PC),A1
MOVEQ #1,D0
MOVE.L GfxBase(PC),A6
JSR -$C0(a6)
MOVE.L WBVIEW(PC),A1
JSR -$DE(A6)
JSR -$10E(A6)
JSR -$10E(A6)
MOVE.W #$11,$DFF10C
MOVE.L $26(a6),$dff080
MOVE.L $32(a6),$dff084
bsr.w InputON
MOVE.L IntuiBase(PC),A6
JSR -$186(A6)
MOVE.L A6,A1
move.l 4.w,a6
jsr -$19E(a6)
EXIT1: MOVE.L GfxBase(PC),A1
jsr -$19E(a6)
EXIT2: MOVE.L DosBase(PC),A1
jsr -$19E(a6)
EXIT3: movem.l (SP)+,d0-d7/a0-a6
RTS
pr_Win: dc.l 0
colore0:
dc.w $012
SavedColor0:
dc.w 0
VPfirstScreen:
dc.l 0
ThisTask:
dc.l 0
ResettaSpritesV39:
MOVE.L IntuiBase(PC),A6
LEA Workbench(PC),A0
JSR -$1FE(A6)
MOVE.L D0,SchermoWBLocckato
BEQ.s ErroreSchermo
MOVE.L D0,A0
MOVE.L $30(A0),A0
LEA GETVidCtrlTags(PC),A1
MOVE.L GfxBase(PC),A6
JSR -$2C4(A6)
MOVE.L IntuiBase(PC),A6
move.l $3c(a6),a0
MOVE.L $30(A0),A0
LEA GETVidCtrlTags2(PC),A1
MOVE.L GfxBase(PC),A6
JSR -$2C4(A6)
MOVE.L SchermoWBLocckato(PC),A0
MOVE.L $30(A0),A0
LEA SETVidCtrlTags(PC),A1
MOVE.L GfxBase(PC),A6
JSR -$2C4(A6)
move.L IntuiBase(PC),A6
move.l $3c(a6),a0
move.L $30(A0),A0
LEA SETVidCtrlTags(PC),A1
move.L GfxBase(PC),A6
JSR -$2C4(A6)
move.L SchermoWBLocckato(PC),A0
move.L IntuiBase(PC),A6
JSR -$17A(A6)
move.l $3c(a6),a0
JSR -$17A(A6)
JSR -$186(A6)
ErroreSchermo:
RTS
RimettiSprites:
MOVE.L SchermoWBLocckato(PC),D0
BEQ.S NonAvevaFunzionato
MOVE.L D0,A0
MOVE.L OldRisoluzione(PC),OldRisoluzione2
LEA SETOldVidCtrlTags(PC),A1
MOVE.L $30(A0),A0
MOVE.L GfxBase(PC),A6
JSR -$2C4(A6)
MOVE.L IntuiBase(PC),A6
move.l $3c(a6),a0
MOVE.L OldRisoluzioneP(PC),OldRisoluzione2
LEA SETOldVidCtrlTags(PC),A1
MOVE.L $30(A0),A0
MOVE.L GfxBase(PC),A6
JSR -$2C4(A6)
move.L IntuiBase(PC),A6
move.L SchermoWBLocckato(PC),A0
JSR -$17A(A6)
move.l $3c(a6),a0
JSR -$17A(A6)
MOVE.L SchermoWBLocckato(PC),A1
SUB.L A0,A0
move.L IntuiBase(PC),A6
JSR -$204(A6)
NonAvevaFunzionato:
RTS
SchermoWBLocckato:
dc.l 0
GETVidCtrlTags:
dc.l $80000032
OldRisoluzione:
dc.l 0
dc.l 0,0,0
GETVidCtrlTags2:
dc.l $80000032
OldRisoluzioneP:
dc.l 0
dc.l 0,0,0
SETVidCtrlTags:
dc.l $80000031
dc.l 1
dc.l 0,0,0
SETOldVidCtrlTags:
dc.l $80000031
OldRisoluzione2:
dc.l 0
dc.l 0,0,0
Workbench:
dc.b 'Workbench',0
InputOFF:
LEA INPUTMPORT(PC),A1
BSR.w CREATEPORT
CMP.L #-1,D0
BEQ.w INTUIERROR
MOVE.L #INPUTMPORT,inputioST
LEA INPUTDEVICE(PC),A0
MOVEQ #0,D0
LEA INPUTIO(PC),A1
MOVEQ #0,D1
MOVE.L 4.w,A6
JSR -$1BC(A6)
TST.L D0
BNE.S INTUITIONON1
MOVE.B #51,LN_PRI
CLR.L IS_DATA
MOVE.L #READINPUT,IS_CODE
MOVE.W #9,IO_COMMAND
MOVE.L #INPUTHANDLER,IO_DATA
LEA INPUTIO(PC),A1
MOVE.L 4.w,A6
JSR -$1C8(A6)
RTS
READINPUT:
MOVEQ #0,D0
RTS
InputON:
TST.B InputErrFlag
BNE.S EsciInputON
MOVE.W #10,IO_COMMAND
MOVE.L #INPUTHANDLER,IO_DATA
LEA INPUTIO(PC),A1
MOVE.L 4.w,A6
JSR -$1C8(A6)
LEA INPUTIO(PC),A1
MOVE.L 4.w,A6
JSR -$1C2(A6)
INTUITIONON1:
LEA INPUTMPORT(PC),A1
BSR.s FREEUPPORT
INTUIERROR:
MOVE.B #$FF,InputErrFlag
EsciInputON:
RTS
InputErrFlag:
dc.w 0
CREATEPORT:
MOVE.L A1,-(SP)
MOVEQ #-1,D0
MOVE.L 4.w,A6
JSR -$14A(A6)
MOVEQ #-1,D1
CMP.L D1,D0
BEQ.S FREEUPPORT1
MOVE.L (SP),A0
MOVE.B #0,9(A0)
MOVE.B #4,8(A0)
MOVE.B #0,14(A0)
MOVE.B D0,15(A0)
SUBA.L A1,A1
MOVE.L 4.w,A6
JSR -$126(A6)
MOVE.L (SP),A1
MOVE.L D0,$10(A1)
LEA $14(A1),A0
MOVE.L A0,(A0)
ADDQ.L #4,(A0)
CLR.L 4(A0)
MOVE.L A0,8(A0)
CREATEPORTEXIT:
MOVE.L (SP)+,D0
RTS
FREEUPPORT:
MOVE.L A1,-(SP)
MOVE.B 15(A1),D0
MOVE.L 4.w,A6
JSR -$150(A6)
FREEUPPORT1:
MOVE.L (SP)+,A1
RTS
INPUTMPORT: ds.b 34
INPUTIO: ds.b 14
inputioST: ds.b 14
IO_COMMAND: ds.b 12
IO_DATA: ds.b 8
INPUTHANDLER: ds.b 9
LN_PRI: ds.b 5
IS_DATA: dc.l 0
IS_CODE: dc.l 0
INPUTDEVICE: dc.b 'input.device',0,0
HEAVYINIT:
LEA $DFF000,A5
MOVE.W $2(A5),OLDDMA
MOVE.W $1C(A5),OLDINTENA
MOVE.W $10(A5),OLDADKCON
MOVE.W $1E(A5),OLDINTREQ
MOVE.L #$80008000,d0
OR.L d0,OLDDMA
OR.L d0,OLDADKCON
MOVE.L #$7FFF7FFF,$9A(a5)
MOVE.L #0,$144(A5)
MOVE.W #$7FFF,$96(a5)
MOVE.L #0,$144(A5)
move.l 4.w,a6
btst.b #0,$129(a6)
beq.s IntOK
lea SuperCode(PC),a5
jsr -$1e(a6)
bra.s IntOK
SuperCode:
dc.l $4e7a9801
move.l a1,BaseVBR
RTE
BaseVBR: dc.l 0
IntOK: move.l BaseVBR(PC),a0
move.l $64(a0),OldInt64
move.l $68(a0),OldInt68
move.l $6c(a0),OldInt6c
move.l $70(a0),OldInt70
move.l $74(a0),OldInt74
move.l $78(a0),OldInt78
bsr.w ClearMyCache
lea $dff000,a5
bsr.w START ;<--- Qui salta al programma vero e proprio
bsr.w ClearMyCache
LEA $dff000,a5
MOVE.W #$8240,$96(a5)
BTST.b #6,2(a5)
Wblittez:
BTST.b #6,2(a5)
BNE.S Wblittez
MOVE.W #$7FFF,$96(A5)
MOVE.L #$7FFF7FFF,$9A(A5)
MOVE.W #$7fff,$9E(a5)
move.l BaseVBR(PC),a0
move.l OldInt64(PC),$64(a0)
move.l OldInt68(PC),$68(a0)
move.l OldInt6c(PC),$6c(a0)
move.l OldInt70(PC),$70(a0)
move.l OldInt74(PC),$74(a0)
move.l OldInt78(PC),$78(a0)
MOVE.W OLDADKCON(PC),$9E(A5)
MOVE.W OLDDMA(PC),$96(A5)
MOVE.W OLDINTENA(PC),$9A(A5)
MOVE.W OLDINTREQ(PC),$9C(A5)
RTS
WBVIEW: DC.L 0
GfxName: dc.b 'graphics.library',0,0
IntuiName: dc.b 'intuition.library',0
DosName: dc.b "dos.library",0
GfxBase: dc.l 0
IntuiBase: dc.l 0
DosBase: dc.l 0
OLDDMA: dc.w 0
OLDINTENA: dc.w 0
OLDADKCON: DC.W 0
OLDINTREQ: DC.W 0
OldInt64: dc.l 0
OldInt68: dc.l 0
OldInt6c: dc.l 0
OldInt70: dc.l 0
OldInt74: dc.l 0
OldInt78: dc.l 0
ClearMyCache:
movem.l d0-d7/a0-a6,-(SP)
move.l 4.w,a6
MOVE.W $14(A6),D0
CMP.W #37,D0
blo.s nocaches
jsr -$27c(a6)
nocaches:
movem.l (sp)+,d0-d7/a0-a6
rts