the reset vector

A place to discuss everything Dragon related that doesn't fall into the other categories.
Post Reply
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

the reset vector

Post by jedie »

From where comes the addresses in the reset vectors ?

From: viewtopic.php?f=5&t=4308&p=9231#p9230
tormod wrote:The CPU looks at the reset vector at $fffe when it is reset. On the Dragon/CoCo $fff0-$ffff is a mirror of $bff0-$bffe (I think the SAM does this). The emulator should do it the same way to work correctly with any ROM.
So the vecors are just harcoded in the ROM at $bff0-$bffe and just mirrored by SAM ?

Have the 6809 hardcoded addresses and the SAM overlay them?
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Re: the reset vector

Post by jedie »

Ah, i found it in the ROM listings... e.g.: D32:

Code: Select all

BFF0  0000                    neg     <$00
BFF2  0001                    neg     <$01
BFF4  0001                    neg     <$01
BFF6  0301                    com     <$01
BFF8  0F01                    clr     <$01
BFFA  0C01                    inc     <$01
BFFC  0601                    ror     <$01
BFFE  09B3                    rol     <$b3
Simple6809 (based on CoCo Color BASIC):

Code: Select all

5389                         * INTERRUPT VECTORS                      
5390 fff0                              ORG  $FFF0           
5391 fff0 00 00              LBFF0     FDB  $0000          RESERVED 
5392 fff2 00 9b              LBFF2     FDB  SW3VEC         SWI3 
5393 fff4 00 9e              LBFF4     FDB  SW2VEC         SWI2 
5394 fff6 00 aa              LBFF6     FDB  FRQVEC         FIRQ 
5395 fff8 00 a7              LBFF8     FDB  IRQVEC         IRQ 
5396 fffa 00 a1              LBFFA     FDB  SWIVEC         SWI 
5397 fffc 00 a4              LBFFC     FDB  NMIVEC         NMI 
5398 fffe db 46              LBFFE     FDB  RESVEC         RESET 
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Re: the reset vector

Post by jedie »

tormod wrote:The CPU looks at the reset vector at $fffe when it is reset. On the Dragon/CoCo $fff0-$ffff is a mirror of $bff0-$bffe (I think the SAM does this). The emulator should do it the same way to work correctly with any ROM.
I now do this with https://github.com/jedie/DragonPy/commi ... c393ec5653

Loggin output for this is for Dragon 32/64:
read interrupt vector $fffe redirect in SAM to $bffe use value $b3
read interrupt vector $ffff redirect in SAM to $bfff use value $b4
So, PC set to $b3b4

and CoCo:
read interrupt vector $fffe redirect in SAM to $bffe use value $a0
read interrupt vector $ffff redirect in SAM to $bfff use value $27
PC set to $a027
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
Post Reply