Strange registered users?

A forum for members to discuss this site, offer suggestions for improvement etc.
pser1
Posts: 1665
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: Strange registered users?

Post by pser1 »

Hello,
I'm sure you heard about the problems with packs coming from China to Europe.
Mine has arrived on wednessday, 7th
Now I have 2 HD63B09 and 2 HD63C09
If nothing interferes, tomorrow I will put one of them in a Dragon64.
By the way, after reading some info about HD6309 it seems that the two extra 8 bit registers that go to the stack in case an IRQ / FIRQ arises have to be taken into account.
Has anybody taken the time to modify the Basic ROM's and/or the DOS one?
I know that to work like a 6809 there will be no problems, but when switching to native mode I heard that it could hang in any IRQ call.
Hopefully Sunday or Monday night I am going to tell you that everything performed OK.
We could speak thereafter about what could be done to work safely in native mode
Pere
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: Strange registered users?

Post by zephyr »

pser1 wrote:Hello,
I'm sure you heard about the problems with packs coming from China to Europe.
Mine has arrived on wednessday, 7th
Now I have 2 HD63B09 and 2 HD63C09
I hope they are HD63x09E's! ;)
pser1 wrote: By the way, after reading some info about HD6309 it seems that the two extra 8 bit registers that go to the stack in case an IRQ / FIRQ arises have to be taken into account.
Has anybody taken the time to modify the Basic ROM's and/or the DOS one?
I know that to work like a 6809 there will be no problems, but when switching to native mode I heard that it could hang in any IRQ call.
I haven't checked DragonDOS but IIRC, the BASIC PLAY command is the only thing that freezes in 6309 native mode.
pser1 wrote: If nothing interferes, tomorrow I will put one of them in a Dragon64.
From unscrewing the top cover to powering-up with the new CPU fitted only takes about five minutes, but be very careful to insert the 63x09E the right way round in the socket.
pser1
Posts: 1665
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: Strange registered users?

Post by pser1 »

I have received HD63C09EP and HD63B09EP, hope they could be used instead of our MC6809
Do you know if there is any problem with these parts?
I have been searching for places where BASIC and DOS do have a RTI code (&H3B), these are the ones that a BASIC program has detected:
9D42 rti - Interrupt from PIO 0 CB1 (9D3D - 9D50)
AFF5 rti - Entry Point of Interrupt Rutine (AFD9 - AFF5) - affects PLAY
B46E rti - FIRQ Rutine (B469 - B486)
BB0C rti - Entry Point for Sound Interrupt (BB02 - BB0C)
BF31 rti - IRQ Rutine from ACIA (BF20 - BF48)
C7B6 rti - Maybe not an actual RTI, just does a TST on FF21 and FF23 (C7B0 - C7B6)
Pere
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: Strange registered users?

Post by zephyr »

pser1 wrote:I have received HD63C09EP and HD63B09EP, hope they could be used instead of our MC6809
They are correct.
pser1 wrote: I have been searching for places where BASIC and DOS do have a RTI code (&H3B), these are the ones that a BASIC program has detected:
9D42 rti - Interrupt from PIO 0 CB1 (9D3D - 9D50)
AFF5 rti - Entry Point of Interrupt Rutine (AFD9 - AFF5) - affects PLAY
B46E rti - FIRQ Rutine (B469 - B486)
BB0C rti - Entry Point for Sound Interrupt (BB02 - BB0C)
BF31 rti - IRQ Rutine from ACIA (BF20 - BF48)
C7B6 rti - Maybe not an actual RTI, just does a TST on FF21 and FF23 (C7B0 - C7B6)
Don't worry! ;)
prime
Posts: 267
Joined: Fri Apr 10, 2009 1:40 am

Re: Strange registered users?

Post by prime »

The DragonDOS / SuperDOS NMI handler would be a problem as it uses LEAS to drop the stacked registers and then does a RTS, this would fail as it is on a 6309 in native mode.

Tha handler is

Code: Select all

NMISrv   
        LDA     dpcmdreg		; Read status register.
        CLRB				        ; Reset DP=0
        TFR     B,DP
        LEAS    12,S			; Drop registers from stack
        TSTA				        ; Setup CC
LC6FF   RTS
Obviously this could be re-assembled / patched to LEAS 14,S for the extra 2 bytes, would be easy enough to make this conditional.

Though doesn't the 6309 start in 6809 emulation mode until you switch it into it's native mode with the extra regs etc ?

Also I would have though RTI used normally to return from an interrupt would not be a problem, as the interrupt would have stacked the right number of registers. What would be a problem is accessing the registers on the stack whilst in the interrupt routine as they may not be at the same locations relative to the stack pointer. Though the difference in where the extra regs go is documented on the 6309 datasheet, and there are examples (and even defines IIRC) in the NitrOS9 source code.

