rjhelms / compe6502

Homebrew 6502 system
2 stars 0 forks source link

Increase cassette speed #31

Closed rjhelms closed 2 years ago

rjhelms commented 2 years ago

300bps is painful! Theoretically possible to go up to 1200bps without any hardware changes, by reducing bit time from 4 1200Hz cycles to 1.

Any faster requires increasing carrier frequencies, either by increasing system clock or changing divider on VIA card.

rjhelms commented 2 years ago

Increasing cassette speed should be as easy as modifying CHALFWAIT in io_card.s - for 300bps, it's 327 times through the loop. In image tests 82 (#$52) worked for 1200bps.

Also need to modify bin2tape.py - just change SPACE_CYCLES and MARK_CYCLES.

rjhelms commented 2 years ago

1200bps read works OK with files generated PC side - but things output 6502-side can't be read back. Trying 600bps at 163 times through the loop in CHALFWAIT

rjhelms commented 2 years ago

600 bps works.

I think 1200bps is possible, but there's no wiggle room on writes.

1200bps gives 833 cycles to process a bit:

Also a question about phase - cassette output seems phase inverted from what I expect, but I don't know if that matters at all.

Going to set this aside for now, but leave issue open as it would be nice to get 1200bps.

rjhelms commented 2 years ago

With timing as above, 1200bps mostly works - can reliably read PC-generated recordings, can save and read back but is very particular around phase and bandwidth. See 055c7579538378650354119f13585ee5e0b08096.

A few options:

rjhelms commented 2 years ago

Used second approach there, implemented in 5f4873eddd523b7377f6abd29f7ff1c41d057ffe.