These two POKEs,
Code: Select all
POKE36864,PEEK(60900)-3
POKE36866,(PEEK(36866)AND128)+25
In VICE, the NTSC emulation appears slightly shifted to the right. How does this look on a real VIC?
Moderator: Moderators
Code: Select all
POKE36864,PEEK(60900)-3
POKE36866,(PEEK(36866)AND128)+25
VICE does a good job of showing more or less what's in the output signal. I think it's actually off by one pixel--showing one less pixel in the chopped off 25th column than is really shown.Mike wrote:I still wonder, why the display is off center in the normal case (in VICE, at least): subtracting 1 off the register 36864 would yield a centered screen then.
For this purpose, what's wrong with assuming a 40 column display? That way, someone can easily read the documentation on any CBM 8bit. Your reader could either invoke a VIC20 specific 40 column displayer, or it could just use the standard KERNAL print routines.I might continue on that anyway. It's a nice method to include instructions for a game or program on the *.d64, so they can't easily be lost.
That indeed is, what VICE suggests on NTSC. With PAL, and on all TV's and monitors I've tried, the display was centered.IsaacKuo wrote:[...]the output signal is NOT centered in a typical TV display. [...] The only monitor I use where the default is seriously off-center is my Apple Monitor III. On that one, the default display is shifted to the left by half a character. POKE shifting the display right by half a character nicely centers the display.
When I use a full 160x192 bitmap, I get 40x24 characters, assuming 4x8 pixel characters. Like these here:For this purpose, what's wrong with assuming a 40 column display? That way, someone can easily read the documentation on any CBM 8bit. Your reader could either invoke a VIC20 specific 40 column displayer, ...
At least one would need to define an ASCII character set in that case.... or it could just use the standard KERNAL print routines.
The technique may be useful for an unexpanded VIC. You'd use dynamic character allocation, along with a routine to check for dupes.Mike wrote:When I use a full 160x192 bitmap, I get 40x24 characters,[...] However, it wouldn't give an edge over the already existing 40-column emulators. The interesting point in Sentoria is, it uses redundancies of natural text that lead to the recycling of character pairs (with 8x8 pixel characters). Only slight caveat is the possibility to run out of available characters, and one would need to build an entire screen, scrolling is not easily possible.IsaacKuo wrote:For this purpose, what's wrong with assuming a 40 column display? That way, someone can easily read the documentation on any CBM 8bit. Your reader could either invoke a VIC20 specific 40 column displayer, ...
Nope. The other CBM 8-bit machines already include a full PETSKII character set in ROM. You get a full 40 columns with the other machines out-of-box. The only machine which needs a special reader routine is the VIC20.At least one would need to define an ASCII character set in that case.... or it could just use the standard KERNAL print routines.
Yeah, clear.IsaacKuo wrote:The technique may be useful for an unexpanded VIC. You'd use dynamic character allocation, along with a routine to check for dupes.
Instead of a dumb linear search of matching character pairs, it uses a natural binary tree. This speeds up display by at least 4 times.I don't know how Sentoria does things, but I don't see why scrolling is such a problem.
That's commonplace. But with the binary tree, I need to reference count all character pairs, provide a routine to delete no more longer used pairs, and then the tree could degenerate to a list, etc.You just...umm...scroll up the screen matrix.
That's totally crap. Why should I compare 8 bytes of a bitmap, when 2 bytes of text do the same job?When printing text, you'd always print temporarily to a fresh char block. Then, you can scan the screen to look for duplicates...not the fastest thing in the world, but good enough for mostly static text.
Victragic wrote a version of Sentoria for unexpanded VIC. He had to cut down a lot of it. The fast binary search needed to be replaced again by a linear search.Since I'm looking at this from an unexpanded VIC perspective, I'd favor conserving memory over superior speed.
Please read carefully. I wrote ASCII, not PETSCII.Nope. The other CBM 8-bit machines already include a full PETSKII character set in ROM.
Or screen estate, for that matter.carlsson wrote:Or perhaps 46x22 (184x176 pixels, 253 double height characters) if you want as many columns as practically possible.
Odd indeed. But with that bitmap size I'd also need to place the screen matrix into the lower 1K, something I am not a big fan of.It would be a bit odd screen layout though compared to 40x24.
If you care about speed, then don't do any searching at all. Just use pure free characters when speed matters. Assuming the use of a 2K character bitmap area, you can get 13+ lines of text before you need to start worrying about dupe detection or garbage collection.Mike wrote:Instead of a dumb linear search of matching character pairs, it uses a natural binary tree. This speeds up display by at least 4 times.IsaacKuo wrote:I don't know how Sentoria does things, but I don't see why scrolling is such a problem.
To conserve memory. You don't need to store those 2 bytes of text; this saves you 512 bytes of memory...a huge chunk of RAM on an unexpanded VIC! You've got 2K consumed by the character bitmaps; .5K consumed by the screen. This leaves you only 1.5K of main RAM. And you want to just consume another .5K on something that's not strictly necessary? It's not like you can cram it into the tape buffer...the only convenient place for 512 bytes of RAM is main memory. *That's totally crap. Why should I compare 8 bytes of a bitmap, when 2 bytes of text do the same job?When printing text, you'd always print temporarily to a fresh char block. Then, you can scan the screen to look for duplicates...not the fastest thing in the world, but good enough for mostly static text.
So what? You can write a tiny conversion routine to go from ASCII to PETSCII. That's much tinier than an entire font.Please read carefully. I wrote ASCII, not PETSCII.Nope. The other CBM 8-bit machines already include a full PETSKII character set in ROM.
I would devise the text file to be readable on the VIC-20, and editable on a normal PC.
Obviously you consider development for an unexpanded VIC to be a complete waste of time.bitmaps for 256 character pairs -> 2048 bytes
screen -> 700 bytes
tree -> 1024 bytes
character definition (96 characters @ 8 bytes) -> 768 bytes (definitions are duplicated in lower, and higher nibbles)
That's already 4.5K, and there's still no program counted in.
Sentoria is a good, fast text display program, with some small issues I intend to improve upon. Constraining myself to an unexpanded VIC would lead to nowhere.
From my last posting above, you can imply I'm going to trash the 50 column display idea. The 40 column display won't need any searches, it'll just copy the character bitmaps to the right places.IsaacKuo wrote:If you care about speed, then don't do any searching at all. Just use pure free characters when speed matters. [...] Even in the case of a successful match, the font may allow only checking 4 bytes. If, say, lines 2-5 match, you may be able to assume the others also match. This depends on the details of the font, of course.
Where are '}', '{', '\', '|', '~' in PETSCII? At least for these I'd need to provide UDGs. Of course, on a C64 or 22-column VIC-20 display I can copy the original charset, and only replace the missing characters. For a 40-column display on the VIC-20 I need to supply the entire character set, which I chose to be ASCII, not PETSCII.So what? You can write a tiny conversion routine to go from ASCII to PETSCII. That's much tinier than an entire font.
A non-VIC, 40-column version boils down to KERNAL I/O, and the conversion routine. But that's not the program I'm going to write now.Besides, your custom font isn't going to get you very far on a PET. My suggestion was to design the reader so anyone can easily use any CBM 8-bit to read the documentation.
A challenge for what?Obviously you consider development for an unexpanded VIC to be a complete waste of time.
I think it's an interesting challenge.