Hi,
it is a bit tangled ...
So, I will explain step by step what I do everytime I post an update ...
First I am going to show you the utility files I use to get all the
needed files with asm6809.
This toolchain began very thin and has ended up with more files that expected
I compile from the command line (only one command):
2r DW42-2503
The file "2r.bat" calls the procedures for Becker Port and Drivewire
Code: Select all
call 2romBCK %1 $6000
call 2romDW4 %1 $6000
The BeckerPort file 2romBCK does:
Line 1 creates an intermediate
Extender without header, multiple of 256 bytes to build the ROM
Line 2 creates an intermediate
Extender without header not multiple of 256 bytes to build the DWEEB
Line 3 creates the last one but with header, to be the "Becker-Patcher"
Line 4 adds together the DPlus50 and the ROM from line 1 to create the "Becker ROM"
Line 5 compiles a special source to produce the "Becker Dweeb"
Line 6 and 7 delete the working files
Code: Select all
asm6809 -9 -B -v --define becker=1 --define drgrom=1 --exec=%2 --o=%1RBCK.rom %1.asm
asm6809 -9 -B -v --define becker=1 --exec=%2 --o=PATCHER.rom %1.asm
asm6809 -9 -B -v --define becker=1 --define drgbin=1 --l=%1DBCK-PATCHER.lst.asm --o=%1DBCK-PATCHER.bin %1.asm
copy DP50NEW.rom /B + %1RBCK.rom /B DP50PSR-BCK.rom /B
asm6809 -9 -B -v 2dweeb.asm --o=DP50BINS
del PATCHER.rom
del %1RBCK.rom
pause
The DP50NEW is in fact the patched DosPlus50 with the needed hooks to call the
extender
The special 2dweeb.asm contains
Code: Select all
org $3fb0-9 ; $3fa7
put $3fb0-9
fcb $55
fcb $02
fdb $3fb0
fdb final-inicio
fdb $3fb0
fcb $aa
inicio
includebin "BMUPv14C.rom" ; loader
includebin "DP50NEW.rom" ; hooked DOS
includebin "PATCHER.rom" ; Becker extender
if ((*-$3fa7)%256 > 0)
rzb 256-((*-$3fa7)%256) ; make it DW4 compatible (length multiple of 256 bytes)
endif
final END
The file BMUPv14C.rom is a program that switches to MAP1, copies the Basic ROM and then the modified DOS and
extender
to upper memory ($C000 on) and restarts the computer (acts as an installer)
On the other side the DriveWire file 2romDW4 does:
Line 1 creates an intermediate
Extender without header, multiple of 256 bytes to build the ROM
Line 2 creates an intermediate
Extender without header not multiple of 256 bytes to build the DWEEB
Line 3 creates the last one but with header, to be the "DW4-
Extender"
Line 4 adds together the DPlus50 and the ROM from line 1 to create the "DW4 ROM"
Line 5 compiles a special source to produce the "DW4 Dweeb"
Line 6 and 7 delete the working files
Code: Select all
asm6809 -9 -B -v --define becker=0 --define drgrom=1 --exec=%2 --o=%1RDW4.rom %1.asm
asm6809 -9 -B -v --define becker=0 --exec=%2 --o=EXTENDER.rom %1.asm
asm6809 -9 -B -v --define becker=0 --define drgbin=1 --l=%1DDW4-EXTENDER.lst.asm --o=%1DDW4-EXTENDER.bin %1.asm
copy DP50NEW.rom /B + %1RDW4.rom /B DP50PSR-DW4.rom /B
asm6809 -9 -B -v 1dweeb.asm --o=DP50XINS
del EXTENDER.rom
del %1RDW4.rom
pause
The special 1dweeb.asm contains
Code: Select all
org $3fb0-9 ; $3fa7
put $3fb0-9
fcb $55
fcb $02
fdb $3fb0
fdb final-inicio
fdb $3fb0
fcb $aa
inicio
includebin "BMUPv14C.rom" ; loader
includebin "DP50NEW.rom" ; hooked DOS
includebin "EXTENDER.rom" ; DW4 extender
if ((*-$3fa7)%256 > 0)
rzb 256-((*-$3fa7)%256) ; make it DW4 compatible (length multiple of 256 bytes)
endif
final END
For the ones that would like to peek at the MBUPv14C.rom, here is the source code:
Code: Select all
;-----------------------------------------------------------------------------------------------------------
; MBASUP v1.4C (2015-06-28 by Pere Serrat)
; used to switch to MAP1 and copy
; the BASIC from ROM into RAM,
; the patched DOS must be loaded into low RAM at $4000
; the Extender should be loaded at $6000
; and finally reset the machine
;-----------------------------------------------------------------------------------------------------------
ORG $3FB0
PUT $3FB0
;-----------------------------------------------------------------------------------------------------------
ORCC #$50 ; disable interrupts
LDX #$8000 ; point to std BASIC ROM
LOOP1 STA $FFDE ; switch to MAP0 (RAM-ROM)
LDD ,X ; get a word
STA $FFDF ; switch to MAP1 (all 64k RAM)
STD ,X++ ; put at destination
CMPX #$BFFF ; copied full BASIC?
BLO LOOP1 ; no, loopback
LDU #$4000 ; point to beginning of DOS loaded in low RAM
loop2 ldd ,u++ ; get a word
std ,x++ ; put at destination
cmpu #$7D00 ; copied all 8k of DOS + 6k of extender? ($7D00-$4000 = $3D00 = 15.616 bytes)
blo loop2 ; no, loopback
LDA #$0E ; byte to put instead of $10. Sets bits X=$FFC0 step 2, 14 times instead of 16 times
STA $BB72 ; at I/O initialisation, so staying in map1
LDX #$B3CA ; initial code to detect RAM-ROM limit
LDD #$120C ; NOP opcode 12 times to prevent overwritting (now it will be all RAM)
LOOP3 STA ,X+ ; fill that part of initialisation
DECB ; already finished?
BNE LOOP3 ; no, loopback
LDA #$8E ; opcode for LDX immed
STA ,X+ ; put after the NOPs
LDD #$7FFF ; get RAM limit
STD ,X ; put after LDX to force end of Basic, of RAM, etc to be that value
CLR <$71 ; mark COLD start
JMP $B3B4 ; perform reset
;-----------------------------------------------------------------------------------------------------------
if (* < $4000)
rzb $4000-* ; fill until $3FFF included
endif
;********************************************************************************************************************************
In next post I will begin the procedure to transfer these files to the VDKs I upload everytime
cheers
pere
Ps I attach here all of these files for if anyone wants to use them
In the zip I have included the original DosPlus50 needed if it must be re-pacthed