2013-06-29 18:57:48 +02:00
|
|
|
***********************
|
|
|
|
* Apple II BMP Viewer *
|
|
|
|
* Arnaud Coqui}re *
|
|
|
|
* Mario Patino *
|
|
|
|
***********************
|
2013-06-29 18:15:04 +02:00
|
|
|
|
|
|
|
LST OFF
|
|
|
|
ORG $1000
|
|
|
|
|
|
|
|
MEM EQU $06
|
|
|
|
|
|
|
|
COMPTS EQU $18
|
|
|
|
COMPTD EQU $19
|
|
|
|
SRCY EQU $1A
|
|
|
|
DESTY EQU $1B
|
|
|
|
DESTX EQU $1C
|
|
|
|
BUFFBMP EQU $1D
|
|
|
|
BUFFDST EQU $1E
|
2013-06-29 19:02:47 +02:00
|
|
|
DHGR EQU $1F
|
2013-06-29 18:15:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
SOURCE EQU $4000
|
|
|
|
|
|
|
|
JMP DEBUT
|
|
|
|
|
|
|
|
CALC TXA ; CALCUL ADRESSE LIGNE (X) HIRES
|
|
|
|
ASL
|
2013-07-03 19:02:39 +02:00
|
|
|
TAY
|
|
|
|
AND #$F0
|
|
|
|
BPL C1
|
|
|
|
ORA #$05
|
|
|
|
C1 BCC C2
|
|
|
|
ORA #$0A
|
|
|
|
C2 ASL
|
2013-06-29 18:15:04 +02:00
|
|
|
ASL
|
2013-07-03 19:02:39 +02:00
|
|
|
STA MEM
|
|
|
|
TYA
|
|
|
|
AND #$0E
|
|
|
|
ADC #$10
|
|
|
|
ASL MEM
|
|
|
|
ROL
|
2013-06-29 18:15:04 +02:00
|
|
|
STA MEM+1
|
|
|
|
RTS
|
|
|
|
|
|
|
|
READBMP LDY SRCY
|
|
|
|
OFFSET LDA SOURCE,Y
|
|
|
|
STA BUFFBMP
|
|
|
|
INY
|
|
|
|
BNE S1
|
|
|
|
INC OFFSET+2
|
|
|
|
S1 STY SRCY
|
|
|
|
LDA #07
|
|
|
|
STA COMPTS
|
|
|
|
RTS
|
|
|
|
|
2013-07-03 19:02:39 +02:00
|
|
|
SAVEDST LDX DESTX
|
2013-06-29 18:15:04 +02:00
|
|
|
JSR CALC
|
2013-07-03 19:02:39 +02:00
|
|
|
LDY DESTY
|
2013-06-29 18:15:04 +02:00
|
|
|
LDA BUFFDST
|
|
|
|
LSR ; DERNIER DECALLAGE POUR 7EMEBIT
|
|
|
|
STA (MEM),Y
|
2013-06-29 19:02:47 +02:00
|
|
|
LDA DHGR
|
|
|
|
BEQ HGR
|
2013-06-29 18:57:48 +02:00
|
|
|
BIT $C01C
|
|
|
|
BPL PAGE2
|
|
|
|
BIT $C054
|
|
|
|
JMP S2
|
|
|
|
PAGE2 BIT $C055
|
2013-06-29 19:02:47 +02:00
|
|
|
HGR INY
|
2013-06-29 18:15:04 +02:00
|
|
|
CPY #40
|
|
|
|
BNE S2
|
|
|
|
DEX
|
|
|
|
CPX #$FF
|
|
|
|
BEQ FIN
|
|
|
|
STX DESTX
|
2013-06-29 19:02:47 +02:00
|
|
|
JSR READBMP ; SAUTE DES OCTETS DANS BMP
|
|
|
|
LDA DHGR
|
|
|
|
BEQ FILLD
|
2013-06-29 18:57:48 +02:00
|
|
|
JSR READBMP
|
2013-06-29 19:02:47 +02:00
|
|
|
FILLD LDY #00
|
2013-06-29 18:15:04 +02:00
|
|
|
S2 STY DESTY
|
|
|
|
LDA #06
|
|
|
|
STA COMPTD
|
|
|
|
RTS
|
2013-06-29 19:02:47 +02:00
|
|
|
FIN JMP END
|
2013-06-29 18:15:04 +02:00
|
|
|
|
|
|
|
|
2013-06-29 19:02:47 +02:00
|
|
|
DEBUT BIT $C050 ; GRAPHIQUES
|
|
|
|
BIT $C052 ; PLEIN G.
|
|
|
|
BIT $C057 ; HAUTE RESOLUTION
|
|
|
|
BIT $C054 ; PAGE1
|
2013-06-29 18:15:04 +02:00
|
|
|
|
2013-06-29 19:02:47 +02:00
|
|
|
LDA #00
|
|
|
|
STA DHGR
|
2013-07-02 19:02:13 +02:00
|
|
|
LDA SOURCE+$12
|
2013-06-29 19:02:47 +02:00
|
|
|
CMP #$18
|
2013-06-29 19:06:10 +02:00
|
|
|
BEQ GSTEST
|
|
|
|
|
|
|
|
STA $C00C
|
|
|
|
BIT $C05E ; DOUBLE HR
|
|
|
|
STA $C05F
|
|
|
|
STA $C05E
|
|
|
|
STA $C05F
|
|
|
|
STA $C00D
|
|
|
|
STA $C05E
|
|
|
|
CMP #$30
|
|
|
|
BEQ MONO
|
|
|
|
STA $C05F
|
|
|
|
STA $C05E
|
|
|
|
STA $C05F
|
|
|
|
STA $C05E
|
|
|
|
MONO STA $C001 ; SET80STORE
|
2013-06-29 19:02:47 +02:00
|
|
|
BIT $C055 ; PAGE2
|
|
|
|
LDA #01
|
|
|
|
STA DHGR
|
|
|
|
|
|
|
|
GSTEST SEC
|
2013-06-29 18:15:04 +02:00
|
|
|
JSR $FE1F ; TEST GS (THX A.V.)
|
|
|
|
BCS GO1
|
|
|
|
|
|
|
|
LDA $C036
|
|
|
|
AND #$7F
|
|
|
|
STA $C036 ; VITESSE LENTE
|
|
|
|
LDA $C034 ;
|
|
|
|
AND #$F0
|
|
|
|
STA $C034 ; BORDURE NOIRE
|
|
|
|
|
2013-07-02 19:02:13 +02:00
|
|
|
GO1 LDA SOURCE+$0A
|
2013-06-29 18:15:04 +02:00
|
|
|
ADC OFFSET+1
|
|
|
|
STA OFFSET+1
|
|
|
|
|
|
|
|
LDA #00
|
|
|
|
STA BUFFDST
|
|
|
|
STA SRCY
|
|
|
|
STA DESTY
|
|
|
|
LDX #191
|
|
|
|
STX DESTX
|
2013-06-29 18:26:58 +02:00
|
|
|
LDA #06
|
|
|
|
STA COMPTD
|
2013-06-29 18:15:04 +02:00
|
|
|
JSR READBMP
|
|
|
|
|
|
|
|
BP ASL BUFFBMP
|
|
|
|
ROR BUFFDST
|
|
|
|
DEC COMPTS ; 8 DECALLAGES
|
|
|
|
BPL S3
|
|
|
|
JSR READBMP
|
|
|
|
S3 DEC COMPTD ; 7 ROTATIONS
|
|
|
|
BPL S4
|
|
|
|
JSR SAVEDST
|
|
|
|
S4 JMP BP
|
|
|
|
|
2013-06-29 19:02:47 +02:00
|
|
|
END PLA
|
2013-06-29 18:15:04 +02:00
|
|
|
PLA
|
|
|
|
STA $C010
|
|
|
|
BF LDA $C000
|
|
|
|
BPL BF
|
|
|
|
STA $C010
|
2013-07-02 19:02:13 +02:00
|
|
|
STA $C000
|
|
|
|
STA $C00C
|
|
|
|
BIT $C053
|
|
|
|
BIT $C054
|
2013-06-29 18:15:04 +02:00
|
|
|
BIT $C051
|
|
|
|
RTS
|