SJLOAD-20 release 06
Moderator: Moderators
SJLOAD-20 release 06
Here is SJLOAD-20 (for VIC-20) release 06 (thanks to Hydrophilic!)
Release Info:
+ SJLOAD: Improved loading speed by 40%
+ SJLOAD: Now nearly all kernal IO vectors used: CHKIN,CKOUT,BSOUT,BASIN,CLALL,CLRCH (not only LOAD, SAVE)
This improves data access to jiffy devices (also in BASIC).
Is not supported in Mini Wedge (Wedge in 3K LO-RAM, memory config F7).
+ SJLOAD: Messages only in direct mode. In program mode messages are suppressed.
Binaries for $0400 and $B000 are included.
Source code is included.
You can simply change startaddress and switch on/off modules (SJSAVE, PRINT ADDRESS RANGE, BASIC IO VECTORS).
Download from my HP: sjload r06
Have fun!
Release Info:
+ SJLOAD: Improved loading speed by 40%
+ SJLOAD: Now nearly all kernal IO vectors used: CHKIN,CKOUT,BSOUT,BASIN,CLALL,CLRCH (not only LOAD, SAVE)
This improves data access to jiffy devices (also in BASIC).
Is not supported in Mini Wedge (Wedge in 3K LO-RAM, memory config F7).
+ SJLOAD: Messages only in direct mode. In program mode messages are suppressed.
Binaries for $0400 and $B000 are included.
Source code is included.
You can simply change startaddress and switch on/off modules (SJSAVE, PRINT ADDRESS RANGE, BASIC IO VECTORS).
Download from my HP: sjload r06
Have fun!
Hi Diddl,
I've just tested this Sjload version (both $b0 and $04) with my sd2brwse porting on a Vic + 32k expansion and I have the same problem noticed with new FE3 firmware r19 so the problem should be inside these routines...
No problems with SJLOAD05...
The problem is that after the JSR LOAD I got a blinking cursor.
Btw looking inside the asm file I've seen that you have added some compilation option like my modified SJLOAD 05 that I sent you, many thanks, I will compile it with BASIO = 0 and or PRINTADDRESS = 0 to see if something changes.
I've just tested this Sjload version (both $b0 and $04) with my sd2brwse porting on a Vic + 32k expansion and I have the same problem noticed with new FE3 firmware r19 so the problem should be inside these routines...
No problems with SJLOAD05...
The problem is that after the JSR LOAD I got a blinking cursor.
Btw looking inside the asm file I've seen that you have added some compilation option like my modified SJLOAD 05 that I sent you, many thanks, I will compile it with BASIO = 0 and or PRINTADDRESS = 0 to see if something changes.
Mega-Cart: the cartridge you plug in once and for all.
update:
I've compiled SJLOAD06 in a minimal mode:
SJSAVE = 0
BASIO = 0
PRINTADDRESS = 0
But I still have the problem, if I load a program from the prompt, all is ok but from sd2brwse after the JSR LOAD the cursor blink, and if I hit the RETURN key, the screen clears as it was an INPUT prompt and after it goes to a bad location (clear the screen).
I will try to debug this problem in VICE btw any idea for the reason ?
I've compiled SJLOAD06 in a minimal mode:
SJSAVE = 0
BASIO = 0
PRINTADDRESS = 0
But I still have the problem, if I load a program from the prompt, all is ok but from sd2brwse after the JSR LOAD the cursor blink, and if I hit the RETURN key, the screen clears as it was an INPUT prompt and after it goes to a bad location (clear the screen).
I will try to debug this problem in VICE btw any idea for the reason ?
Mega-Cart: the cartridge you plug in once and for all.
- Mike
- Herr VC
- Posts: 4841
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Hi, Diddl, hi, nbla000,
I've looked at sjload06.asm; and at least that part look a bit strange.
There's the wedge init, storing a new address into the kernel load vector:
Now, the kernel load routine expects in A, whether load, or verify; and in X/Y a load address, if 0 was specified as secondary address in SETLFS. That value in X/Y overrides the value contained in the *.prg file itself!
But here ...
... X is already toast.
And this here, later in the MYLOAD routine:
would not provide the same behaviour as the kernel load routine, unless $C3/$C4 are initialised first, i.e. you might try inserting these instructions:
Greetings,
Michael
P.S.: And I'm also not sure how SJLOAD06 handles sec. add. =1. In that case, $C3/$C4 should be initialised from the first two bytes of the file, but I can't see the necessary code for that ...
I've looked at sjload06.asm; and at least that part look a bit strange.
There's the wedge init, storing a new address into the kernel load vector:
Code: Select all
MY_WEDGE_INIT
_relo5000 = . +1
lda #<MY_LOAD
ldx #>MY_LOAD
sta PTR_LOAD
stx PTR_LOAD +1
But here ...
Code: Select all
; LOAD VECTOR :: "fnam",PA,SA[,loadadr]
MY_LOAD subroutine
ldx SY_DN ; PA (device#)
cpx #4
bcs .0
jmp $f549 ; OLD LOAD PROC
And this here, later in the MYLOAD routine:
Code: Select all
ldx SY_SA ; SA
beq .00 ; SA=0 -->
[...]
.00 ; SA=0: LOAD PROGRAM AT $c3
_relo0085 = . +1
jsr FRMWORD2 ; GET WORD VALUE
lda LOADPTR +1
ldx LOADPTR
Code: Select all
MY_LOAD subroutine
stx $c3 ; ** init $c3/$c4 in case of sec. add. =0,
sty $c4 ; ** and fast load commences
ldx SY_DN ; PA (device#)
cpx #4
bcs .0
ldx $c3 ; ** restore X for kernel load
jmp $f549 ; OLD LOAD PROC
Michael
P.S.: And I'm also not sure how SJLOAD06 handles sec. add. =1. In that case, $C3/$C4 should be initialised from the first two bytes of the file, but I can't see the necessary code for that ...
No!
Kernal makes "STX $c3" bevore LOAD vector is called:
Kernal makes "STX $c3" bevore LOAD vector is called:
Code: Select all
.C:f542 86 C3 STX $C3
.C:f544 84 C4 STY $C4
.C:f546 6C 30 03 JMP ($0330)
.C:f549 85 93 STA $93
.C:f54b A9 00 LDA #$00
.C:f54d 85 90 STA $90
.C:f54f A5 BA LDA $BA
.C:f551 D0 03 BNE $F556
.C:f553 4C 96 F7 JMP $F796
SJLOAD handlesMike wrote:P.S.: And I'm also not sure how SJLOAD06 handles sec. add. =1. In that case, $C3/$C4 should be initialised from the first two bytes of the file, but I can't see the necessary code for that ...
SA=0:
load from $C3/$c4 address, usually BASIC start if called from interpreter.
SA=1:
load from address in the file (first two bytes)
SA=2 (only in FE3 wedge and sjload):
load from $C3/$c4 address and use first two bytes in file as data (not address)
also only in FE3 and SJLOAD, you can give an address as parameter in case of SA=0 and SA=2.
Maybe this is the problem of NBLA, but this was also so with v018a and all FE3 bevore.
- Mike
- Herr VC
- Posts: 4841
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Oh, indeed.
In the meantime I've also answered my other question myselves, you store the first two bytes into LOADEND, and then use that pointer to store into memory.
Maybe nbla000 could also provide in source, how sd2browse calls the kernal load routine? Here's part of the source of sd2browse 0.6 by nojoopa:
nbla000 surely needed correct the addresses of the last two JSR calls. BASIC programs - then loaded with sec. add. 0 also would require a jsr $c533 to relink the pointers. Parts of the load code are stored into screen memory - maybe nbla000 removed that alltogether, etc.
In the meantime I've also answered my other question myselves, you store the first two bytes into LOADEND, and then use that pointer to store into memory.
Maybe nbla000 could also provide in source, how sd2browse calls the kernal load routine? Here's part of the source of sd2browse 0.6 by nojoopa:
Code: Select all
; setup load
setupload:
lda #1 ; filenr
ldx device ; unitnr
ldy #1 ; sec.address (,1)
jsr SETLFS
lda disknamepetlen ; a = filenamelen
ldx #<disknamepet
ldy #>disknamepet ; x:y->filename
jsr SETNAM
; copy LOAD & RUN code to loadrunpos
ldy #0
ldx #loadrunend-loadrunstart
- lda loadrunstart,y
sta loadrunpos,y
iny
dex
bne -
jmp loadrunpos ; jump to loadrunpos
; (the following code is executed at loadrunpos)
loadrunstart ; start of code to copy
!pseudopc loadrunpos {
; load program
;
lda #0 ; a = 0: load
jsr LOAD
; error detection would be nice :)
; save end address
stx $2d
sty $2e
; autostart program
; (from comp.sys.cbm)
;
jsr $a659 ; reset pointers etc...
jmp $a7ae ; BASIC warm start
}
loadrunend ; end of code to copy
My load code porting for the vic is a little bit different, There is a portion here:
The autostart code for the vic is different too of course btw my problem is before, when I simply select the item the loading process does not start and I've a cursor blink.
Code: Select all
startloading:
ldy #1 ; sec.address (,1) (default for any start mode except for RUN)
lda tmpptr ;zp location setted before to check the RUN mode
cmp #1 ;is RUN the start mode ? (1 = RUN)
bne startloadingb
ldy #0 ; sec.address (,0) for RUN start mode
startloadingb:
lda #1 ; filenr
ldx device ; unitnr
jsr SETLFS
lda disknamepetlen ; a = filenamelen
ldx #<disknamepet
ldy #>disknamepet ; x:y->filename
jsr SETNAM
; copy LOAD & RUN code to loadrunpos ($33c for the vic)
ldy #0
ldx #loadrunend-loadrunstart
- lda loadrunstart,y
sta loadrunpos,y
iny
dex
bne -
jmp loadrunpos ; jump to loadrunpos
; (the following code is executed at loadrunpos $33c for the Vic)
loadrunstart ; start of code to copy
lda #0 ; a = 0: load
;Load start address used only in RUN start mode (sec.address (,0) on SETLFS)
ldx basicstartaddress_lo ;Pointer: Start of Basic lo byte
ldy basicstartaddress_hi ;Pointer: Start of Basic hi byte
jsr LOAD
; error detection would be nice :)
; save end address
stx $2d
sty $2e
Yes nice but not essential at least until nowjsr LOAD
; error detection would be nice
Mega-Cart: the cartridge you plug in once and for all.
LOAD = $ffd5Diddl wrote:> jsr LOAD
What is the address for LOAD? if it is $f542 or the kernel jmp table it is ok and should work fine.
.C:ffd5 4C 42 F5 JMP $F542
OK, in the meantime, I try to test it on VICE on lunchbreakIan has sent me your beta code, will test it myself at evening.
Mega-Cart: the cartridge you plug in once and for all.
OK testing a bit this version (with ,8,1 locked like the c64 version), I have a similar behaviour (the cursor blink) but when I press RETURN, the loaded programs works, btw the problems seems to be on chin chrin pointers, here is the code where the chrin loops:Diddl wrote:Ian has sent me your beta code, will test it myself at evening.
Code: Select all
; e5e5 - Input From Keyboard ?!?!
e5e8 A5 C6 LDA $C6 ; <-- keyboard buffer
e5ea 85 CC STA $CC
e5ec 8D 92 02 STA $0292
e5ef F0 F7 BEQ $E5E8
Code: Select all
13d1 A5 29 LDA $29
13d3 A2 1C LDX #$1C
13d5 A0 18 LDY #$18
13d7 20 BD FF JSR $FFBD ;setnam
13da A9 01 LDA #$01
13dc AE DE 17 LDX $17DE
13df A0 00 LDY #$00
13e1 20 C0 FF JSR $FFC0 ;(iopen) from ($031a) = [F40A]
13e4 A2 01 LDX #$01
13e6 20 C6 FF JSR $FFC6 ; (ichkin) ; set logical file number #1 as input
13e9 20 CF FF JSR $FFCF ;(ichrin) <-- here should read from disk while reads from keyboard
(ichrin) get pointers from $324 and here there is $bc4c, original [F20E]
With the new version I read first 2 bytes of the file to load so I will set the proprer memory configuration and ichrin fails when I try to load these bytes...
Mega-Cart: the cartridge you plug in once and for all.