- Don't call any ROM routines or see bellow
- Don't call sedoric routines
- Don't call Microdisc eprom : you don't have eprom on telestrat, telestrat boot on the floppy from a cardridge. It means that the cardridge (mainly stratoric or stratsed) reads boot sector. On the atmos/microdisc, eprom on floppy controller override internal rom to read the boot sector.
- If you use overlay RAM, you have to detect if you are on an oric -1/atmos or telestrat. To switch to ram overlay on the telestrat, you have to set bit 0, bit 1, bit 2 to 0 on the port A of the second via ($320) on the telestrat (Don't forget to SEI and set IRQ vectors).
- For Telestrat : if you have to manage IRQ (CPU receives an IRQ in the code), you should stop IRQ from VIA2. It can generate IRQ from VIA2 timers (or others stuff). If you don't inhibits this second via, you could received some IRQ from this via which could crash your code. Telemon (telestrat) does not have the same IRQ vectors than atmos, please load irq vector with CPU irq vector !
You have to do 2 versions, but you can have one source code (you can detect telestrat, to have one object). You could do one version, but it means that any routine have to be in RAM
You have to know that
Sample to have different version of rom (telemon/atmos) these sample does not work if you redirect IRQ vectors except if you finished by a jmp ! :
#ifdef TARGET_TELEMON #include "include\macro_telemon_compat.h" #else #include "include\macro_basic1_1_compat.h" #endif CALL_TEXT ; Macro it's in macro_telemon_compat.h and macro_basic1_1_compat.h ; setup IRQ (works for telemon, atmos and oric-1 #define source $d0 ; **************** setup IRQ and keep old IRQ for telemon vectors ! sei lda $FFFE sta source lda $FFFF sta source+1 ldy #00 lda #$4C sta (source),y iny lda (source),y ; save old vector sta keep_telemon_vectors_IRQ_BRK+1 lda #<IRQDriver sta (source),y iny lda (source),y ; save old vector high sta keep_telemon_vectors_IRQ_BRK+2 lda #>IRQDriver sta (source),y cli ; **************** Read keyboard from telemon vectors ! ; I want to read keyboard #ifdef TARGET_TELEMON wait_key CALL_READKEYBOARD ; macro from compat header cmp #" " ; space ? Acculator A contains ascii of the bne wait_key #endif rts IRQDriver keep_telemon_vectors_IRQ_BRK ; in this case all BRK calls for telemon works jmp $0000 rti end_of_code #ifdef TARGET_TELEMON routine_compat_telemon.s #endif
It's a bit hard to detect if you are on a telestrat, here are some tips
- The telestrat has a second via. You can detect if you have a second via (You can test timers or any others things), it's not the best way to detect a telestrat