Search found 153 matches

by SparkyNZ
Fri Feb 02, 2024 6:36 am
Forum: Hardware and Tech
Topic: Max screen size/area in pixels?
Replies: 4
Views: 1686

Re: Max screen size/area in pixels?

I guess you are asking this because you want to know how to dimension the screen buffer for your own emulator, right? Yes for the emulator at the moment but I'm also thinking about a VIC chip replacement for those 3 dead machines of mine. I still have the option of fiddling with an FPGA so just try...
by SparkyNZ
Thu Feb 01, 2024 11:08 pm
Forum: Hardware and Tech
Topic: Max screen size/area in pixels?
Replies: 4
Views: 1686

Max screen size/area in pixels?

I bet this is a question for Mike. :-) What is the maximum number of pixels the Vic chip can display on a TV screen - this is including moving the screen from top-leftmost to bottom-rightmost? In other words, if you had to a design a monitor that would handle the Vic's max screen size in any x/y pos...
by SparkyNZ
Mon Jan 29, 2024 10:19 pm
Forum: Emulation and Cross Development
Topic: Keyboard Buffer and Ctrl/Shift/CBM etc
Replies: 20
Views: 3069

Re: Keyboard Buffer and Ctrl/Shift/CBM etc

I spoke too soon! I can't get '2' to work. I can see that the matrix scan is definitely working - it stores $38 (56) in $cb as expected.. but for some reason number 2 doesn't appear on the screen. All the other letters and numbers work. Would this have something do with 2 having the double quote sym...
by SparkyNZ
Mon Jan 29, 2024 8:45 pm
Forum: Collecting and History
Topic: Book Search: Getting Started On Your Commodore Vic 20
Replies: 3
Views: 1830

Book Search: Getting Started On Your Commodore Vic 20

This has been bugging me for a while. I had the below book when I was a kid: https://i.imgur.com/RHiMzb9.png I would have thought I'd be able to find a PDF of it bask in some nostalgia but I can't find it anywhere. It isn't on the DLH Bombjack site or archive.org Does anybody have a .pdf they would ...
by SparkyNZ
Mon Jan 29, 2024 6:39 pm
Forum: Emulation and Cross Development
Topic: Keyboard Buffer and Ctrl/Shift/CBM etc
Replies: 20
Views: 3069

Re: Keyboard Buffer and Ctrl/Shift/CBM etc

Well.. I had the wrong value written to my matrix (typo!) so that's why some keypresses wouldn't work. The amount of diassembly debug was also slowing things down that I was missing the key up event.. so I think I have this mostly working now :-) I haven't implemented colour on the screen yet but th...
by SparkyNZ
Sat Jan 27, 2024 3:50 pm
Forum: Emulation and Cross Development
Topic: Keyboard Buffer and Ctrl/Shift/CBM etc
Replies: 20
Views: 3069

Re: Keyboard Buffer and Ctrl/Shift/CBM etc

I don't understand what this bit of code is doing: LAB_EB1E LDA #$00 ; clear A STA LAB_028D ; clear keyboard shift/control/c= flag LDY #$40 ; set no key STY LAB_CB ; save which key STA LAB_9120 ; clear VIA 2 DRB, keyboard column ### HERE LDX LAB_9121 ; get VIA 2 DRA, keyboard row ### HERE CPX #$FF ;...
by SparkyNZ
Sat Jan 27, 2024 2:43 pm
Forum: Emulation and Cross Development
Topic: Keyboard Buffer and Ctrl/Shift/CBM etc
Replies: 20
Views: 3069

Re: Keyboard Buffer and Ctrl/Shift/CBM etc

Pressing a key causes the row/column combination to shorted. The 6522 pulls inputs high when unconnected so this results in the value 11110111 being returned for column 4. I've tried reversing my bit orders for both column and row. I now return F7 for 'M' but nothing appearing on the screen still. ...
by SparkyNZ
Sat Jan 27, 2024 1:04 am
Forum: Emulation and Cross Development
Topic: Keyboard Buffer and Ctrl/Shift/CBM etc
Replies: 20
Views: 3069

