Detecting tape signal

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

Detecting tape signal

Post by Symoon » Sun Sep 09, 2007 5:11 pm

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: 331
Joined: Wed Jun 13, 2007 8:20 pm
Location: FRANCE, Paris

Post by waskol » Sun Sep 09, 2007 6:15 pm

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: 352
Joined: Tue Nov 07, 2006 7:38 am

Post by JamesD » Sun Sep 09, 2007 10:27 pm

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
Flying Officer
Posts: 212
Joined: Thu Sep 21, 2006 7:45 pm
Location: 26000 Valence, FRANCE
Contact:

Post by mmu_man » Mon Sep 10, 2007 8:39 pm

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: 2314
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug » Mon Sep 10, 2007 11:12 pm

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: 1077
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Post by Symoon » Mon Sep 10, 2007 11:25 pm

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 » Mon Oct 15, 2007 10:48 am

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

Who is online

Users browsing this forum: No registered users and 1 guest