Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCOPY has no effect #206

Closed
jlaasonen opened this issue Jul 28, 2022 · 4 comments
Closed

PCOPY has no effect #206

jlaasonen opened this issue Jul 28, 2022 · 4 comments
Assignees
Labels

Comments

@jlaasonen
Copy link

PCOPY does not seem to have any effect.

Problem

I used the program below to test double buffering. A white square should be moving across the screen until ESC is pressed. The program worked with PC-BASIC v1 but in v2 an empty screen is displayed.

Program

10 DIM BG%(16)
20 F=1/30
30 KEY OFF
40 SCREEN 7,,0,1
50 X=1:Y=1
60 GET (X,Y)-(X+6,Y+6),BG%
70 A$=INKEY$
80 WHILE A$=""
90 PUT (X,Y),BG%,PSET
100 X=X+1:Y=Y+1
110 IF X>319-6 THEN X=0
120 IF Y>199-6 THEN Y=0
130 LINE (X,Y)-(X+6,Y+6),15,BF
140 A$=INKEY$
150 PCOPY 0,1
160 T=TIMER:WHILE TIMER<T+F:WEND
170 WEND
180 SCREEN 0:WIDTH 80:KEY ON

Notes

PC-BASIC version: 2.0.5
Operating system version: Windows 10 64bit

@robhagemans
Copy link
Owner

robhagemans commented Jul 28, 2022 via email

@robhagemans robhagemans self-assigned this Jul 28, 2022
@jlaasonen
Copy link
Author

Looks like this line could be the culprit:

self.pages[dst].copy_from(self.pages[dst])

@robhagemans
Copy link
Owner

robhagemans commented Jul 29, 2022 via email

@robhagemans
Copy link
Owner

Fixed by 461ee52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants