Search found 13 matches

by Kallikak
Tue Jun 23, 2009 9:57 pm
Forum: Hardware
Topic: Testing some timings
Replies: 1
Views: 1709

Testing some timings

I've just tried a little circuit on my Replica 1 using a 74LS377 and some LEDs to test something else I want to build. I tied the 377 enable to /A000 from the Replica 1 expansion - this signal goes low when I write to any Axxx address. Then I simply connect the data bus from the 6502 to the inputs ...
by Kallikak
Mon Oct 09, 2006 2:48 am
Forum: Programming
Topic: rand() % 192
Replies: 10
Views: 8682

If your rand() implementation is not too expensive, I'd also suggest just looping until acceptable (though if the range is narrow, consider the best 'n' bits only - e.g. the high bits if you're using a simple LCG algorithm).

The % operator is fundamentally a division, and that's slow on the 6502 ...
by Kallikak
Mon Oct 09, 2006 1:55 am
Forum: Hardware
Topic: Looking for sound generation suggestions
Replies: 17
Views: 17415

Thanks for the many and varied suggestions!

Ken
by Kallikak
Wed Oct 04, 2006 1:04 am
Forum: Hardware
Topic: Looking for sound generation suggestions
Replies: 17
Views: 17415

Looking for sound generation suggestions

Hi,

I thought I'd ask for suggestions about adding sound to my 6502 SBC (a Replica 1). Specifically, I want it to be a fairly minimal board that I could connect to the expansion interface. This is really just to amuse my kids, so it doesn't need to be polyphonic - even just a few notes would do ...
by Kallikak
Wed Aug 30, 2006 11:07 pm
Forum: Programming
Topic: [ANN] Replica 1 hosted 6502/65C02 assembler
Replies: 0
Views: 3814

[ANN] Replica 1 hosted 6502/65C02 assembler

Some of you may remember a couple of my earlier threads asking for some programming advice, well, building this assembler was the reason. I bought one of Vince Briel's Replica 1 kits earlier this year, and wanted to be able to program it in assembly language directly. So I taught myself 6502 ...
by Kallikak
Tue May 02, 2006 4:46 am
Forum: Programming
Topic: Help finding the correct compiler
Replies: 5
Views: 3936

Presumably he's cross-compiling.
by Kallikak
Sun Apr 30, 2006 1:36 am
Forum: Programming
Topic: Sign extension question
Replies: 7
Views: 6051

Nice - thanks. Not only short and clear, but also avoids using X, so you've saved me quite a few bytes there.

Ken
by Kallikak
Sat Apr 29, 2006 12:16 pm
Forum: Programming
Topic: Sign extension question
Replies: 7
Views: 6051

Sign extension question

Hi,

I need to add a signed 8 bit number (in zero page location TEMP1) to a stored 16 bit number (in zero page locations LVALL,H). Below is my current method. I was wondering if anyone had any suggestions or improvements.

ADD16X
LDX #$00
LDA TEMP1 ; signed 8 bit number
CMP #$00
BPL .CONT
DEX ...
by Kallikak
Wed Mar 29, 2006 10:53 am
Forum: Programming
Topic: Advice on bit manipulation
Replies: 14
Views: 7318

Most entertaining thread ever. I don't think I'll ever enjoy assembly programming on any other processor as much as on the 6502. What fun.
I've certainly enjoyed it, and learnt a lot - which was of course the idea. I'm writing an assembler to use with my Apple-1 replica, and the problem comes from ...
by Kallikak
Tue Mar 28, 2006 1:02 am
Forum: Programming
Topic: Advice on bit manipulation
Replies: 14
Views: 7318

Looks like it. :-)

This is a good way for me to learn I think. :-)
by Kallikak
Tue Mar 28, 2006 12:07 am
Forum: Programming
Topic: Advice on bit manipulation
Replies: 14
Views: 7318

Hmmm, sorry if I'm misunderstanding something (as I said, I'm fairly new to 6502 assembly), but your last two instructions - the AND and ORA won't change temp, only A. So if the result is in temp, you could stop earlier!

I understand what you're doing. You put 00000100 in temp, and then copy the ...
by Kallikak
Mon Mar 27, 2006 11:47 pm
Forum: Programming
Topic: Advice on bit manipulation
Replies: 14
Views: 7318

Thanks very much - that does help. I think you mean result in A though.

Ken
by Kallikak
Mon Mar 27, 2006 11:00 pm
Forum: Programming
Topic: Advice on bit manipulation
Replies: 14
Views: 7318

Advice on bit manipulation

Hi,

I'm relatively new to 6502 assembly, but since I built a Replica-1 (Apple-1 clone) in January, I've been doing quite a lot. What I need to do at the moment, is to transform a byte of the form "XXXY YYZZ" to "001Z ZXXX", and various similar operations. Now I can obviously do this with various ...