[Coco] Coco game for kids
James C. Hrubik, Sr.
jimhrubik at earthlink.net
Tue May 3 10:17:40 EDT 2005
From Barden - I haven't tried these out...they are typed in directly as
written from Color Computer Graphics, and there may be some typos in
the original! There is no SET/RESET function for modes 8, 12, or 24 --
those are in section 2 of the book, and I don't have time right now to
fetch them. SOMEBODY really ought to .pdf that book; it's only 237
pages!
--------------
100 REM SEMIGRAPHICS 4 MODE
110 C-1
120 FOR Y=0 TO 31 STEP 2
130 FOR X=0 TO 63 STEP 2
140 SET (X,Y,C) : SET (X+1,Y+1,C)
150 SET (X,Y+1,C) : SET (X+1,Y+1,C)
160 C=C+1 : IF C=9 THEN C=1
170 NEXT X
180 NEXT Y
190 GOTO 190
--------------
He also writes just after that, "In addition to setting the most
significant bit in the video memory byte associated with the character
position, the BASIC interpreter sets the VDG to the semigraphics mode.
This is done prior to any display work. The entire screen is either in
the alphanumeric/semigraphics mode or in the graphic mode.The location
associated with setting the mode is location 65314. The following code
will set the semigraphic 4 mode."
100 A=PEEK (64314) : POKE 65314, (A AND 7)
110 POKE 65476,0 : POKE 65474, 0 : POKE 65472,0
----------------
100 REM SEMIGRAPHICS 6 MODE
110 A = PEEK (65314) : POKE 65314, (A AND 7) + 8 + 16 ' USE 16 OR 0
120 POKE 65476,0 : POKE 65474,0 : POKE 65472,0
130 FOR VM - 1024 TO 1024 + 511
140 IF (VM AND 32) = 0 THEN POKE VM,166 ELSE POKE VM,153
150 NEXT VM
160 GOTO 160
-----------------
100 REM SEMIGRAPHICS 8 MODE
110 A = PEEK (65314) : POKE 65314, (A AND 7)
120 POKE 65476,0 : POKE 65474,0 : POKE 65472,0
130 C = 0 : DT = 128 + 0 + 8 : N = 8
140 FOR LN = 0 TO 63
150 FOR CP = 0 TO 62 STEP 2
160 POKE 1024 + LN * 32 + CP / 2 , DT
170 NEXT CP
180 C = C + 16 : IF C = 128 THEN C = 0
190 N = N / 2 : IF N , 1 THEN N = 8
200 DT = 128 + C + N
210 NEXT LN
220 GOTO 220
-----------------
100 REM SEMIGRAPHICS 12
110 A = PEEK (65314) : POKE 65314, (A AND 7)
120 POKE 65477,1 : POKE 65474,0 : POKE 65472,0
130 C = 0 : DT = 128 + 0 + 10 : N = 10
140 FOR LN = 0 TO 95
150 FOR CP = 0 TO 32
160 POKE 1024 + LN * 32 + CP , DT
170 NEXT CP
180 C = C + 16 : IF C = 128 THEN C = 0
190 IF N = 10 THEN N = 5 ELSE N = 10
200 DT = 128 + C + N
210 NEXT LN
220 GOTO 220
---------------- ( NOTE THAT IN THIS ONE HE DOES NOT DEFINE N!)
100 REM SEMIGRAPHICS 24
110 A = PEEK (65314) : POKE 65314, (A AND 7)
120 POKE 65477,1 : POKE 65475,1 : POKE 65472,0
130 C = 0 : DT = 128 + 0 + 10
140 FOR LN = 0 TO 191
150 FOR CP = 0 TO 32
160 POKE 1024 + LN * 32 + CP , DT
170 NEXT CP
180 C = C + 16 : IF C = 128 THEN C = 0
190 IF N = 10 THE N = 5 ELSE N = 10
200 DT = 128 + C + N
210 NEXT LN
220 GOTO 220
-----------------------
On Tuesday, May 3, 2005, at 06:41 AM, Aaron Banerjee wrote:
>
> All,
> Who was it that was writing a game in the semigraphics mode? It
> was
> to be something like nibbler (the snake game), or Tron. I had a recent
> discovery with my 4 year old. I wrote a really simple (using just the
> text screen -- SET/RESET is the same thing, but has "color
> contamination")
> program where you simply navigate a dot through a maze to get to the
> "red
> dot" at the end. He was playing it for hours -- even to the exclusion
> of
> watching "Thomas the Tank Engine".
> That would probably be a quick and easy game to write in
> semigraphics,
> but I seem to have misplaced my Color BASIC books. How does one switch
> over into semigraphics, and where is the screen memory? Any more
> information (e.g. controlling/detecting color of pixels) would be
> helpful.
> Thanks.
> - Aaron
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>
>
+||||||||||###########################|||||||||||+
+||||||||| HRUBIK APPRAISAL SERVICES ||||||||||+
+|||||||| James C. Hrubik, Sr., RAA |||||||||+
+||||||| Appraisal & Appraisal Review ||||||||+
+|||||| Consulting & Litigation Support |||||||+
+||||||| V/F-(330)745-8435 ||||||||+
+|||||||| jimhrubik at earthlink.net |||||||||+
+|||||||||#############################||||||||||+
More information about the Coco
mailing list