Dragon emulator written in Python ???

A place to discuss everything Dragon related that doesn't fall into the other categories.
User avatar
JeeK
Posts: 67
Joined: Fri Aug 16, 2013 10:45 am
Location: Vienna, Austria
Contact:

Re: Dragon emulator written in Python ???

Post 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
The dragon on my side: http://klasek.at/hc/dragon/
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Re: Dragon emulator written in Python ???

Post 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
... 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: Dragon emulator written in Python ???

Post 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?
... 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
User avatar
tormod
Posts: 416
Joined: Sat Apr 27, 2013 12:06 pm
Location: Switzerland
Contact:

Re: Dragon emulator written in Python ???

Post 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.
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Re: Dragon emulator written in Python ???

Post by jedie »

Thx!
... 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: Dragon emulator written in Python ???

Post 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?
... 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: Dragon emulator written in Python ???

Post 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 :(
... 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: Dragon emulator written in Python ???

Post 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...
... 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: Dragon emulator written in Python ???

Post 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...
... 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: Dragon emulator written in Python ???

Post 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
... 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