Re: Keyboard Buffer and Ctrl/Shift/CBM etc

After reading a few more posts, I thought perhaps I should be returning 0 for keys that are pressed down rather than 1.. So now I'm returning $ef for M in $9121.. but still no keypresses being detected by the VIC. :-(

I must be missing something else?
by SparkyNZ
Fri Jan 26, 2024 7:44 pm
Forum: Emulation and Cross Development
Topic: Keyboard Buffer and Ctrl/Shift/CBM etc
Replies: 20
Views: 3069

Re: Keyboard Buffer and Ctrl/Shift/CBM etc

Ultimately, the easiest way to get keyboard input correct will be to mimic the keyboard matrix and VIA registers, and let the KERNAL do all the decoding work. Otherwise you'll get stuck in all sorts of definitions by cases. Hmmm. I've logged all of the writes to $9120. I'm returning $10 for 'M' whe...
by SparkyNZ
Fri Jan 26, 2024 4:51 pm
Forum: Emulation and Cross Development
Topic: Keyboard Buffer and Ctrl/Shift/CBM etc
Replies: 20
Views: 3069

Re: Keyboard Buffer and Ctrl/Shift/CBM etc

Ultimately, the easiest way to get keyboard input correct will be to mimic the keyboard matrix and VIA registers, and let the KERNAL do all the decoding work. Otherwise you'll get stuck in all sorts of definitions by cases. That is starting to sound like the safest option. I wonder where the best p...
by SparkyNZ
Fri Jan 26, 2024 8:35 am
Forum: Emulation and Cross Development
Topic: Keyboard Buffer and Ctrl/Shift/CBM etc
Replies: 20
Views: 3069

Re: Keyboard Buffer and Ctrl/Shift/CBM etc

I guess your emulator should take care of the via registers (the keyboard matrix) and let the kernal interrupt do the updates of these registers you are talking about. I guess otherwise you are rewriting the rom or designing your own system. In this case, I guess you should compute the correct asci...
by SparkyNZ
Fri Jan 26, 2024 8:18 am
Forum: Emulation and Cross Development
Topic: Keyboard Buffer and Ctrl/Shift/CBM etc
Replies: 20
Views: 3069

Re: Keyboard Buffer and Ctrl/Shift/CBM etc

What is put into the keyboard buffer by the KERNAL is already the fully decoded result after the modifier keys have been read and the corresponding decoding table has been chosen. That makes sense Mike. Cursor Left and Cursor Up I have already got working - and that is really Cursor Right and Curso...
by SparkyNZ
Thu Jan 25, 2024 11:20 pm
Forum: Emulation and Cross Development
Topic: Keyboard Buffer and Ctrl/Shift/CBM etc
Replies: 20
Views: 3069

Keyboard Buffer and Ctrl/Shift/CBM etc

I've made a rubbish Vic emulator (I have my reasons :-) ) .. I've managed to intercept keys on Windows and place them into the Vic's keyboard buffer at $277 and by setting $c6 to 1 (for 1 keypress). That works great - I can get most keys to work. The problem I'm having is trying to understand how Ct...
by SparkyNZ
Thu Oct 05, 2023 4:37 am
Forum: Programming
Topic: Assembly: Detect when result rolls over from 255 to 0
Replies: 6
Views: 2252

Re: Assembly: Detect when result rolls over from 255 to 0

srowe wrote: Thu Oct 05, 2023 1:21 am That's precisely what the carry bit is for, so your original code should have been
Sigh.. Of course! Why didn't I see that? Thanks. I'll make a note for next time.
by SparkyNZ
Wed Oct 04, 2023 9:26 pm
Forum: Programming
Topic: Assembly: Detect when result rolls over from 255 to 0
Replies: 6
Views: 2252

Re: Assembly: Detect when result rolls over from 255 to 0

I think I was going about this the wrong way anyway. I've changed my code - now I'm checking for SRC_PTR_LO and DST_PTR_LO becoming zero instead. I'm using LDA (SRC_PTR_LO,y) but just keeping Y as zero the whole time and incrementing SRC_PTR_LO each time instead of using ADC and y as the counter.. I...