[Coco] CoCo Emulators
Steve Ostrom
smostrom7 at comcast.net
Sun Mar 21 22:34:22 EDT 2021
Robert, I don’t think that is correct. The definition of DIM says the array should be defined as (width,length), where width = x2-x1 and length = y2 – y1. In my example, x1 and y1 = 0, and x2 and y2 = 16. Therefore width and length = 16-0 = 16. So DIM W(16,16) should define the array for a square from 0 to 16. On page 69 of the Going Ahead manual, they even give an example of a 40x20 rectangle, which will require the array (39,19). They give the reason for this as “Color BASIC arrays have a zero element”. My array is 17x17, so should require a DIM 0f (16,16).
--- Steve ---
Sent from Mail for Windows 10
From: Robert Gault
Sent: Sunday, March 21, 2021 8:14 PM
To: CoCoList for Color Computer Enthusiasts
Subject: Re: [Coco] CoCo Emulators
Keep in mind that when you DIM W(16,16) that is a 16 by 16 package. However, when you talk about a screen location at say 30 or a GET (0,n)-(16,m) you have moved 31 spaces or grabbed 17 units.When you start at 0 and go to n, that is a change of n+1.
Sent from AT&T Yahoo Mail on Android
On Sun, Mar 21, 2021 at 8:50 PM, Steve Ostrom<smostrom7 at comcast.net> wrote: OK, I fired up my CoCo 3 and I get the same result as the emulator. So I must be making an error in my understanding of the PUT function.
PUT(30,0)-(46,16),W must not put the graphics starting at (30,0).
--- Steve ---
Sent from Mail for Windows 10
From: Steve Ostrom
Sent: Sunday, March 21, 2021 7:22 PM
To: CoCoList for Color Computer Enthusiasts
Subject: Re: [Coco] CoCo Emulators
Thanks for confirming my suspicions about INT. The newer CoCo 3 manual does state it correctly and the older Getting Started manual does not.
I am having a problem with the PUT function in the VCC emulator. It’s not working like I assume it would, or I’m making a huge blunder. Here is a simple code to illustrate.
100 PCLEAR4
110 DIM W(16,16)
120 PMODE 4,1
130 PCLS
140 SCREEN 1,0
150 FOR X=0 TO 16
160 FOR Y=0 TO 16
170 PSET(X,Y)
180 NEXT Y
190 NEXT X
200 GET(0,0)-(16,16),W
210 PUT(30,0)-(46,16),W
220 PSET(30,0)
230 PRESET(30,0)
240 GOTO 220
250 END
This code should create a 17x17 pixel solid square in the upper left corner of the screen starting at (0,0). Then it should copy and paste that square 30 pixels to the right, starting at (30,0). Then the PSET and PRESET loop should blink that pixel at (30,0). When I run this program, the blinking pixel is not the upper left corner of the pasted square. So PUT is not pasting the square at where I expect it to. I’d appreciate it if someone could show me where I’m not understanding the GET and PUT functions.
Thanks! (I told you I’d probably have more questions about the emulator !! 😊)
--- Steve ---
Sent from Mail for Windows 10
From: Arthur Flexser
Sent: Sunday, March 21, 2021 6:23 PM
To: CoCoList for Color Computer Enthusiasts
Subject: Re: [Coco] CoCo Emulators
The greatest integer in -2.3 is -3, since -2.3 is smaller than -2. The INT
function is defined as the greatest integer in a number.
Art
--
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco
--
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco
--
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco
More information about the Coco
mailing list