Search found 4674 matches

by Mike
Thu Mar 14, 2013 9:24 am
Forum: Programming
Topic: Poxels splash screen + animation
Replies: 30
Views: 6030

When I wrote about the 88 character limit, I didn't mean the character count inside the quotes, or the length of the tokenized line in memory, but the total length of the BASIC line when LISTed. Now most of the lines exceed that limit and you can't edit them anymore. :( And, please, what's the reaso...
by Mike
Thu Mar 14, 2013 12:56 am
Forum: Programming
Topic: Alternatives to FOR duration loops?
Replies: 13
Views: 1431

Re: Alternatives to FOR duration loops?

I want something longer than a second. Let's say three or five seconds. [...] I would use it to set pace/rhythm in a game. If you can guarantee, that all actions up to the next delay take less than around 4 seconds, bit 0 (value 1) in the mid-byte of the jiffy clock might do the job: it changes fro...
by Mike
Wed Mar 13, 2013 4:42 pm
Forum: Programming
Topic: Alternatives to FOR duration loops?
Replies: 13
Views: 1431

I still prefer not messing around with the jiffy clock. For another example, here's the intro sequence of VICtoria Gold Edition: 590 @RETURN:DN=PEEK(186):@LOAD"TITLE 1",DN:T1=TI 600 OPEN2,DN,2,"FILL DATA,S,R" 610 FORR=1TO23:INPUT#2,R$(R,1),R$(R,0):NEXT 620 CLOSE2 630 IFABS(TI-T1)...
by Mike
Wed Mar 13, 2013 6:26 am
Forum: Programming
Topic: Poxels splash screen + animation
Replies: 30
Views: 6030

Don't bother. I just checked the speed difference between a screen built up from single line PRINTs (without any control characters) and triple-line PRINTs (also without control characters, the last PRINT doing two lines), each done in a loop 100 times: 1 line PRINTs: 1158 jiffies, 3 line PRINTs: 10...
by Mike
Wed Mar 13, 2013 4:54 am
Forum: Programming
Topic: Poxels splash screen + animation
Replies: 30
Views: 6030

a simple optimization [...] would be to put two drawing lines on a single line of code The converter optimizes already a lot by leaving out {RVS ON} and {RVS OFF} control characters, when they're not necessary. But in the worst case, a single line could still contain 22 control characters, 22 print...
by Mike
Wed Mar 13, 2013 3:07 am
Forum: Programming
Topic: Alternatives to FOR duration loops?
Replies: 13
Views: 1431

I've been searching memory locations for some value that naturally progresses in such a way that I could use WAIT. I still haven't found anything. This is how WAIT works: it takes up to three parameters, an address, an AND-mask, and an optional EOR-value. The address is read, then bits are toggled ...
by Mike
Tue Mar 12, 2013 2:14 pm
Forum: Programming
Topic: MG Text Edit
Replies: 15
Views: 6592

After a short exchange with darkatx over PM, I was finally able to find the source of the problem: the @LOAD command continues even when an error occured during load, it then activates the graphics screen automatically, with whatever is present in memory to display. Now, when one makes a typo and en...
by Mike
Mon Mar 11, 2013 2:53 pm
Forum: Programming
Topic: Commodore FREE One Liners competition.
Replies: 55
Views: 7821

Unfortunately, I lose line 0 when I type it as in the screenshot, in Vice. That has nothing to do with VICE, this also happens on a real VIC-20: the cursor must be within one of the physical lines of a logical line to enter that logical line into memory when RETURN is pressed. I suppose you pressed...
by Mike
Mon Mar 11, 2013 9:13 am
Forum: Programming
Topic: Poxels splash screen + animation
Replies: 30
Views: 6030

Not quite two dozen lines, but nonetheless... here's pgm2chunky.prg ( download ). It expects a 44x46 pixels *.pgm file as input, and emits a *.prg file. A first some initialisations for all possible 2x2 groupings of chunky pixels in string form (G$) and screen code (G%()): 10 DIMG%(15),S%(1,1),C%(1)...
by Mike
Sun Mar 10, 2013 10:38 am
Forum: Programming
Topic: ** New Frontiers in VIC-Hires-Graphics, Part 13
Replies: 21
Views: 10826

I would never of thought the VIC could display images of such quality. You must have missed the entire development over the last three years, where Torsten and I went all the way up to MAXIGRAFIK , MFLI , MIFLI and - with a small hardware modification - VFLI . Finally, I could feed back some algori...
by Mike
Sun Mar 10, 2013 10:25 am
Forum: Programming
Topic: Tile draw code optimization help
Replies: 8
Views: 2106

what I meant was all the four chars that make up the tile are the same colour, each tile can be a different colour. I missed that somehow. You can fetch the tile colour from another table and then put it into another ZP address, changing: STA tile_ptr LDA #0 to STA tile_ptr STA tile_colour LDA #0 i...
by Mike
Sun Mar 10, 2013 9:14 am
Forum: Programming
Topic: Tile draw code optimization help
Replies: 8
Views: 2106

Not much faster, and untested, but you might try out this one instead: ; ***************************** ; * Draw 2x2 Tile on screen * ; * A = Tile Number * ; * X = Column 0-20 * ; * Y = Row 0-21 * ; ***************************** STA tile_ptr LDA #0 ASL tile_ptr:ROL A ASL tile_ptr:ROL A STA tile_ptr+1...
by Mike
Sun Mar 10, 2013 4:55 am
Forum: Programming
Topic: Poxels splash screen + animation
Replies: 30
Views: 6030

Works but a bit memory heavy. This method takes away 2K just for a constant definition of the character set, and then you still have to add in the screen data. IMO, using a bitmap (like MINIGRAFIK/MINIPAINT) or doing 'sparse' hires displays (like Ghislain does in his splash screens) makes better us...
by Mike
Sun Mar 10, 2013 4:27 am
Forum: Programming
Topic: Alternatives to FOR duration loops?
Replies: 13
Views: 1431

OMG, ML code tucked away in a REM statement...LOL... Take a look here for a similar feat for a joystick decoding routine. ;) You just have to take care, that the ML code does not contain any null bytes, as these would be interpreted as end-of-line (and the two following bytes would be changed by th...
by Mike
Sun Mar 10, 2013 4:10 am
Forum: Programming
Topic: The limitations of Austro compiler
Replies: 13
Views: 2725

Well there's always cc65, but that's a cross-compiler and different language of course. Most of the speed enhancements of Austro-Comp stem from: - pre-evaluating constants (so it's not 'necessary' anymore to put often used values into variables), - calling the arithmetic routines in the BASIC interp...