+Lee Stewart Posted October 7, 2012 Share Posted October 7, 2012 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 Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted February 20, 2013 Author Share Posted February 20, 2013 (edited) Mr. Climb and Dr. Blob going Forth ... Edited April 5, 2018 by sometimes99er 1 Quote Link to comment Share on other sites More sharing options...
Willsy Posted February 20, 2013 Share Posted February 20, 2013 :thumbsup: Good job :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 Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted February 21, 2013 Author Share Posted February 21, 2013 Thanks guys. RND, ahh, excellent, thanks. Both yield good random number (- for this). I see a MPY crept in (_rnd), but it doesn’t affect overall performance. Good. - As you see, I used ALLOT here, which would fit right in with Shooting Stars. Quote Link to comment Share on other sites More sharing options...
Willsy Posted February 21, 2013 Share Posted February 21, 2013 Yeah, the source for RND is here: http://turboforth.net/source/Bank1/1-10-Strings.html I have no idea why I put RND in the strings source code file! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.