|
Post by VDC 8x2 on Jun 10, 2014 17:22:12 GMT
so anything to do with the write register, address or data, have to be synced. okay
|
|
|
Post by VDC 8x2 on Jun 8, 2014 14:23:56 GMT
A store and fetch routine for the vdc to and from main memory. It works in page length chunks.
The page number is stored in .a when you call the routine. The main memory address is stored in $fe-$ff.
On a normal 16k vdc the address space from $1000-$2000 is empty. so I thought why not use it for data storage. On a 64k vdc the space is a lot more.
could be sorta like a VDCREU.
VDCADR = $D600 VDCDAT = $d601 zpagepnt = $fe ;address of main mem ; .a = VDC256ByteBank *=$1300 start jmp push jmp pull
setregs ldy #$12 sty vdcadr sta vdcdat iny sty vdcadr lda #$00 sta VDCDAT ;set address tay lda #$1f sta vdcadr rts
push jsr setregs @loop lda (zpagepnt),y sta vdcdat iny bne @loop rts
pull jsr setregs @loop lda vdcdat sta (zpagepnt),y iny bne @loop rts
|
|
|
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 5, 2014 15:07:51 GMT
What version of Geos128 do you use?
I use the mega patch version.
|
|
|
Post by VDC 8x2 on Jun 5, 2014 14:58:34 GMT
Here is the place to discuss Vice and all the other Commodore Emulators out there.
|
|
|
Hello
Jun 5, 2014 14:55:30 GMT
Post by VDC 8x2 on Jun 5, 2014 14:55:30 GMT
Hello and welcome aboard!
|
|
|
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 5, 2014 4:17:13 GMT
I know it was answered before but for the sake of new people.
How did risen from oblivion do its raster effects?
|
|
|
Post by VDC 8x2 on Jun 5, 2014 4:03:07 GMT
Here is some code from the old board. My decompress assembly routine.
uses lsr to parse the control byte
source = $fc ;the data stream target = $fe ;output memory *=$1300 start ldy #$00 ;index lda (source),y jsr incsource lsr bcs fill ;1 to 127. 0=256 lsr bcs copy8 ;1 to 63. 0=256 bne skip ;skip 1 to 63 bytes rts ;zero so we exit
fill tax ;put a into x counter lda (source),y ;get value to fill x times @loop sta (target),y ;put value jsr inctarget dex bne @loop ; not zero so contiue loop jsr incsource ;get next source jmp start
copy8 tax ;put a into x counter @loop ldy #$07 @loop1 lda (source),y sta (target),y dey bpl @loop1 clc ;get ready to add 9 lda target adc #$09 sta target lda target+1 adc #$00 sta target+1 dex bne @loop ;not zero clc ;clean up and add 9 to source lda source adc #$09 sta source lda source+1 adc #$00 sta source+1 jmp start
skip tax ;#of bytes to skip 1 to 63 @loop lda (source),y sta (target),y jsr incsource jsr inctarget dex bne @loop ;loop until zero jmp start
inctarget inc target bne @end inc target+1 @end rts
incsource inc source bne @end inc source+1 @end rts
|
|
|
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
|
|