I have assemblable DragonDOS / SuperDOS & Dragon ROM (merged 32, 64 & 64 RAM mode roms) if anyone wants them.

Cheers.

Phill.
Last edited by prime on Fri Nov 09, 2012 11:47 pm, edited 1 time in total.
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: Strange registered users?

Post by zephyr »

prime wrote: Though doesn't the 6309 start in 6809 emulation mode until you switch it into it's native mode with the extra regs etc ?
Yes.
pser1
Posts: 1665
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: Strange registered users?

Post by pser1 »

Hello,
I have finally opened one Dragon64 and changed the CPU for a HD63C09EP.
It worked alright and doesn't get hot at all!
I have made a little BASIC test program to compare with four different machines:
10 A=TIMER: FOR I=1 TO 50000:NEXT: PRINT TIMER - A
20 IF INKEY$<>"C" THEN 20
30 PMODE3:PCLS:SCREEN1,0: A=TIMER
40 FOR I=10 TO 80 STEP 5
50 CIRCLE(128,96),I: NEXT: PRINT TIMER-A
These are the results (The 6309 in Emulation Mode)
------------------- D64 - 63C09----D64 - 6809---D32-----TANO
FOR-NEXT test.......3151...........3796.......3132.....3798
CIRCLEs.................110............132.........110......132
So it seems the 6309 runs approx 20% faster than 6809 . . . but in the same machine.
My surprise has been the Dragon32 with a 6809 performing faster than the 6309 (!?)
Tomorrow is going to be a complicated day to play with the Beasts, so untill next week.
I will make the same test with the 63C09 in native mode. Will tell you
I have prepared a random for-next to use SOUND and PLAY to see if it hangs at any moment.
In emulation mode, logically, it has never had a problem.
Pere
pser1
Posts: 1665
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: Strange registered users?

Post by pser1 »

Hello, back again
I have had the time to test in native mode the Dragon 64 with the HD63C09EP
The results with the same BASIC program used before are:
FOR-NEXT varies from 2639, 2657, 2712, 2789 to 2811 it seems that it's more variable than in emulation mode
Circles results are always the same = 95 - 96
When I have run the SOUND / PLAY program, it has hanged in the moment it has tried to PLAY a music string, as stated by zephyr.
Well, this means that we should analyze the play interruptions.
The possible 'solutions' would have to be tested in 64K mode (exec48000) modifying the BASIC ROM in RAM.
I hope that my german book "Das Dragon Lexikon" with the BASIC BIOS disasembled would be of help, despite it is a bit unreadable due to a bad print version.
More on this later.
Any advice would be wellcome!
Pere
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: Strange registered users?

Post by zephyr »

See my post in the Hints and Tips section.
pser1 wrote:Hello,
I have finally opened one Dragon64 and changed the CPU for a HD63C09EP.
It worked alright and doesn't get hot at all!
I have made a little BASIC test program to compare with four different machines:
10 A=TIMER: FOR I=1 TO 50000:NEXT: PRINT TIMER - A
20 IF INKEY$<>"C" THEN 20
30 PMODE3:PCLS:SCREEN1,0: A=TIMER
40 FOR I=10 TO 80 STEP 5
50 CIRCLE(128,96),I: NEXT: PRINT TIMER-A
These are the results (The 6309 in Emulation Mode)
------------------- D64 - 63C09----D64 - 6809---D32-----TANO
FOR-NEXT test.......3151...........3796.......3132.....3798
CIRCLEs.................110............132.........110......132
So it seems the 6309 runs approx 20% faster than 6809 . . . but in the same machine.
My surprise has been the Dragon32 with a 6809 performing faster than the 6309 (!?)
Tomorrow is going to be a complicated day to play with the Beasts, so untill next week.
I will make the same test with the 63C09 in native mode. Will tell you
I have prepared a random for-next to use SOUND and PLAY to see if it hangs at any moment.
In emulation mode, logically, it has never had a problem.
Pere
pser1 wrote: My surprise has been the Dragon32 with a 6809 performing faster than the 6309 (!?)
That should be impossible ! :?

The following code would be a better benchmark, but the most reliable way of testing CPU performance across machines would be to use Steve Woolham's benchmark program.

Code: Select all

10 CLS:TIMER=0:FOR I=1 TO 1000:PRINT"QWERTY":NEXT:A=TIMER
20 PMODE3,1:SCREEN1,0:PCLS
30 C=0:TIMER=0:FOR I=80 TO 10 STEP -5
40 CIRCLE(128,96),I,C
50 PAINT(128,96),C,C
60 C=C+1:IF C=9 THEN C=0
70 NEXT:B=TIMER
80 CLS:PRINT A:PRINT B
Post Reply