[Coco] CoCo Emulators
Steve Ostrom
smostrom7 at comcast.net
Mon Mar 22 09:54:18 EDT 2021
Joel, I’m sure I must have read it, but I don’t have any memory of what it said or how long ago William Astle made that post. Does it help explain what is wrong with my coding? I admit, it’s been quite a few years since I tried any significant CoCo work, and I needed to look up a few items in my reference books, but I just can’t see where my coding might be causing the PUT to not work properly. Can you repost William’s info for me?
This whole topic occurred because of my attempt to have the CoCo rotate a graphics screen using polar coordinates. The entire program worked well except for the GET/PUT routines, where the PUTs were not putting the graphics where I told it to put them. That’s why I wrote up this simple example to demonstrate the problem I was having with a far more complex program. I know there can’t be a bug in the GET/PUT routines since it would have been reported years ago. It must be my understanding of certain requirements.
I’m confused and a bit frustrated. I was hoping someone with more BASIC competence might be able to point out what I’m missing. I’d appreciate any insight anyone here might have.
Thanks!
--- Steve ---
Sent from Mail for Windows 10
From: Joel Rees
Sent: Monday, March 22, 2021 7:59 AM
To: CoCoList for Color Computer Enthusiasts
Subject: Re: [Coco] CoCo Emulators
Steve, did you see William Astle's post, Re: CoCo Basic?
On Mon, Mar 22, 2021 at 12:00 PM Steve Ostrom <smostrom7 at comcast.net> wrote:
>
> Just to satisfy my mind, that maybe the manual had a misprint, I tried increasing the DIM to (17,17) and got the same result. I then tried (20,20) and got the same result. There must be a different explanation for why my test program is not PUTting at (30,0). Any more ideas? I’m sure it’s somewhere in my coding. Thanks!!
>
> --- 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 ---
>
>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
--
Joel Rees
http://reiisi.blogspot.jp/p/novels-i-am-writing.html
--
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco
More information about the Coco
mailing list