Search found 141 matches
- Tue Dec 03, 2013 3:02 pm
- Forum: Programming
- Topic: Senior Moment With SCNKEY
- Replies: 13
- Views: 2303
Re: Senior Moment With SCNKEY
Agreed - but those conditions should either be checked-for in STROUT, or better yet handled outside it. To just arbitrarily enable interrupts in a character-output routine is irresponsible, and is bound to trip people up. Me, for example.
- Tue Dec 03, 2013 2:57 pm
- Forum: Programming
- Topic: A commodore 64 conversion
- Replies: 3
- Views: 1215
Re: A commodore 64 conversion
To echo and possibly extend what others have already said: this is a quick way of stopping and starting the CIA timer whilst switching memory banks. You wouldn't want an IRQ triggering just as you're switching the ROM out, for example, as random code might get executed and almost certainly crash the...
- Sun Dec 01, 2013 11:29 am
- Forum: Programming
- Topic: Senior Moment With SCNKEY
- Replies: 13
- Views: 2303
Re: Senior Moment With SCNKEY
Yep, _STROUT = $CB1E.
Oh holy blap, you're right - interrupts ARE being enabled by _STROUT, as it falls through _SETSPRNT at $E6C5. Why the hell does it do that?? That has got to be a typo in the original ROM source, since it follows a CLC; there's just no reason to do a CLI there.
Oh holy blap, you're right - interrupts ARE being enabled by _STROUT, as it falls through _SETSPRNT at $E6C5. Why the hell does it do that?? That has got to be a typo in the original ROM source, since it follows a CLC; there's just no reason to do a CLI there.
- Sun Dec 01, 2013 5:39 am
- Forum: Programming
- Topic: Senior Moment With SCNKEY
- Replies: 13
- Views: 2303
Re: Senior Moment With SCNKEY
Alright, here you go - the code from the beginning to the point where I'd do some relocation of the IRQ routine based on the selection. This is running on a standard 8K-expanded VIC, with a BASIC line stub just before this with a SYS pointing at 'begin'. The program is loaded as a normal .PRG at $12...
- Sun Dec 01, 2013 4:04 am
- Forum: Programming
- Topic: Senior Moment With SCNKEY
- Replies: 13
- Views: 2303
Re: Senior Moment With SCNKEY
Oh yes, quite definitely; this is the initialisation phase of something that runs in the IRQ, so my very first instruction is SEI because I'm twiddling the IRQ vector. In any case, the entire ROM is pretty-much thread- un safe, so it's not an assumption I would ever make. ;) In fact, the keypress ch...
- Sat Nov 30, 2013 12:58 pm
- Forum: Programming
- Topic: Senior Moment With SCNKEY
- Replies: 13
- Views: 2303
Re: Senior Moment With SCNKEY
Because it's SCNKEY that updates $CB and $C5. The keycode for the current keypress is read from the keycode table based on the VIA port-scan result and dropped into $CB - this is then checked against $C5 which holds the keycode from the previous SCNKEY pass, to see if auto-repeat is needed. The last...
- Sat Nov 30, 2013 7:26 am
- Forum: Programming
- Topic: Senior Moment With SCNKEY
- Replies: 13
- Views: 2303
Senior Moment With SCNKEY
As per the title, I'm convinced I'm having a senior moment with SCNKEY at $EB1E; I've obviously just forgotten something elementary here and can't see the wood for the trees. Running this is VICE is doing something odd: ; wait for selection .waitkey jsr _SCNKEY ; [6] scan keyboard lda _KEYPRESS ; [3...
- Sat Nov 30, 2013 6:46 am
- Forum: Programming
- Topic: Challenge: Create or Delete Lines from inside a program
- Replies: 27
- Views: 4666
Re: Challenge: Create or Delete Lines from inside a program
The internal memory structure of BASIC program storage is pretty straight-forward - hit TVR or PRG for details. There are a slew of ROM routines for adding, inserting and removing lines (and taking care of the appropriate pointers) which the screen editor calls to make things happen and which you co...
- Wed Nov 27, 2013 6:53 am
- Forum: Programming
- Topic: Checking Free RAM in ML
- Replies: 21
- Views: 4054
Re: Checking Free RAM in ML
SEI is really only necessary when you're either doing something that alters the IRQ vector, or running a process that is highly time-critical and must not be interrupted by an ISR. For a background process like this, you'd want an SEI in the initialisation step because you're twiddling the vector; y...
- Tue Nov 26, 2013 6:11 pm
- Forum: Programming
- Topic: Checking Free RAM in ML
- Replies: 21
- Views: 4054
Re: Checking Free RAM in ML
I'd agree with including CLD in the code, as an ISR doing arithmetic should ensure the CPU decimal mode is set as it expects, rather than assuming the rest of the system (and any other user code running in it) always uses the same setting. However, pushing those ZP bytes to the stack seems a little ...
- Tue Sep 17, 2013 1:58 pm
- Forum: Programming
- Topic: One hour of digitized music for your Vic-20
- Replies: 44
- Views: 11960
The forced saving and restoring of the registers needs a lot of cycles, while the Flag byte I mentioned earlier could easily be set without touching any registers (with SEC:ROR Flag, for example) ... :( You can't do anything about the saving of registers to the Stack when $FF72 kicks-in, but you do...
- Wed Aug 28, 2013 3:03 am
- Forum: Programming
- Topic: 6502 asm - Swapping pairs of bits
- Replies: 13
- Views: 1654
I'm convinced this can be done more efficiently with an EOR trick. I'll try to find some time to work on it :) Yep, my thoughts too - I wrote a sample last night, but couldn't get it below 31 bytes and 40-odd cycles before I had to quit, so didn't post it as Wimoos routine was shorter and faster. I...
- Thu Jun 06, 2013 12:24 pm
- Forum: Programming
- Topic: Strange Exponent Issue
- Replies: 5
- Views: 1455
Re: Strange Exponent Issue
Indeed. Also, you may not have realised that the 'microcode' that drives all modern processors is actually 6502 assembly.RJBowman wrote:It is a little known fact that the first Pentiums were prototyped using a modified VIC-20.Nibby99vic wrote:7^2 should be 49 not 49.0000001 shouldn't it?]
- Thu May 30, 2013 12:42 pm
- Forum: Programming
- Topic: ** New Frontiers in VIC-Hires-Graphics, Part 15
- Replies: 17
- Views: 9604
- Thu May 30, 2013 11:45 am
- Forum: Programming
- Topic: ** New Frontiers in VIC-Hires-Graphics, Part 15
- Replies: 17
- Views: 9604
Hmm. $9000 means either a change to the visible-area screen x-position, or a flip of the interlace bit. If this is a PAL access diagram, we can discount the latter. So you're tweaking the screen-x position, and afterwards you tell the VIC to look in an alternate location for data and colour... You'r...