|
Post by Hydrophilic on May 26, 2014 21:04:30 GMT
I was interested in reading about the developement of a Gold Box game translation for 80-columns on the now-offline Landover-BBS/C128 Forum. It was being worked on by VDC8x2, but I don't rememeber of the name of the game. Does anyone know if there was progress or the game conversion was abandoned?
|
|
|
Post by VDC 8x2 on May 28, 2014 3:14:57 GMT
Gateway of the Savage frontier.
I got most of the Init done. I am know working on the Combat Parts
VDC8x2
|
|
|
Post by VDC 8x2 on Jun 3, 2014 16:50:04 GMT
A quick and dirty memory map of the game.
$02 - $0fff - shared memory bank 0 - $1000 - $bfff - game kernel aka library and linker and any other code that is shared between the moduals bank 1 - $1000 - $bfff - the transient code that is loaded in depending on what part of the game we are in. $c000 - $feff - Kernal rom.
most of the global variables will fit into shared memory with code used to call code between banks.
Extra variable will be under kernal ram if needed space.
|
|
|
Post by VDC 8x2 on Jun 3, 2014 20:09:45 GMT
The Linker Code
It is a Beta. I still need to fix it for full use with the way c128 loads aka: making sure it loads into the right bank for us.
#region vari03fc = $0bfc vari4bee = $08ee vari7f11 = $0f11 vari7f12 = $0f12
progstart= $1000 jsradd1 = $0acf jsrbnk1 = $0ac8
subr3159 = $3159 subr3dbb = $3dbb subr453b = $453b subr4a7a = $4a7a #endregion *=$2d00 start lda vari7f11 bne @skip lda vari7f12 sta vari4bee lda #$01 sta vari7f12 @skip jsr subr3dbb jsr subr4a7a lda #$00 sta vari03fc @loop ldx vari7f11 lda lowadd,x sta $28 lda highadd,x sta $2a lda length,x ldx #$00 ldy #$08 jsr subr3159 beq @skip1 jsr subr453b jmp @loop @skip1 lda #<progstart sta jsradd1+1 lda #>progstart sta jsradd1+2 jsr jsrbnk1 ;jsr to our program in custbank1 jmp start
file1 text "GEN" file2 TEXT "DUNGEON" file3 TEXT "COMBAT" file4 TEXT "INIT" file5 TEXT "COM.PREP" file6 TEXT "POST.COM" file7 TEXT "FINAL" file8 TEXT "CAMP" length byte $03,$07,$06,$04,$08,$08,$05,$05 lowadd bytes <file1*1,<file2*1,<file3*1,<file4*1 bytes <file5*1,<file6*1,<file7*1,<file8*1 highadd bytes >file1*1,>file2*1,>file3*1,>file4*1 bytes >file5*1,>file6*1,>file7*1,>file8*1
|
|
|
Post by hydrophilic on Jun 4, 2014 1:25:26 GMT
Well not sure which of the JSR loads the file, but whatever it is, it should call JSR $FF68 with .A = 1 (load file into bank 1) and .X = 0 (filename in bank 0). I mean the code shown is in Bank 0, but the modules load into Bank 1? Then that should work.
Umm, if you needed to load into to Bank 0 for some reason, you would need to call JSR FF68 again with different parameters.
If it only loads into Bank 1 after core/library/linker is loaded, another option would be to call $FF68 during startup. Then it wouldn't need to be called every LOAD.
Anyway, what assembler are you using? The #region directive I don't understand.
|
|
|
Post by VDC 8x2 on Jun 5, 2014 4:27:25 GMT
I am using CBM prog studio. version 3.0
The region directive just lets me hide code from showing. sorta like folding a paper to only look at part of it.
I will have to use jsr ff68 every time because the moduals load sub models sometimes when needed
|
|
|
Post by VDC 8x2 on Jun 7, 2014 2:28:43 GMT
code update
start lda vari7f11 bne @skip lda vari7f12 sta vari4bee lda #$01 sta vari7f12 @skip lda #%00001110 ;custom bank0 with kernal and i/o in sta $ff00 jsr SetIrqNormal lda #$00 sta vari03fc lda #$01 ldx #$00 jsr $ff68 ;set load bank1 filename in bank0 @loop ldx vari7f11 lda lowadd,x sta $28 lda highadd,x sta $2a lda length,x ldx #$00 ldy #$08 jsr subr3159 ;load file beq @skip1 jsr subr453b ;error msg jmp @loop @skip1 lda #<progstart sta jsradd1+1 lda #>progstart sta jsradd1+2 jsr jsrbnk1 ;jsr to our program in custbank1 jmp start
file1 text "GEN" file2 TEXT "DUNGEON" file3 TEXT "COMBAT" file4 TEXT "INIT" file5 TEXT "COM.PREP" file6 TEXT "POST.COM" file7 TEXT "FINAL" file8 TEXT "CAMP" length byte $03,$07,$06,$04,$08,$08,$05,$05 lowadd bytes <file1*1,<file2*1,<file3*1,<file4*1 bytes <file5*1,<file6*1,<file7*1,<file8*1 highadd bytes >file1*1,>file2*1,>file3*1,>file4*1 bytes >file5*1,>file6*1,>file7*1,>file8*1
|
|
|
Post by VDC 8x2 on Jun 13, 2014 23:12:49 GMT
The basic loader for gatewayvdc. I changed my mind and put kernal in bank 1 again. with bank 0 for moduals.
5 bank 15 15 poke 47,0:poke 48,192:clr:rem variables to $c000 25 aa = peek (54534):poke 54534, aa or 1:rem turn on 4k shared mem at bottom 35 graphic clr:color 6,1:graphic 5,1:dd = 8 45 poke 3017,1:vv = 3072:poke vv+672,0 55 print:print"gateway to the savage frontier vdc v1.0":rem 06/13/2014 65 bload"linker",p(dec("1000")),b1,u(dd) 75 poke vv+785,3:rem next prog 85 poke vv+786,1:rem disk # 95 sleep 1 105 bload"library",p(dec("2000")),b1,u(dd) 115 poke 2958,dd:rem drive # 125 sleep 1 130 bload"bankjump",p(dec("0ac8")),b0,u(dd) 135 poke 2594,128 145 POKE 808, 112:POKE 792, 98:rem disable run/stop 155 color 6,13 165 poke 2564,192:poke 216,255 rem turn off basic and kernal updates irq 175 fast:bank 1:sys dec("1000")
|
|
|
Post by hydrophilic on Jun 16, 2014 18:08:47 GMT
cool, it looks like it is coming along
only thing, is with the BASIC init program, I would change line 35 to have "dd = peek(186)" which would set the disk device to the last one used (presumably where the BASIC program came from).
This of course assumes the game doesn't require disk to be unit 8 for some stupid reason.
|
|
|
Post by VDC 8x2 on Jun 16, 2014 19:36:12 GMT
thanks for catching that. I will put that in there.
I know it can use drive 9 for sure. I had copied files to 3 1581 disks and used a 3rd party loader on drive 9.
I played those games the first time that way, back in the day.
|
|