[Coco] What was the Disk Extended color basic source codeforloading a screen dump saved to disk such as a VEF file?

RJLCyberPunk cyberpunk at prtc.net
Mon Jan 18 07:30:07 EST 2010


Does it work on VCC or MESS and if so what is the URL that one obtains it 
from?


----- Original Message ----- 
From: "Bob Devries" <devries.bob at gmail.com>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Monday, January 18, 2010 2:31 AM
Subject: Re: [Coco] What was the Disk Extended color basic source 
codeforloading a screen dump saved to disk such as a VEF file?


> RJLCyberPunk, you said:
>
>> This was really handy someone should come up with a Developer kit for the 
>> CoCo with all this goodies and more such as other small asembly programs 
>> that do the following:
>
> Somebody did.....
> It's called Rainbow IDE, and it runs on a PC under winows, creates a .DSK 
> file which you can tranfer easily to your *real* coco if you have one.
>
> Regards, Bob Devries
>
> --
> Besides a mathematical inclination, an exceptionally good mastery of one's 
> native tongue is the most vital asset of a competent programmer.
>
> Edsger W.Dijkstra, 18 June 1975
>
> ----- Original Message ----- 
> From: "RJLCyberPunk" <cyberpunk at prtc.net>
> To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
> Sent: Monday, January 18, 2010 5:24 PM
> Subject: Re: [Coco] What was the Disk Extended color basic source code 
> forloading a screen dump saved to disk such as a VEF file?
>
>
>> Thanks I'm going to try to paste the source code into BAS files for the 
>> BASIC source code, could the same thing be done for the ASSEMBLY code if 
>> I were to prefix it with ASM to load it into the assembler and turn it 
>> into ML?
>> This was really handy someone should come up with a Developer kit for the 
>> CoCo with all this goodies and more such as other small asembly programs 
>> that do the following:
>> * Work more efficienly moving images smootthly and transparenly onscreen 
>> than GET/PUT and it's high resolution counterparts HPUT/HGET
>>
>> * Allow the use of WAV files stored in RAM to be played in the background 
>> as in not interfering with animation or other stuff going on in the 
>> program. That off course brings the question if there is any programs 
>> that allow the porting of WAV files or MP3 files. Problem with that is 
>> size/
>>
>>
>> That what I can come up for now anyhow there is probably much more one 
>> could add to a DEV kit but it would be a start.
>>
>>
>> ----- Original Message ----- 
>> From: "Robert Gault" <robert.gault at worldnet.att.net>
>> To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
>> Sent: Sunday, January 17, 2010 1:33 PM
>> Subject: Re: [Coco] What was the Disk Extended color basic source code 
>> for loading a screen dump saved to disk such as a VEF file?
>>
>>
>>> RJLCyberPunk wrote:
>>>> So does anyone has the BASIC source code around? If so please post 
>>>> it...
>>>>
>>>
>>> Here are two very simple Basic programs for saving and loading an 
>>> HSCREEN. As written HLOAD assumes the screen was HSCREEN4 but you can 
>>> change that.
>>>
>>> HSAVE.BAS
>>> 10 WIDTH32:PMODE0:PCLEAR1
>>> 20 SAVEM"PALETTE",&HFFB0,&HFFBF,0
>>> 30 POKE&HFFA1,&H30:POKE&HFFA2,&H31:SAVEM"HSCR1",&H2000,&H5FFF,0
>>> 40 POKE&HFFA1,&H32:POKE&HFFA2,&H33:SAVEM"HSCR2",&H2000,&H5FFF,0
>>> 50 POKE&HFFA1,&H39:POKE&HFFA2,&H3A
>>>
>>> HLOAD.BAS
>>> 10 WIDTH32:PMODE0:PCLEAR1:POKE&HE6C6,&H21
>>> 20 LOADM"PALETTE"
>>> 30 POKE&HFFA1,&H30:POKE&HFFA2,&H31:LOADM"HSCR1"
>>> 40 POKE&HFFA1,&H32:POKE&HFFA2,&H33:LOADM"HSCR2"
>>> 50 POKE&HFFA1,&H39:POKE&HFFA2,&H3A
>>> 60 HSCREEN4
>>> 70 GOTO70
>>>
>>> If you know that the file is a single screen 640x200x4 vef NTSC artifact 
>>> file and have placed the file on a Disk Basic disk, then you could use 
>>> this combination of Basic and ml programs to load the image.
>>>
>>> 10 CMP:WIDTH80:LOADM"VIEWVEF"
>>> 20 INPUT"Please indicate the image drive# ->";DR
>>> 30 IF DR <0 OR DR>3 THEN CLS:GOTO20
>>> 40 DRIVE DR:FOR I=1TO4
>>> 50 READ F$:OPEN"I",#1,F$
>>> 60 EXEC:CLOSE
>>> 70 FORT=1TO2000
>>> 80 NEXT T,I
>>> 90 HSCREEN0:CMP:CLS
>>> 100 END
>>> 110 DATA "name.VEF"
>>>
>>> * This program will load vef files that have the format
>>> * 160x200x4 using artifact colors. These files have an
>>> * 18 byte header as follows. R.Gault Jan. 12, 2010
>>>
>>> header rmb 1 ??
>>> pages rmb 1 should be 1 for one screen
>>> palette rmb 16 but only four entries present for this type
>>>
>>> * This is fixed because of the 18 byte header and screen size of
>>> * 160x200  $7D00+$12
>>> filesize equ $7d12
>>>
>>> org $e00
>>> start orcc #$50
>>> sts stack2
>>> lds #stack get the stack out of the way of the screen
>>> lbsr clock check for 2MHz use for disk I/O
>>> sta $ffd9 fast CPU
>>> lda $e06f HSCREEN4 init value
>>> ora #$20 HSCREEN4 set to 640x200x4
>>> sta $e06f set a new one
>>> lda #1 disk buffer
>>> sta $6f set console out for disk read
>>> ldy #$ffb0 GIME palettes
>>> lbsr read skip one byte
>>> lbsr read get number of screens
>>> cmpa #1
>>> lbne error
>>> ldb #4 get four palette colors
>>> a@ bsr read
>>> sta ,y+
>>> decb
>>> bne a@
>>> ldb #18-6 skip unused palette entries
>>> b@ bsr read
>>> decb
>>> bne b@
>>>
>>> ldb #4 HSCREEN#
>>> jsr $e6a5 set HSCREEN to value in regB
>>> lbsr clean blank the screen
>>> ldd #$c000 *$60000
>>> std $ff9d point video to start of graphics screen
>>> ldd #$3031 Start screen at $60000
>>> std $ffa1 set 2 MMU blocks
>>> incb
>>> stb $ffa3 set a third MMU block
>>> ldx #$2000 fill the screen
>>> ldy #$6000
>>> a@ bsr read
>>> sta ,x+
>>> leay -1,y
>>> bne a@
>>>
>>> ldd #$333a
>>> std $ffa1
>>> incb
>>> stb $ffa3 reset 2 MMU blocks and update third
>>> ldx #$2000
>>> ldy #$2000
>>> a@ bsr read
>>> sta ,x+
>>> leay -1,y
>>> bne a@
>>>
>>> lda #$39 restore the last MMU block
>>> sta $ffa1
>>> ldx #$ffd8 return CPU to entry speed
>>> lda speed
>>> sta a,x reset CPU clock speed
>>> lds stack2
>>> andcc #$af
>>> rts return to Basic
>>>
>>> exit clr $e6 used if there was an error
>>> lda #$1d
>>> sta $e06f
>>> clra
>>> jsr $e019
>>> ldx #$ffd8
>>> lda speed
>>> sta a,x reset CPU clock speed
>>> lds stack2
>>> andcc #$af
>>> jmp $adfb
>>>
>>> read tst speed use fast I/O if possible
>>> bne a@
>>> sta $ffd8
>>> a@ jsr $a176
>>> tst speed
>>> bne b@
>>> sta $ffd9
>>> b@ rts
>>>
>>> clock clrb test current CPU clock speed
>>> bsr vsync
>>> lda $ff02
>>> a@ incb
>>> lda $ff03
>>> bpl a@
>>> clra
>>> cmpb #$c0
>>> bhi setspd
>>> inca
>>> setspd sta speed
>>> rts
>>>
>>> speed rmb 1
>>>
>>> vsync lda $ff02
>>> a@ lda $ff03
>>> bpl a@
>>> lda $ff02
>>> rts
>>>
>>> error clr $6f
>>> ldx #mesg-1
>>> jsr $b99c PRINT ERROR AND RETURN TO BASIC
>>> bra exit
>>> mesg fcc /SORRY BUT BAD FILE FORMAT!/
>>> fcb 0
>>>
>>> clean lda #$34 erase the screen
>>> sta $ffa2
>>> sts stack1
>>> lds #$6000
>>> clrb
>>> ldx #0
>>> ldy #0
>>> ldu #0
>>> a@ clra
>>> b@ pshs d,x,y,u
>>> cmps #$4000
>>> bne b@
>>> lds #$6000
>>> lda $ffa2
>>> anda #$3f
>>> cmpa #$30
>>> beq c@
>>> dec $ffa2
>>> bra a@
>>> c@ lds stack1
>>> lda #$3a
>>> sta $ffa2
>>> rts
>>>
>>> rmb 100
>>> stack equ *
>>> stack1 rmb 2
>>> stack2 rmb 2
>>>
>>> end start
>>>
>>> --
>>> Coco mailing list
>>> Coco at maltedmedia.com
>>> http://five.pairlist.net/mailman/listinfo/coco
>>>
>>
>>
>> --
>> Coco mailing list
>> Coco at maltedmedia.com
>> http://five.pairlist.net/mailman/listinfo/coco
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
> 




More information about the Coco mailing list