Search found 4671 matches

by Mike
Tue Aug 27, 2013 5:26 pm
Forum: Programming
Topic: 6502 asm - Swapping pairs of bits
Replies: 13
Views: 1634

Hmm..., this one employs an EOR mask, but it's longer and needs two temporaries: STA temp LSR A EOR temp AND #$55 STA temp2 ASL A ORA temp2 EOR temp If you don't mind undocumented opcodes, you can replace the instruction pair ASL A/ORA temp2 with SLO temp2 . The instruction pair LSR A/EOR temp also ...
by Mike
Tue Aug 27, 2013 2:14 pm
Forum: Programming
Topic: 6502 asm - Swapping pairs of bits
Replies: 13
Views: 1634

@wimoos: How about these two? LDX #4 ASL A .loop PHP ASL A ADC #0 PLP ROL A DEX BNE loop TAY AND #$55 ASL A STA temp TYA AND #$AA LSR A ORA temp ;) This would be time critical so perhaps a look up table might be a good idea, although I would need a separate table per required set of mappings I guess...
by Mike
Tue Aug 27, 2013 1:37 pm
Forum: Programming
Topic: 6502 asm - Swapping pairs of bits
Replies: 13
Views: 1634

wimoos wrote:How about this one ? Source and destination both kept in A
It does not work as intended.

%01 and %10 are mapped to %01 and %11 is mapped to %10.
by Mike
Tue Aug 27, 2013 12:35 pm
Forum: Programming
Topic: 6502 asm - Swapping pairs of bits
Replies: 13
Views: 1634

That's a nice solution indeed. It uses the Accumulator as temporary storage for the carry flag (ROL A and LSR A could be replaced by PHP and PLP to illustrate that better, but that would of course cost some cycles). And no need to load A with 0 four times My variant is slightly more flexible though,...
by Mike
Tue Aug 27, 2013 12:10 pm
Forum: Programming
Topic: 6502 asm - Swapping pairs of bits
Replies: 13
Views: 1634

If it has to be fast , don't bother with saving memory. Use a table with all 256 byte values. Otherwise: LDX #4 LDA #0 .loop ASL src ROL A ASL src ROL A TAY LDA table,Y ASL A ROL dst ASL A ROL dst DEX BNE loop .table EQUB &00:EQUB &80:EQUB &40:EQUB &C0 Ideally, 'src' and 'dst' should...
by Mike
Mon Aug 26, 2013 3:55 pm
Forum: Other Systems
Topic: This never made it to VIC?
Replies: 11
Views: 2408

RJBowman wrote:Maybe someone could make a Q-Bert game that doesn't look like crap.

Or Mappy; one of my all time favorites.

Or an all-text downhill skiing game in BASIC. Yeah, someone should do that.
I'm glad you volunteer to spend some of your precious spare time to make all these games happen. :P
by Mike
Mon Aug 26, 2013 3:05 pm
Forum: Hardware and Tech
Topic: Metal lable on older carts for RF shielding?
Replies: 5
Views: 1096

The metal labels cannot shield RF. For this to work well, even connecting the labels to ground would not be sufficient, it also would have required a completely metalized cartridge case. For a similar reason, the metalized cardboard 'RF shield' is not effective, as the RF can leak out to all sides: ...
by Mike
Sun Aug 25, 2013 5:37 am
Forum: Games
Topic: [**Commercial Release Is Now Available**] Realms of Quest IV
Replies: 140
Views: 44490

metalfoot76VIC wrote:I really need to get my creative juices flowing and make something [...]
Albert Einstein wrote:Work is 1% inspiration plus 99% transpiration.
;)
by Mike
Sat Aug 24, 2013 5:15 am
Forum: General Topics
Topic: Where can I download SJLOAD for Vic-20?
Replies: 16
Views: 1811

Would [SJLoad-20 V8] also work with a "standard" RAM-expansion from $9800-$a000 or even from a ROM placed there? Most probably, yes. Boray, as an example of use I had SJLoad-20 V7 integrated into my panning VFLI viewer . Here the $B000 version (slightly renamed) is put on the *.d64, and v...
by Mike
Sat Aug 24, 2013 3:32 am
Forum: General Topics
Topic: Where can I download SJLOAD for Vic-20?
Replies: 16
Views: 1811

Here's my mirror copy of SJLoad-20 V7.
by Mike
Sat Aug 24, 2013 3:26 am
Forum: General Topics
Topic: Where can I download SJLOAD for Vic-20?
Replies: 16
Views: 1811

Here's SJLOAD-20 V7 (d/l at the end of first post). It comes with 2 pre-assembled binaries which load to $0400 or $B000, and are started with SYS1024 and SYS45056, respectively. The $0400 version can effectively hide in the lower 3K area, when that one is blocked from BASIC use by a RAM expansion in...
by Mike
Fri Aug 23, 2013 8:17 am
Forum: Programming
Topic: Software sprites?
Replies: 175
Views: 114887

Mike, thanks for clarifying, but could you dump how the VIC registers might look to accomplish that >512-byte screen space? I would not mind seeing that in action, and perhaps account for it in macro assembly? There's nothing special about this. You specify the number of rows and columns to display...
by Mike
Thu Aug 22, 2013 1:55 pm
Forum: Programming
Topic: Software sprites?
Replies: 175
Views: 114887

Re: Screen Geometry

Typically, yes, because VIC is limited to 2-pages (512 bytes). [...] Actually, it isn't. You can easily define, say, a 26x32 characters screen and use all 832 bytes. That's what Torsten and I used all the time to provide the address generating text screen for the overscan bitmaps we did lately, but...
by Mike
Sun Aug 18, 2013 3:02 pm
Forum: General Topics
Topic: Wizard of Wor for VIC-20 FOUND!
Replies: 105
Views: 25019

The ROM chip reads: MOS 325338-01 8-43 3142 At least the 325338-01 puts it somewhere in the range of other ROMs for VIC-20 cartridges (I checked against a MOS chip list). The other figures form no discernible date code, though. In any case, the solder blobs put the ROM into BLK2 and BLK3, so this ca...
by Mike
Sat Aug 17, 2013 4:11 pm
Forum: Programming
Topic: Absolute Value
Replies: 2
Views: 844

For abs(x2-x1), I'm using this code snippet in my Bresenham line plotters:

Code: Select all

 SEC
 LDA x1
 SBC x2
 BCS positive
 EOR #$FF     ; C flag is clear here,
 ADC #$01     ; form two's complement
.positive
 STA dx
... with the absolute value now being stored in dx. x1 and x2 are both unsigned 8-bit values.