Page 8 of 11

Re: Dragon emulator written in Python ???

Posted: Wed Jun 25, 2014 4:28 pm
by JeeK
jedie wrote:I found http://lennartb.home.xs4all.nl/m6809.html there is a archive to download with GPL sources: http://lennartb.home.xs4all.nl/sbc09.tar.gz

Very interesting stuff!

[..]
The Achive contains (C code) e.g.:
* 6809 assembler: https://github.com/jedie/DragonPy/blob/ ... bc09/a09.c
* 6809 simulator: https://github.com/jedie/DragonPy/blob/ ... bc09/v09.c
* A ROM with ASM source code. included a monitor programm: https://github.com/jedie/DragonPy/blob/ ... onitor.asm

information is in the README and LaTeX files, e.g.:
https://github.com/jedie/DragonPy/blob/ ... README.txt
https://github.com/jedie/DragonPy/blob/ ... /sbc09.tex

The "6809 Simulator" can also create trace files like XRoar, e.g.:
Indeed, nice work. Love it (to play around with the enclosed Forth)!

Did some work on a previous version with bugfixes (which are fixed in the current version, too).
The trace output has been reworked to make it more human readable. Several test programs has been added too.
Take a look at http://klasek.at/hc/6809/
Alas, the versions drifted apart over the years and I am still trying to find some time to merge them (hopefully Lennart is willing to accept my changes). ;)

Johann

Re: Dragon emulator written in Python ???

Posted: Thu Jun 26, 2014 9:10 am
by jedie
JeeK wrote:Take a look at http://klasek.at/hc/6809/
I have create a separate thread for this here: viewtopic.php?f=8&t=4880

Re: Dragon emulator written in Python ???

Posted: Thu Jun 26, 2014 4:48 pm
by jedie
One Question:

TST Extended $7D is it a 16Bit test or a 8Bit test with just a 16Bit address?

EDIT: Seems to be that it's only 8Bit with a 16Bit address, isn't it?
So this commit https://github.com/jedie/DragonPy/commi ... bd5ec14db6 is ok, or?

Re: Dragon emulator written in Python ???

Posted: Thu Jun 26, 2014 7:21 pm
by tormod
Yes, TST is always on a (8-bit) byte. It is like LDA or LDB without actually loading any accumulator. To test a word (16-bit) one can use LDX/U/Y/D, or two TST depending on what you want to find out.

Re: Dragon emulator written in Python ???

Posted: Fri Jun 27, 2014 1:53 pm
by jedie
Thx!

Re: Dragon emulator written in Python ???

Posted: Fri Jun 27, 2014 2:37 pm
by jedie
Next questions: In some ops is half carry "undefined"... e.g.: ASL, NEG, SUBA etc.

What does it mean on a real machine: Half Carry remains at the last value?

EDIT: btw. there also only a few ops that affected the half carry are only ADCA, ADCB and ADDA, ADDB and ANDCC, ORCC
All others are "undefined" or not affected.

But what's the difference between "undefined" and "not affected" ?

And: has anyone a use case for the half carry? A example ASM code?

Re: Dragon emulator written in Python ???

Posted: Fri Jun 27, 2014 5:45 pm
by jedie
The last bugfixes results in a different output:

Code: Select all

6809 EXTENDED BASIC
(C) 1982 BY MICROSOFT

OK
PRINT "HELLO"

OK
PRINT 123

OK
10 PRINT 123
LIST
OK
RUN
OK
FOR I=1 to 3:PRINT I:NEXT I
?SN ERROR
OK
PRINT "NOTHING WORKS :("

OK
But, yes no BASIC code seems to work, yet :(

Re: Dragon emulator written in Python ???

Posted: Sat Jun 28, 2014 11:10 pm
by jedie
And after another bugfixes, a first "HELLO WORLD" works! :D

Code: Select all

6809 EXTENDED BASIC
(C) 1982 BY MICROSOFT

OK
PRINT "HELLO WORLD!"
HELLO WORLD!
Works with Multicomp6809 and Simple6809 ROM (think the most code of the ROM are the same ;) )

other code results in a loop...

Re: Dragon emulator written in Python ???

Posted: Mon Jun 30, 2014 12:20 pm
by jedie
Now, it works more:

Code: Select all

6809 EXTENDED BASIC
(C) 1982 BY MICROSOFT

OK
10 A=0
20 B=0
30 PRINT A
40 ? B
50 PRINT "H E L L O "+"WORLD!"
60 PRINT "X"+STR$(A)
RUN
 0 
 0 
H E L L O WORLD!
X 0
OK
A other number than 0 results in a loop...

Re: Dragon emulator written in Python ???

Posted: Tue Jul 01, 2014 11:17 am
by jedie
Update, after last bugfixes:

Code: Select all

6809 EXTENDED BASIC
(C) 1982 BY MICROSOFT

OK
10 FOR I=1 TO 3
20 PRINT STR$(I)+" DRAGONPY"
30 NEXT I
RUN
 .0/////909 DRAGONPY
 .0/////909 DRAGONPY
OK

A="B"
?TM ERROR
OK

LIST
0./////909 FOR I=1 TO 3
0./////909 PRINT STR$(I)+" DRAGONPY"
0.///90909 NEXT I
OK
Strange :P