I am writing a game that I would like to use 24 columns. I am able to get it to display very nicely on my emulator for the MAC (Power20). I also ran across the following code, from Herr Mike I believe, that does it even nicer.
POKE36864,PEEK(60900)-3
POKE36866,(PEEK(36866)AND128)+24 ..... (original was 25)
A few questions.
1. I am using a 1702 monitor and the edges seem to hang over on each side. This is AFTER I have centered the picture as much as possible with the nob. Has anyone else noticed this?
2. Can anyone explain the poke 36864 above? What is the peek into 60900 and then why is 3 subtracted?
3. On my emulator a peek of 36864 returns 12. A peek of the same location on a real VIC returns 5. What gives? Does this number vary from vic to vic? Both of mine returned 5.
I am guessing I may have to reduce to 23 columns to make it work with the 1702 monitor but I would like to avoid this.
Regards,
Jonathan
Centering 24 columns - and 1702 monitors
Moderator: Moderators
-
- Vic 20 Devotee
- Posts: 253
- Joined: Fri Mar 19, 2010 1:40 pm
- Mike
- Herr VC
- Posts: 4842
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: Centering 24 columns - and 1702 monitors
Just Mike.vicassembly wrote:I also ran across the following code, from Herr Mike I believe, that does it even nicer.
Code: Select all
POKE36864,PEEK(60900)-3
POKE36866,(PEEK(36866)AND128)+24 ..... (original was 25)
A little further down the thread it was established, that - on NTSC - 25 columns in most cases don't fit, and 24 columns are on the edge. PAL allows for more columns.1. I am using a 1702 monitor and the edges seem to hang over on each side. This is AFTER I have centered the picture as much as possible with the nob. Has anyone else noticed this?
36864 is the VIC register for horizontal positioning, and defines that in terms of half character widths. To center 3 extra columns, the POKE shifts the screen 3 half columns to the left, derived from the default value in 60900.2. Can anyone explain the poke 36864 above? What is the peek into 60900 and then why is 3 subtracted?
That's because you were emulating a PAL VIC.3. On my emulator a peek of 36864 returns 12.
And that's because you are using two NTSC VIC's. NTSC 6560, and PAL 6561 require different values for the horizontal positioning, and that is reflected in ROM.A peek of the same location on a real VIC returns 5. What gives? Does this number vary from vic to vic? Both of mine returned 5.
I'm using the ROM default values to make the screen positioning TV system neutral. The same method is used within MINIGRAFIK for its 160x192 graphics mode.
In that case, you'd use:I am guessing I may have to reduce to 23 columns to make it work with the 1702 monitor but I would like to avoid this.
Code: Select all
POKE36864,PEEK(60900)-1
POKE36866,(PEEK(36866)AND128)+23
Michael
-
- Vic 20 Devotee
- Posts: 253
- Joined: Fri Mar 19, 2010 1:40 pm