Detecting tape signal

Here you can ask questions or provide insights about how to use efficiently 6502 assembly code on the Oric.
User avatar
Symoon
Archivist
Posts: 2307
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Detecting tape signal

Post by Symoon »

Hi,

No sure where to post this question, but anyway.
Is it possible to run a program, and at the same time detect if the Oric is recieving information on the tape plug, then switch the Oric to CLOAD mode ?

Cheers
Simon
User avatar
waskol
Flight Lieutenant
Posts: 414
Joined: Wed Jun 13, 2007 8:20 pm
Location: FRANCE, Paris

Post by waskol »

I would say yes, and I think it implies enabling of interrupts...

May be you should have a look in the book of Geoff Philips (Graphics and Machine codes techniques)
JamesD
Flight Lieutenant
Posts: 358
Joined: Tue Nov 07, 2006 7:38 am

Post by JamesD »

Since most tape interfaces are just "bit banger" serial ports with analog in/out you'll miss data if it isn't done correctly and the load will fail.

I don't know about the Oric but the other machines I've used have a tape header of sorts than you could detect in an interrupt. However, most load routines in ROM expect to see the start of that header which may make the load fail if it doesn't catch it soon enough.

If it does fail you should look at a disassembly of the tape routines for the Oric. You may be able to read the header portion yourself and then jump directly to the location in ROM after you read the header.

I don't think you will need to do that since you will probably sample off of an interrupt that takes place much faster than you'll ever get past the header on the tape.
mmu_man
Flight Lieutenant
Posts: 322
Joined: Thu Sep 21, 2006 7:45 pm
Location: 26000 Valence, FRANCE
Contact:

Post by mmu_man »

The ORIC puts several SYNC bytes before the tape header, it should be possible to check the VIA inputs in a periodic interrupt.
It might even be possible to ask the VIA to interrupt the cpu on a specific change, not sure.
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

It's probably possible to output a custom special sync signal before the normal file header, and switch to normal cload code when this signal is detected :)
User avatar
Symoon
Archivist
Posts: 2307
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Post by Symoon »

Thanks for the replies.
There are plenty of synch bytes in the standard signal that should avoid any data loss.
It's also possible to shorten it (by reprogramming the loading routines) according to the Oric's detection speed.

Now I guess I have to learn how interrputs can be programed :)
mcoder
Private
Posts: 6
Joined: Sat Oct 13, 2007 7:53 pm

Post by mcoder »

Symoon wrote:Thanks for the replies.
There are plenty of synch bytes in the standard signal that should avoid any data loss.
It's also possible to shorten it (by reprogramming the loading routines) according to the Oric's detection speed.

Now I guess I have to learn how interrputs can be programed :)
I wrote such a tape loader with interrupts for my game One.
This was because I put an animation (a sprite and a scroll) and some music while loading.
I should have the listings somewhere, if you want them.

JC
Post Reply