Search found 107 matches
- Tue Jul 29, 2025 9:54 pm
- Forum: Programming
- Topic: Stupid Friday discussion: emulating a 6502 on a 6502
- Replies: 11
- Views: 1857
Re: Stupid Friday discussion: emulating a 6502 on a 6502
I did once compile C into Perl. It was just as laughable as you might imagine. C into Java worked rather better (at 30% of native!), but sadly C99 changed the semantics a bit so that you can't do that any more...
- Sun Jul 27, 2025 8:38 pm
- Forum: Programming
- Topic: Stupid Friday discussion: emulating a 6502 on a 6502
- Replies: 11
- Views: 1857
Re: Stupid Friday discussion: emulating a 6502 on a 6502
That looks ideal. But I'm not sure I can use it out-of-the-box; the big per-opcode jump table would occupy 512 bytes of my ~1280 bytes of RAM, and I still need to allocate some buffers for virtual memory etc. I'll need to experiment to see if it'll fit. But it'll certainly make a good place to start ...
- Fri Jul 25, 2025 4:29 pm
- Forum: Programming
- Topic: Stupid Friday discussion: emulating a 6502 on a 6502
- Replies: 11
- Views: 1857
Stupid Friday discussion: emulating a 6502 on a 6502
So I've got this device which is an 8MHz 65c02, with fast storage, but only 2kB of RAM. That's not enough to do anything useful. What if I could virtualise a 6502 on top of the 6502 in order to demand-page storage?
It doesn't actually sound too hard. There's no memory manager, of course, so this is ...
It doesn't actually sound too hard. There's no memory manager, of course, so this is ...
- Sun Jul 20, 2025 2:52 pm
- Forum: General Discussions
- Topic: Found an AliExpress games console based on a blob 8MHz 65c02
- Replies: 3
- Views: 1807
Found an AliExpress games console based on a blob 8MHz 65c02
As title. It's got a 24MHz SPI flash chip for storage and a fast connection to a 160x128 ST7735 screen. There's 2kB of internal RAM and an 8kB ROM containing graphics and sound routines. I think the chip even has a bus interface --- I suspect the ST7735 is connected up to it. Sadly, I don't think ...
- Sat May 24, 2025 11:14 pm
- Forum: Programming
- Topic: Hints on multiplexing multiple timers on a 6522
- Replies: 25
- Views: 7222
Re: Hints on multiplexing multiple timers on a 6522
The disk image has the file ONWARD which is the piece of music in the demo video. If you're not using the disk image, it's in extras/onward-ride.ptr.
- Sun May 18, 2025 8:47 pm
- Forum: Programming
- Topic: Hints on multiplexing multiple timers on a 6522
- Replies: 25
- Views: 7222
Re: Hints on multiplexing multiple timers on a 6522
Yup, that's pretty much it. You're right, a high mark/space ratio gives exactly the same effect as a low mark/space ratio. p-tracker only lets you set it from 0 to 15, but on high notes where the period is short odd things happen. In fact the minimum mark time is so high (one 12529Hz sample) that it ...
- Wed May 14, 2025 10:59 pm
- Forum: Programming
- Topic: Hints on multiplexing multiple timers on a 6522
- Replies: 25
- Views: 7222
Re: Hints on multiplexing multiple timers on a 6522
Oops, I forgot to link to the website: http://cowlark.com/ptracker All the source is on github.
The loops are, in fact, massively unrolled using macros, as a brute-force way to save as many cycles as possible...
.macro synth var, varp, varm
ldx \var ; 3
dex ; 2
zif eq ; 2/3
ldx \varp ; 3 ...
The loops are, in fact, massively unrolled using macros, as a brute-force way to save as many cycles as possible...
.macro synth var, varp, varm
ldx \var ; 3
dex ; 2
zif eq ; 2/3
ldx \varp ; 3 ...
- Tue May 13, 2025 8:28 pm
- Forum: Programming
- Topic: Hints on multiplexing multiple timers on a 6522
- Replies: 25
- Views: 7222
Re: Hints on multiplexing multiple timers on a 6522
Sorry for the lack of response --- I managed to get it working well enough, and got stuck in finishing up the project:
https://www.youtube.com/watch?v=iqWJeM2MKt4
This is doing three-channel polyphony with a PCM drum track (well, PFM or PDM, more like).
It works by using the 6522 shift register ...
https://www.youtube.com/watch?v=iqWJeM2MKt4
This is doing three-channel polyphony with a PCM drum track (well, PFM or PDM, more like).
It works by using the 6522 shift register ...
- Mon May 05, 2025 10:27 am
- Forum: Programming
- Topic: Hints on multiplexing multiple timers on a 6522
- Replies: 25
- Views: 7222
Re: Hints on multiplexing multiple timers on a 6522
I have it working, with three tone channels plus a PCM drum channel. This is using the shift register to actually emit the bits, with an unrolled loop generating the data eight bits at a time. It works, kinda...
Using a byte value as the note counter simply isn't enough precision, and I only get ...
Using a byte value as the note counter simply isn't enough precision, and I only get ...
- Sat May 03, 2025 1:10 am
- Forum: Programming
- Topic: Hints on multiplexing multiple timers on a 6522
- Replies: 25
- Views: 7222
Re: Hints on multiplexing multiple timers on a 6522
Now I think of it I suppose it is PWM; but all the documents about 1-bit music call it PFM... basically, to play a 256Hz note, I'm generating 15us pulses where the leading edges are 3906us apart. So that's 15us with output 1, and 3891us with output 0. I think they do it like this to make mixing ...
- Thu May 01, 2025 10:48 pm
- Forum: Programming
- Topic: Hints on multiplexing multiple timers on a 6522
- Replies: 25
- Views: 7222
Re: Hints on multiplexing multiple timers on a 6522
An audio engineer would certainly take exception to that statement; the ear is _amazingly_ good at hearing jitter; it translates directly as noise...
This apparently turns out to be the case!
Yes, I'm trying to simulate an oscillator. I'm using a technique I learned about recently called PFM ...
This apparently turns out to be the case!
Yes, I'm trying to simulate an oscillator. I'm using a technique I learned about recently called PFM ...
- Thu May 01, 2025 10:03 pm
- Forum: Programming
- Topic: 65C22 Shift Register - Some Guidance, Please?
- Replies: 3
- Views: 3727
Re: 65C22 Shift Register - Some Guidance, Please?
Quote:
I suspect the problem is that you're writing to the SR while it's still busy, and the new byte gets ignored.
- Wed Apr 30, 2025 6:15 pm
- Forum: Programming
- Topic: Hints on multiplexing multiple timers on a 6522
- Replies: 25
- Views: 7222
- Wed Apr 30, 2025 5:40 pm
- Forum: Programming
- Topic: Hints on multiplexing multiple timers on a 6522
- Replies: 25
- Views: 7222
Re: Hints on multiplexing multiple timers on a 6522
This is for a PFM audio engine. Each event is a pulse being generated on the speaker. The timeouts will keep changing as the voices change pitch and timbre.
...so for context, I did this: https://www.youtube.com/watch?v=B_SmzoQJBsQ It's a port of some music and an engine by Tim Follin for the ...
...so for context, I did this: https://www.youtube.com/watch?v=B_SmzoQJBsQ It's a port of some music and an engine by Tim Follin for the ...
- Tue Apr 29, 2025 11:35 pm
- Forum: Programming
- Topic: Hints on multiplexing multiple timers on a 6522
- Replies: 25
- Views: 7222
Hints on multiplexing multiple timers on a 6522
I have four timers, and one 6522. I need to somehow map the four timers onto T1 or T2.
The normal way to do this is to set the hardware timer to min(t1, t2, t3, t4); then, when the timer fires, determine the amount of real time taken, subtract that from the four timers, process any that go negative ...
The normal way to do this is to set the hardware timer to min(t1, t2, t3, t4); then, when the timer fires, determine the amount of real time taken, subtract that from the four timers, process any that go negative ...