Jump to content
IGNORED

Charts (demos)


sometimes99er

Recommended Posts

Thanks!

 

Really what I was looking for was what is at address $8379. My guess is that is the number of columns for the mode we are in. Is that correct?

 

...

 

8379h is the CPU scratchpad RAM location for the VDP interrupt timer. It is incremented effectively circularly from 0 to 255 every 60th of a second. As Mark pointed out below, the code should be referencing CPU RAM, not VDP RAM.

 

It's a bug. Should have been C@

 

Sorry :(

 

...lee

Link to comment
Share on other sites

  • 4 months later...

:thumbsup: :thumbsup: :thumbsup: Good job :thumbsup: :thumbsup: :thumbsup: :)

 

In V1.1 (and 1.2) RND is provided for you by the system, so you don't need to define it, and therefore you don't need SEED either:

 

VARIABLE COL
CREATE COLS 30 CHARS ALLOT
: >COLS ( value offset -- ) COLS + C! ;
: <COLS ( offset -- n ) COLS + C@ ;
: CHART
 1 GMODE 1 SCREEN 4 5 0 COLOR 5 15 0 COLOR
 DATA 4 $0000 $0000 $0000 $003F 33 DCHAR
 DATA 4 $0000 $0000 $003F $003F 34 DCHAR
 DATA 4 $0000 $003F $003F $003F 35 DCHAR
 DATA 4 $003F $003F $003F $003F 36 DCHAR
 DATA 4 $040E $1F04 $0404 $0C04 40 DCHAR
 DATA 4 $0404 $1C04 $0404 $0C04 41 DCHAR
 DATA 4 $0404 $1F04 $0400 $0000 42 DCHAR
 DATA 4 $0000 $FF44 $0400 $0000 43 DCHAR
 DATA 4 $0406 $FF46 $0400 $0000 44 DCHAR
 40 0 V! 1 0 41 22 VCHAR 42 736 V! 23 1 43 30 HCHAR 44 767 V!
 30 0 DO
    0 I >COLS
 LOOP
 BEGIN
   30 RND COL !	 <---this line changes - don't need MOD any more, RND does it for you
   22 COL @ <COLS 2 >> -
   COL @ 1+
   COL @ <COLS 3 AND 33 +
   1
   HCHAR
   COL @ <COLS 88 >
  IF
    0 COL @ 1+ 32 23 VCHAR 0
  ELSE
    COL @ <COLS 1+
  THEN
  COL @ >COLS
 AGAIN
;
CHART

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...