[net.micro.cbm] Koala pictures on a 128

sean1@garfield.UUCP (11/03/86)

Does anyone out there know what format a Koala picture has to be in to be used
on a C-128? I have a loader which works on the 64, but I am not sure where the
memory has to be loaded into on the 128. There is the 8000 bytes of Graphic 
memory, which goes at 8192, the 1000 bytes of low color memory, and the 1000
bytes of hight color memory. I would appreciate a bit of help on this. I have
written a game in Basic 7.0 for the 128 and would like to display a Koala title
screen. Thanks. I have an Ahoy magazine article which supposedly tells all, but
it is WRONG, very wrong.

Thanks. 



 /~~~~~\   |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
|/ / \ \|  | UUCP: {akgua,allegra,cbosgd,ihnp4,mcvax,utesri}!garfield!sean1 |
(|-@-@-|)  | CDNNET: sean1@garfield.mun.cdn                                 |
\|  ^  |/  | Sean Huxter                                                    |
 | \_/ |   | Apt. 420, 235 Blackmarsh Rd., St. John's, NF, Canada           |
  \___/    |(Can YOU say NEWFOUNDLAND, boys and girls?) (and pronounce it?) |
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	The opinions expressed here will be put to a general vote and the
	results will be posted. Stand by...

fred@cbmvax.commodore.COM (Fred Bowen) (11/05/86)

> Does anyone out there know what format a Koala picture has to be in to be used
> on a C-128? I have a loader which works on the 64, but I am not sure where the
> memory has to be loaded into on the 128.

Since you sound familiar with the layout, and you are working in BASIC 7.0,
I will give a brief example and explanation:

        10 GRAPHIC 3,1                   :REM  MULTICOLOR GRAPHIC MODE
        20 A=PEEK(1): B=PEEK(216)        :REM  SAVE THESE
        30 POKE 216,255                  :REM  TELL IRQ TO GIVE US VIC CONTROL
        40 POKE 1, A AND 252             :REM  SELECT PROCESSOR NYBBLE BANK
        50 BLOAD "PIC.BM",P(DEC("2000")) :REM  LOAD BIT MAP
        60 BLOAD "PIC.VM",P(DEC("1C00")) :REM  LOAD COLORS 01 AND 10
        70 BLOAD "PIC.CN",P(DEC("D800")) :REM  LOAD COLORS 11
        80 POKE 1,A                      :REM  RESTORE SYSTEM NYBBLE BANK
        90 POKE 216,B                    :REM  RESTORE SYSTEM VIC CONTROL

I think you can figure it out from here.  The problem was your handling of
the color nybble banks.  There are two of them, one for text mode and one for
multicolor graphic mode, and they are controlled by the two least significant
bits of the port at $0001.  Bit 0 controls which bank the processor sees, and
bit 1 controls which bank the VIC sees.  1=text, 0=graphic.  Normally, the
editor handles all this automatically during IRQ processing.  The system
variable GRAPHM, location $D8 (216 dec), contains bits indicating the current
graphic mode (text/graphic/split-screen).  A special case, GRAPHM=255, means
YOU want to twiddle the bits, and hence the system leaves hands-off.
-- 
Fred Bowen			uucp:	{ihnp4|seismo|caip}!cbmvax!fred
				arpa:	cbmvax!fred@seismo.css.GOV
				tele:	215 431-9100

Commodore Electronics, Ltd.,  1200 Wilson Drive,  West Chester,  PA,  19380

sean1@garfield.UUCP (11/14/86)

In article <965@cbmvax.cbmvax.commodore.COM> fred@cbmvax.commodore.COM (Fred Bowen) writes:
>        50 BLOAD "PIC.BM",P(DEC("2000")) :REM  LOAD BIT MAP
>        60 BLOAD "PIC.VM",P(DEC("1C00")) :REM  LOAD COLORS 01 AND 10
>        70 BLOAD "PIC.CN",P(DEC("D800")) :REM  LOAD COLORS 11

First, I want to thank Fred Bowen for the help, but in this example, I still need
to know how to transfer a 40 block koala pic file to the three files mentioned
above. Perhaps someone could tell me by using either a Basic program to move
the appropriate memory around, or by using Monitor syntax for the 128, like:

L "?pic a koala",8,  whatever...

T this and that... etc... to transfer the memory to its appropriate locations, 
and telling me which file goes into what locations and such.

Yours in Desperation, 

 /~~~~~\   |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
|/ / \ \|  | UUCP: {akgua,allegra,cbosgd,ihnp4,mcvax,utesri}!garfield!sean1 |
(|-@-@-|)  | CDNNET: sean1@garfield.mun.cdn                                 |
\|  ^  |/  | Sean Huxter                                                    |
 | \_/ |   | Apt. 420, 235 Blackmarsh Rd., St. John's, NF, Canada           |
  \___/    |(Can YOU say NEWFOUNDLAND, boys and girls?) (and pronounce it?) |
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   The opinions expressed here are only meant to show my ignorance.