-
Notifications
You must be signed in to change notification settings - Fork 1
/
iolibv3exotest.asm
85 lines (78 loc) · 1.18 KB
/
iolibv3exotest.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#import "plus4_basic_header.inc"
#import "plus4_io_map.inc"
#import "ted.inc"
#import "plus4_kernal_table.inc"
.encoding "petscii_mixed"
jsr primm
.text "IOLibV3 Exomizer test by Siz"
.byte 13
.text "(c) 2016.04.02"
.byte 14, 13, 0
jsr iolib.detect
lda iolib.drivedetect.io_drivetyp
bne !+
rts
!: jsr iolib.init
jsr primm
.byte 13
.text "Testing loader: "
.byte 0
sei
lda #<irq
ldx #>irq
sta $fffe
stx $ffff
lda #%00000010
sta ted.irqmask
lda #220
sta ted.rasterirqline
sta ted.ramen
cli
ldx #'e'
ldy #'x'
jsr iolib.decrunch
// php
// ldx #0
// ldy #0
// jsr iolib.load
// plp
sta ted.romen
bcs error
jsr primm
.text "done"
.byte 13, 0
lda #$3b
sta ted.ctrl1
lda #$18
sta ted.ctrl2
lda #$18
sta ted.bitmapctrl
lda #$58
sta ted.screenaddr
lda $5bfe
sta ted.background
lda $5bff
sta ted.color1
lda #0
sta $ff19
jmp *
error: jsr primm
.text "load error"
.byte 13, 0
rts
irq: inc ted.border
pha
lda ted.irqsource
sta ted.irqsource
pla
dec ted.border
rti
.namespace iolib {
#define prtstatus
#define need_video_detect
#define need_memory_detect
#define need_sound_detect
#define need_loader
#define need_exodecrunch
}
#import "iolib.inc"