Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user Marksman ! (Registered 2017-10-23) You are not logged in 
CSDb User Forums


Forums > C64 Coding > Spacebar interrupt
2017-09-29 22:14
lft

Registered: Jul 2007
Posts: 303
Spacebar interrupt

I just realised that you can get an interrupt when the user presses space. That could be useful for instance if you're making a megademo and you have a sample-player part that uses every single clock cycle, but you don't want to put it at the very end of the demo.

The idea is to set $dc00 to $7f to enable the keyboard row that has the spacebar in it. Space is in bit #4, and keys are active-low. But bit #4 is also the fire-button of gameport 1. And the fire-button of gameport 1 is also the lightpen input. And you can configure VIC to generate an interrupt when there is a negative edge on the lightpen input.

Has anybody used this trick before? It works on real hardware, and vice emulates it correctly.
2017-09-29 22:35
Groepaz

Registered: Dec 2001
Posts: 8222
you are basically using the stable-raster-with-lightpen-trigger - backwards? funny idea
2017-09-29 22:46
Stein

Registered: Oct 2006
Posts: 117
Haha that's awesome. Still we learn new tricks from this machine :)

My main machine has a Shift Lock non-maskable interrupt. Nah ok, the Restore key broke, so I rewired it to the only useless key on the keyboard :P
2017-09-29 22:52
Frantic

Registered: Mar 2003
Posts: 1310
Great! :) I hope this means more megademos in the future.
2017-09-30 10:46
Oswald

Registered: Apr 2002
Posts: 4094
this was already discovered by someone, remember of hearing (seeing?) a trick of using the VICII to read the spacebar somehow, finally I know how it is done :)
2017-09-30 11:25
tlr

Registered: Sep 2003
Posts: 1123
Brilliant! Then we can finally have spacebar exit for intros like this: Frankie Goes To Hollywood :)
2017-10-06 19:57
Slajerek

Registered: May 2015
Posts: 26
Lol. Awesome idea :)
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Trash
Steel/SCS & TRC/G★P
LocalH/BCI
Kakka/Extend, Damone..
pcollins/Excess
Scooby/Light
JEZ
Jazzcat/Onslaught
Metal Maniac/Dual Crew
Grue
Tom-Cat/Nostalgia
Skrjablin/Hokuto Force
Guests online: 63
Top Demos
1 Uncensored  (9.7)
2 Edge of Disgrace  (9.7)
3 Coma Light 13  (9.6)
4 The Shores of Reflec..  (9.6)
5 Lunatico  (9.6)
6 Quad Core 100%  (9.5)
7 Comaland 100%  (9.5)
8 Incoherent Nightmare  (9.5)
9 Wonderland XII  (9.5)
10 Comaland  (9.5)
Top onefile Demos
1 Pandemoniac Part 2 o..  (9.6)
2 Synthesis  (9.6)
3 Dawnfall V1.1  (9.5)
4 Daah, Those Acid Pil..  (9.5)
5 Treu Love [reu]  (9.4)
6 Field Sort  (9.4)
7 Dawnfall  (9.3)
8 KAOS 64  (9.3)
9 Hardware Accelerated..  (9.2)
10 Globe 2016 [reu]  (9.2)
Top Groups
1 Booze Design  (9.4)
2 Pond  (9.4)
3 Censor Design  (9.4)
4 Oxyron  (9.4)
5 Crest  (9.3)
Top Hardware-Gurus
1 Soci  (9.9)
2 Wiesel  (9.9)
3 Grue  (9.8)
4 Zer0-X  (9.8)
5 Lemming  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2017
Page generated in: 0.259 sec.