Skip to content

Commit ce8b628

Browse files
authored
Merge pull request #73 from brad-colbert/disable_basic
v1.3.4: Disables BASIC on systems where this can be an issue.
2 parents e4ae9ca + 5935d99 commit ce8b628

File tree

3 files changed

+50
-4
lines changed

3 files changed

+50
-4
lines changed

src/preinit.s

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
.export pre_init
2+
.include "atari.inc"
3+
; .include "macros.inc"
4+
5+
; https://github.com/markjfisher/fujinet-config-ng/blob/master/src/atari/common/init/pre_init.s
6+
7+
; this segment is loaded during disk load before dlist and main are loaded
8+
; the memory location will be written over by later blocks, which is fine, it's only needed for one time initial setup
9+
.segment "INIT"
10+
.proc pre_init
11+
lda #$c0 ; check if ramtop is already ok
12+
cmp RAMTOP
13+
beq ramok
14+
sta RAMTOP ; set ramtop to end of basic
15+
sta RAMSIZ ; and ramsiz too
16+
17+
lda PORTB
18+
ora #$02 ; disable basic bit
19+
sta PORTB
20+
21+
lda #$01 ; keep it off after reset
22+
sta BASICF
23+
24+
ldx #$02 ; CLOSE "E"
25+
jsr editor
26+
ldx #$00 ; OPEN "E"
27+
editor:
28+
; dispatch based JMP!
29+
lda EDITRV+1, x
30+
pha
31+
lda EDITRV, x
32+
pha
33+
; now ready to JMP on a RTS
34+
ramok:
35+
rts
36+
37+
clear_from:
38+
.endproc

src/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55

66
#define MAJOR_VERSION 1
77
#define MINOR_VERSION 3
8-
#define BUILD_VERSION 3
8+
#define BUILD_VERSION 4
99

1010
#endif // YAIL_VERSION_H

src/yail.atari-xex.cfg

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ SYMBOLS {
1313
}
1414
MEMORY {
1515
ZP: file = "", define = yes, start = $0082, size = $007E;
16+
17+
# Preinitialization 1 - Disable BASIC
18+
PRE: file = %O, define = no, start = $2000, size = $0200; # init code that runs once and then overwritten (by SCREEN data etc)
19+
PRE_NOSAV: file = "", define = no, start = $2200, size = $0100; # work aread for PRE-INIT routines that will be overwritten and not saved to disk
20+
1621
# "system check" load chunk
1722
#SYSCHKCHNK: file = %O, start = $2E00, size = $0300;
1823
# "main program" load chunk
@@ -22,12 +27,15 @@ FILES {
2227
%O: format = atari;
2328
}
2429
FORMATS {
25-
atari: runad = start; #,
30+
atari: runad = start,
31+
initad = PRE: pre_init; #,
2632
#initad = SYSCHKCHNK: __SYSTEM_CHECK__;
2733
}
2834
SEGMENTS {
2935
ZEROPAGE: load = ZP, type = zp;
3036
EXTZP: load = ZP, type = zp, optional = yes;
37+
INIT: load = PRE, type = ro, define = yes; # initialisation routines that will be overwritten
38+
INIT_NS: load = PRE_NOSAV, type = rw, define = yes; # used as temporary bss-like data area for init routines but will be reused
3139
#SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes;
3240
STARTUP: load = MAIN, type = ro, define = yes;
3341
LOWBSS: load = MAIN, type = rw, optional = yes; # not zero initialized
@@ -36,9 +44,9 @@ SEGMENTS {
3644
CODE: load = MAIN, type = ro, define = yes;
3745
RODATA: load = MAIN, type = ro;
3846
DATA: load = MAIN, type = rw;
39-
INIT: load = MAIN, type = rw, optional = yes;
47+
#INIT: load = MAIN, type = rw, optional = yes;
4048
BSS: load = MAIN, type = bss, define = yes;
41-
49+
4250
GFX8_DL: load = MAIN, type = rw, align = $0400, define = yes;
4351
#GFX8_CONSOLE_DL: load = MAIN, type = rw, align = $0100, define = yes;
4452
#GFX9_CONSOLE_DL: load = MAIN, type = rw, align = $0100, define = yes;

0 commit comments

Comments
 (0)