[Coco] Modifying Level1/coco1 for 6309 native mode

Luis Antoniosi (CoCoDemus) retrocanada76 at gmail.com
Sun Jan 5 22:33:47 EST 2014


Hi Robert,

I may help but i broke my ankle and everything has been a pain for a while.

For me I copied coco2 as coco2_6309 and modified all makefiles to have
a separate branch. We should have a coco1 as well, but since I intend
testing drivewire as soon it works and I have no coco1 DW here.

I have an advice on how set a breakpoint on MESS and is very easy,
supposed you want to make sure that the module  rel.asm inits. So in
the start of the module you do a harmless read like

TST $FF79

and on mess before launch the dos command, on debug prompt you type:

wp FF79,1,rw

Once the code will try to read or write at FF79 address it will break
in the debug window. You can change FF79 to any address you're not
using and with F10, F11 keys you can go stepping the asm code.



On Sun, Jan 5, 2014 at 9:04 PM, Robert Gault <robert.gault at att.net> wrote:
> Since there have been requests for this and the challenge is interesting,
> I've been looking at this problem. Here are initial results.
>
> 1) LWTools port of NitrOS-9 used for testing.
> 2) All level1/coco1 pertinent makefiles modified, for example
>
> AFLAGS          += -I$(LEVEL1)/modules
>
> changed to
>
> AFLAGS          += -I$(LEVEL1)/modules -DH6309=1
>
> or
>
> AFLAGS          += -DH6309=1
>
> added. This will be necessary for defs, cmds, modules, and kernel.
> The main coco1 makefile was modified:
> CPU=6309
> AFLAGS += -DH6309=1
>
> Make sure that $(AFLAGS) gets added as needed to the makefiles or the H6309
> will be ignored.
>
> 3) It was necessary to modify level1/modules/rel.asm as native mode was not
> initiated soon enough in level1, even though this source code is used for
> Level2 6309 and already contains one LDMD #$03.
>
> start1   orcc  #IntMasks  turn off IRQ's
>          clr   >PIA0Base+3 turn off SAM IRQ's
>          clra             make A=0 for later
>          IFNE  H6309
>          tfr   0,dp       set direct page to $0000
>          ldmd  #3         native mode       !!!!!!!!!!!!!! new line
>
> Start    clr   PIA0Base+3
>
>          IFNE  (tano+d64+dalpha)
>          clr   PIA0Base+1               added for Dragon, works on CoCo
>          ENDC
>          IFNE  H6309         !!!!!!!!!!!!!!! 3 new lines
>          ldmd  #3                  native mode
>          ENDC
>
> With the above changes, the boot process proceeds much father than without
> the changes. The boot process without rel changes crashed at the first
> F$Link call.
>
> The best way to test progress is with the MESS debugger. Use a version of
> MESS that correctly handles coco emulation. Start coco3h (6309) emulation,
> as that gives you the 6309 cpu and will run normal Level1 coco1 Nitros-9.
> Turn on the MESS debugger and set a breakpoint at $2602. Enter the DOS
> command with your test disk and the debugger will start as soon as rel
> starts running.
> You should then tell MESS to start a trace, ex. trace 6309.log, and then
> leave the debugger. The text file 6309.log will be generated which will make
> it easy to spot where the boot process is crashing.
> You can do the same thing with a normal coco1 6809 disk and compare a
> 6809.log vs your 6309.log.
>
> It would make things much easier if there are other programmers interested
> enough to try this. We can compare notes and ideas. That could make Level1
> 6309 native mode a reality.
>
> Robert
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco



-- 
Long live the CoCo



More information about the Coco mailing list