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

Apple II/II+ text/lores floating bus bug #1181

Closed
ryandesign opened this issue Oct 25, 2023 · 0 comments
Closed

Apple II/II+ text/lores floating bus bug #1181

ryandesign opened this issue Oct 25, 2023 · 0 comments

Comments

@ryandesign
Copy link
Contributor

ryandesign commented Oct 25, 2023

Bob Bishop's 1982 article Have an Apple Split presents a program (in listings 1 and 2) that displays text on the top half of the screen and lores graphics on the bottom half. To run it, create a new Apple II+ in Clock Signal, press F12 to reset and get the Applesoft BASIC prompt, and paste this in:

0  REM HAVE AN APPLE SPLIT
1  REM BY BOB BISHOP
2  REM SOFTALK, OCTOBER 1982
3  FOR I = 768 TO 798: READ V: POKE I,V: NEXT
4  DATA 141,82,192,169,224,162,4,205,81,192,208,249,202,208,248,169,160,162,4,205,80,192,208,249,202,208,248,141,81,192,96
100  HOME
200  FOR K = 0 TO 39
210  POKE 1448 +K,14 *16
220  POKE 2000 +K,10 *16
230  COLOR= K +4
240  VLIN 25,45 AT K
250  NEXT K
300  VTAB 6: HTAB 17
310  PRINT "APPLE II"
400  CALL 768
500  GOTO 400

Run it with:

RUN

(This is Bishop's listing 1 with lines numbered less than 100 added by me in order to incorporate the machine language program from listing 2 and make it self-contained.)

This program does not work in Clock Signal 2023-09-10 when emulating an Apple II or II+:

applesplit-broken

(The distortion of the display starting where it switches from text to graphics flickers much more quickly than shown in this animated gif and is a separate issue.)

This program also does not work when emulating an Apple IIe, and that is not a bug. The program does not work on a real Apple IIe either.

The reason is that when an Apple II or II+ is in text or lores graphics mode, its video scanner scans memory addresses during HBL that are $1000 higher than those scanned on an Apple IIe or later. See Understanding the Apple II by Jim Sather, chapter 5.

After fixing this bug (for which I will submit a pull request), the "Have an Apple Split" program works correctly when emulating a II or II+:

applesplit-fixed

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

No branches or pull requests

1 participant