[Coco] CoCo 3 Projector 3 Blues: The program only gives errorsto drive numbers higher than 1 (reposted because ofpossible size violation of previous message)

Roger Taylor operator at coco3.com
Sun Jan 17 16:26:02 EST 2010


At 08:42 PM 1/16/2010, you wrote:
>RJLCyberPunk wrote:
>>the Run"boot" method but is OK I've fixed it now with the added
>>code,still the program does give you a save feature but does it save the
>>files in a format that can then be read in a standard fashion from Disk
>>Basic? It has been a while since I've done any programming on the CoCo
>>Emulated or not so if it does can you or someone provide the listing of
>>the program needed to load a "standard" picture file into memory?
>
>Projector-3 is a perfect example of a program that can load a 
>"standard" picture into memory. There is no standard format for Coco 
>images although many users have created their own. Then there are 
>graphic programs such as The RAT and CocoMax-III which have their 
>own Coco image formats.
>Perhaps what you mean is a Coco program to dump either a PMODE or 
>HSCREEN to disk along with the palette colors. Well the OS-9 vef 
>format is the same as an HSCREEN and I think Projector-3 will save 
>files in the vef format. In fact, given a vef file in NTSC artifact 
>format, Projector-3 should display it just fine.


Projector-3 can view PMODE 3/4 and HSCREEN pictures, but the HSCREEN 
drivers may or may not be in the copy of P-3 you have.
Try these drivers attached. The source might help you understand how 
to write your own P-3 drivers.

The PMODE pictures using .MAX, .ART, or .BIN.
The 32k pictures have to end in .CBM (CoCo Bit Map).





* Projector-3 codec: HSCREEN 2,4 raw format

         fcn     "PF:CBM0***0***0***0:RAW 32K HSCREEN Graphics (32000 bytes)"

         include global.asm

         ORG     241
MSB1    rmb     1
LSB1    rmb     1
MSB0    rmb     1
LSB0    rmb     1
segment rmb     1
BLOCK   RMB     1
IMGTOP  RMB     2

         ORG     codect
         FDB     -1
         FDB     ENCODE
         FDB     -1

*rows   equ     200
rows    equ     144
bytes_per_row   equ     160
screen_bytes    equ     bytes_per_row*rows

BIN     EQU     540
_chrout EQU     534
RGBI    EQU     704

ENCODE  LDD     <WINDOW         ENCODE FROM WINDOW TOP
         MULD    #8              20 BYTES PER VIDEO DISPLAY ROW (GIME)
         STW     <IMGTOP
         JSR     [554]           SLDBLK (DESTINATION BLOCK START)
         STB     <BLOCK
         ldx     #0

         ldy     #160*200        200 lines
a@      TFR     X,D
         ADDD    <IMGTOP
         LSRA
         LSRA
         LSRA
         LSRA
         LSRA
         ADDA    #48
         STA     65446
         TFR     X,D
         ADDD    <IMGTOP
         ANDA    #31
         ADDA    #192
         TFR     D,U
         lda     ,u
         jsr     [_chrout]
         leax    1,x
         leay    -1,y
         bne     a@
         rts

         END




* Projector-3 codec: PMODE 3/4, CoComax, 6k Binary

         fcn     "PF:MAX0BIN0ART0***0:6K/12K LOADMable"
         include global.asm

         ORG     243             local DP space variables
PIX8    RMB     1
BYTES   RMB     2

         ORG     40960           driver code runs @ 40960-49151

         FDB     DECODE          the Decode procedure
         FDB     -1              no encoder in this driver
         FDB     -1              no properties/info in this driver

INCOMP  LDX     #INCOM9
         JMP     [gerror]
INCOM9  FCC     "Incompatible Picture"
         FCB     0
DECODE  JSR     [grbuff]        read file byte
         JSR     [grbuff]        read file byte
         TFR     A,B
         JSR     [grbuff]        read file byte
         EXG     A,B
         LDU     #192
         CMPD    #6144
         BEQ     LOA010
         CMPD    #6144*2
         BNE     INCOMP
         LDU     #192*2
LOA010  STD     <BYTES
         STU     <HEIGHT
         LDY     600
         LDX     #RGBMAP
         LDW     #2*3            2 COLORS
         TFRP    X,Y
         LDD     #2
         STD     <COLORS
         LDD     #256
         STD     <WIDTH
         JSR     [setarr]        SETARR
         CLR     <COLOR
         JSR     [pcls]  PCLS
         JSR     [grinit]        GRINIT
         LDD     plot            was set by [setarr]
         STD     DMPJSR+1        patch this driver for speed
         JSR     [grbuff]        skip .BIN load address
         JSR     [grbuff]
         LDY     <BYTES          CAN BE ANY SIZE 192/384 LINES ,ETC
STREAM  PSHS    Y
         JSR     [grbuff]                01010101
         CLRB
         LSLA
         STA     <PIX8
         ROLB                    0 OR 1 COLOR
         BSR     DUMP
         CLRB
         LSL     <PIX8
         ROLB
         BSR     DUMP
         CLRB
         LSL     <PIX8
         ROLB
         BSR     DUMP
         CLRB
         LSL     <PIX8
         ROLB
         BSR     DUMP
         CLRB
         LSL     <PIX8
         ROLB
         BSR     DUMP
         CLRB
         LSL     <PIX8
         ROLB
         BSR     DUMP
         CLRB
         LSL     <PIX8
         ROLB
         BSR     DUMP
         CLRB
         LSL     <PIX8
         ROLB
         BSR     DUMP
         PULS    Y
         LEAY    -1,Y
         BNE     STREAM
EXIT    RTS
ENCODE  LDD     <WINDOW         ENCODE FROM WINDOW TOP
         MULD    #8              20 BYTES PER VIDEO DISPLAY ROW (GIME)
         STW     <IMGTOP
         JSR     [554]           SLDBLK (DESTINATION BLOCK START)
         STB     <BLOCK
         ldb     #192
         stb     lines
         ldx     #0
         ldy     #160*192        192 lines
a@      tfr     x,d
         ADDD    <IMGTOP
         LSRA
         LSRA
         LSRA
         LSRA
         LSRA
         ADDA    #48
         STA     65446
         TFR     X,D
         ADDD    <IMGTOP
         ANDA    #31
         ADDA    #192
         TFR     D,U
         lda     ,u
         jsr     [_chrout]
         leax    1,x
         leay    -1,y
         bne     a@
         rts

DUMP    LDX     600             global r-g-b color map
         STB     <COLOR          indice into map
         ABX
         ABX
         ABX
DMP010  LDD     ,X
         STD     <RED
         LDA     2,X
         STA     <BLUE
DMPJSR  JSR     $FFFF           quicker than jsr [plot]
         INC     <PX+1           auto-wrapping PX
         BNE     DMP020
         LDD     <PY
         INCD
         STD     <PY
DMP020  RTS
RGBMAP  FCB     0,0,0,255,255,255

         END

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 32k.fmt
Type: application/octet-stream
Size: 124 bytes
Desc: not available
URL: <http://five.pairlist.net/pipermail/coco/attachments/20100117/c3b37639/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cocomax.fmt
Type: application/octet-stream
Size: 262 bytes
Desc: not available
URL: <http://five.pairlist.net/pipermail/coco/attachments/20100117/c3b37639/attachment-0003.obj>
-------------- next part --------------
-- 
~ Roger Taylor



More information about the Coco mailing list