Dragon emulator written in Python ???

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:

Dragon emulator written in Python ???

Post by jedie »

I found the Apple ][ Emulator written in Python here: https://github.com/jtauber/applepy
I looked into the source code and wondering how "simple" it looks. (compared with other emulator code)

A interesting video from the author is here: http://www.youtube.com/watch?v=EhK5JNx0irA

I forked the code and change a little stuff here and there: https://github.com/jedie/DragonPy
But my know-how in this area is very limited. Think i can't bring it into a working state alone... Anyone interested in this?
... 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 »

You might also be interested in following the thread on this on the CoCo list: http://five.pairlist.net/pipermail/coco ... 70903.html
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Re: Dragon emulator written in Python ???

Post by jedie »

Thanks! Maybe the people from there would like the same ;)
... 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
sixxie
Posts: 1344
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: Dragon emulator written in Python ???

Post by sixxie »

I actually started giving it a look a while back - tempted by people's claims that compiled, it could be pretty fast. No, it really isn't!

Only got as far as rendering some video (SG4), but that was enough to put me off!

Can't remember what I compiled it with at the time, sadly.

Here is as far as I got - not much, eh!

Also, at the time Python seemed to be all over the place as a language - you had no guarantee that a language feature as basic as the ternary operator would be available in the version you had installed. Probably settled down a bit now.

Edit: but that was all ages ago - don't let me put you off!
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Re: Dragon emulator written in Python ???

Post by jedie »

Python is fast enough for the most problems. it is nevertheless too slow, you can get speed if you use special binary libraries for some parts, e.g.: numpy
Maybe a solution is PyPy with JIT-Compiler to get more speed.

Python is very Backwards-/Forwards incompatible. The biggest break is v2.x to v3.x... And it's very platform independent. So for me it's the best choice ;)

I think it's not impossible to create a emulator in Python. Beside the Apple II emulator, there exist this emulators:
... 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 »

I came to the conclusion that it would be better to contribute to the origin "applepy" project, instead of fork and change it.

Therefore, I make a fresh start here:
https://github.com/jedie/PyEmulator/

I have started to split https://github.com/jtauber/applepy into a Apple 2 specific part and a generic part. The destination is that is that it is possible to emulate similar hardware with the same code base. Like CoCo / Dragon machines.

See: https://github.com/jtauber/applepy/pull/19

I also started to add a Dragon 32 part. But this is not usable, yet. Because i have just copy the 6502 part and haven't the know how really change it to a working 6809...
But it's helpful to see if the split makes sense.

Maybe i can also add a CoCo machine, if anyone can contribute information about this.

Would be great if anybody with more know how can contribute stuff to get the 6809 CPU and the needed peripheral devices workable.
... 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 »

I stoped the work on https://github.com/jtauber/applepy/pull/19 because applepy seems to be "done" and James Tauber starts https://github.com/jtauber/pycpu the 6809 is planned...

But i have interests in how a CPU worked and how to implement this in Python... So i have to cleanup the old applepy fork https://github.com/jedie/DragonPy/ and starts to implement a 6809... current state is that there is one op (TFR) implemented and tested: https://github.com/jedie/DragonPy/blob/ ... cpu6809.py

Don't know if this is my next never ending story, because i didn't really have the time for it :twisted:
... 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 »

I hacked a little bit around, implement some ops and add a few debug output. I use my "Dragon Memory Info" (see: viewtopic.php?f=8&t=4365 ) to display many information.

The current output looks like this:

Code: Select all

init 16384 Bytes ROM (0x8000 - 0xc000)
Read 16383Bytes from d32.rom into ROM 0x8000-0xbfff
init 32768 Bytes RAM (0x0 - 0x8000)
CPU reset read word from 0xb3ba
 *** new op code: 0x0 (NEG_direct)
SoftSwitches.read_byte (cycle: 0x17256) from 0x7fff: UNKNOWN
no soft switch at 0x7fff (cycle: 0x17256)
 *** last op code 0 count: 15800 - new op code: 0x7e (JMP_extended)
0x40bb - 0x7e JMP extended to: 0x40bb
 *** new op code: 0x0 (NEG_direct)
SoftSwitches.read_byte (cycle: 0x23025) from 0x7fff: UNKNOWN
no soft switch at 0x7fff (cycle: 0x23025)
 *** last op code 0 count: 8098 - new op code: 0xbb (ADDA_extended)
0x8004 - 0xbb ADDA extended: Add 0x7e40 to accu A: 0x0
0x8007 - 0xbb ADDA extended: Add 0x7e88 to accu A: 0x7e40
0x800a - 0xbb ADDA extended: Add 0x7ee5 to accu A: 0xfcc8
0x800d - 0xbb ADDA extended: Add 0x7eb5 to accu A: 0x17bad
 *** last op code 187 count: 3 - new op code: 0xbc (CMPX_extended)
0x8010 - 0xbc CMPX extended: 0x0 - 0x7eab = -0x7eab (Set C to 0)
 *** new op code: 0xbd (JSR_extended)
write byte 0x80 to 0x100:
 * 0x100-0x102 - SWI3 Secondary vector (Uninitialised)
write byte 0x12 to 0x1ff:
 * 0x1da-0x2d8 - Cassette I/O default data buffer - 255 bytes
 * 0x1da-0x268 - D64 - 64K mode bootstrap routine is copied here to run
0x7e1a - 0xbd JSR extended: push 0x7e19 to stack and jump to 0x7e1a
 *** new op code: 0x0 (NEG_direct)
SoftSwitches.read_byte (cycle: 0x23600) from 0x7fff: UNKNOWN
no soft switch at 0x7fff (cycle: 0x23600)
 *** last op code 0 count: 242 - new op code: 0x7e (JMP_extended)
0x40bb - 0x7e JMP extended to: 0x40bb
 *** new op code: 0x0 (NEG_direct)
SoftSwitches.read_byte (cycle: 0x2f3cf) from 0x7fff: UNKNOWN
no soft switch at 0x7fff (cycle: 0x2f3cf)
 *** last op code 0 count: 8098 - new op code: 0xbb (ADDA_extended)
0x8004 - 0xbb ADDA extended: Add 0x7e40 to accu A: 0x1fa62
0x8007 - 0xbb ADDA extended: Add 0x7e88 to accu A: 0x278a2
0x800a - 0xbb ADDA extended: Add 0x7ee5 to accu A: 0x2f72a
0x800d - 0xbb ADDA extended: Add 0x7eb5 to accu A: 0x3760f
 *** last op code 187 count: 3 - new op code: 0xbc (CMPX_extended)
0x8010 - 0xbc CMPX extended: 0x0 - 0x7eab = -0x7eab (Set C to 0)
 *** new op code: 0xbd (JSR_extended)
write byte 0x80 to 0x1fe:
 * 0x1da-0x2d8 - Cassette I/O default data buffer - 255 bytes
 * 0x1da-0x268 - D64 - 64K mode bootstrap routine is copied here to run
write byte 0x12 to 0x1fd:
 * 0x1da-0x2d8 - Cassette I/O default data buffer - 255 bytes
 * 0x1da-0x268 - D64 - 64K mode bootstrap routine is copied here to run
0x7e1a - 0xbd JSR extended: push 0x7e19 to stack and jump to 0x7e1a
 *** new op code: 0x0 (NEG_direct)
SoftSwitches.read_byte (cycle: 0x2f9aa) from 0x7fff: UNKNOWN
no soft switch at 0x7fff (cycle: 0x2f9aa)
 *** last op code 0 count: 242 - new op code: 0x7e (JMP_extended)
0x40bb - 0x7e JMP extended to: 0x40bb
 *** new op code: 0x0 (NEG_direct)
SoftSwitches.read_byte (cycle: 0x3b779) from 0x7fff: UNKNOWN
no soft switch at 0x7fff (cycle: 0x3b779)
 *** last op code 0 count: 8098 - new op code: 0xbb (ADDA_extended)
0x8004 - 0xbb ADDA extended: Add 0x7e40 to accu A: 0x3f4c4
0x8007 - 0xbb ADDA extended: Add 0x7e88 to accu A: 0x47304
0x800a - 0xbb ADDA extended: Add 0x7ee5 to accu A: 0x4f18c
0x800d - 0xbb ADDA extended: Add 0x7eb5 to accu A: 0x57071
 *** last op code 187 count: 3 - new op code: 0xbc (CMPX_extended)
0x8010 - 0xbc CMPX extended: 0x0 - 0x7eab = -0x7eab (Set C to 0)
 *** new op code: 0xbd (JSR_extended)
write byte 0x80 to 0x1fc:
 * 0x1da-0x2d8 - Cassette I/O default data buffer - 255 bytes
 * 0x1da-0x268 - D64 - 64K mode bootstrap routine is copied here to run
write byte 0x12 to 0x1fb:
 * 0x1da-0x2d8 - Cassette I/O default data buffer - 255 bytes
 * 0x1da-0x268 - D64 - 64K mode bootstrap routine is copied here to run
0x7e1a - 0xbd JSR extended: push 0x7e19 to stack and jump to 0x7e1a
 *** new op code: 0x0 (NEG_direct)
SoftSwitches.read_byte (cycle: 0x3bd54) from 0x7fff: UNKNOWN
no soft switch at 0x7fff (cycle: 0x3bd54)
 *** last op code 0 count: 242 - new op code: 0x7e (JMP_extended)
0x40bb - 0x7e JMP extended to: 0x40bb
 *** new op code: 0x0 (NEG_direct)
SoftSwitches.read_byte (cycle: 0x47b23) from 0x7fff: UNKNOWN
no soft switch at 0x7fff (cycle: 0x47b23)
 *** last op code 0 count: 8098 - new op code: 0xbb (ADDA_extended)
0x8004 - 0xbb ADDA extended: Add 0x7e40 to accu A: 0x5ef26
0x8007 - 0xbb ADDA extended: Add 0x7e88 to accu A: 0x66d66
0x800a - 0xbb ADDA extended: Add 0x7ee5 to accu A: 0x6ebee
0x800d - 0xbb ADDA extended: Add 0x7eb5 to accu A: 0x76ad3
 *** last op code 187 count: 3 - new op code: 0xbc (CMPX_extended)
0x8010 - 0xbc CMPX extended: 0x0 - 0x7eab = -0x7eab (Set C to 0)
 *** new op code: 0xbd (JSR_extended)
write byte 0x80 to 0x1fa:
 * 0x1da-0x2d8 - Cassette I/O default data buffer - 255 bytes
 * 0x1da-0x268 - D64 - 64K mode bootstrap routine is copied here to run
write byte 0x12 to 0x1f9:
 * 0x1da-0x2d8 - Cassette I/O default data buffer - 255 bytes
 * 0x1da-0x268 - D64 - 64K mode bootstrap routine is copied here to run
0x7e1a - 0xbd JSR extended: push 0x7e19 to stack and jump to 0x7e1a
 *** new op code: 0x0 (NEG_direct)
SoftSwitches.read_byte (cycle: 0x480fe) from 0x7fff: UNKNOWN
no soft switch at 0x7fff (cycle: 0x480fe)
 *** last op code 0 count: 242 - new op code: 0x7e (JMP_extended)
0x40bb - 0x7e JMP extended to: 0x40bb
 *** new op code: 0x0 (NEG_direct)
SoftSwitches.read_byte (cycle: 0x53ecd) from 0x7fff: UNKNOWN
no soft switch at 0x7fff (cycle: 0x53ecd)
 *** last op code 0 count: 8098 - new op code: 0xbb (ADDA_extended)
0x8004 - 0xbb ADDA extended: Add 0x7e40 to accu A: 0x7e988
0x8007 - 0xbb ADDA extended: Add 0x7e88 to accu A: 0x867c8
0x800a - 0xbb ADDA extended: Add 0x7ee5 to accu A: 0x8e650
0x800d - 0xbb ADDA extended: Add 0x7eb5 to accu A: 0x96535
 *** last op code 187 count: 3 - new op code: 0xbc (CMPX_extended)
0x8010 - 0xbc CMPX extended: 0x0 - 0x7eab = -0x7eab (Set C to 0)
 *** new op code: 0xbd (JSR_extended)
write byte 0x80 to 0x1f8:
 * 0x1da-0x2d8 - Cassette I/O default data buffer - 255 bytes
 * 0x1da-0x268 - D64 - 64K mode bootstrap routine is copied here to run
write byte 0x12 to 0x1f7:
 * 0x1da-0x2d8 - Cassette I/O default data buffer - 255 bytes
 * 0x1da-0x268 - D64 - 64K mode bootstrap routine is copied here to run
0x7e1a - 0xbd JSR extended: push 0x7e19 to stack and jump to 0x7e1a
 *** new op code: 0x0 (NEG_direct)
SoftSwitches.read_byte (cycle: 0x544a8) from 0x7fff: UNKNOWN
no soft switch at 0x7fff (cycle: 0x544a8)
 *** last op code 0 count: 242 - new op code: 0x7e (JMP_extended)
0x40bb - 0x7e JMP extended to: 0x40bb
 *** new op code: 0x0 (NEG_direct)
SoftSwitches.read_byte (cycle: 0x60277) from 0x7fff: UNKNOWN
no soft switch at 0x7fff (cycle: 0x60277)
 *** last op code 0 count: 8098 - new op code: 0xbb (ADDA_extended)
0x8004 - 0xbb ADDA extended: Add 0x7e40 to accu A: 0x9e3ea
0x8007 - 0xbb ADDA extended: Add 0x7e88 to accu A: 0xa622a
0x800a - 0xbb ADDA extended: Add 0x7ee5 to accu A: 0xae0b2
0x800d - 0xbb ADDA extended: Add 0x7eb5 to accu A: 0xb5f97
 *** last op code 187 count: 3 - new op code: 0xbc (CMPX_extended)
0x8010 - 0xbc CMPX extended: 0x0 - 0x7eab = -0x7eab (Set C to 0)
 *** new op code: 0xbd (JSR_extended)
write byte 0x80 to 0x1f6:
 * 0x1da-0x2d8 - Cassette I/O default data buffer - 255 bytes
 * 0x1da-0x268 - D64 - 64K mode bootstrap routine is copied here to run
write byte 0x12 to 0x1f5:
 * 0x1da-0x2d8 - Cassette I/O default data buffer - 255 bytes
 * 0x1da-0x268 - D64 - 64K mode bootstrap routine is copied here to run
0x7e1a - 0xbd JSR extended: push 0x7e19 to stack and jump to 0x7e1a
 *** new op code: 0x0 (NEG_direct)
SoftSwitches.read_byte (cycle: 0x60852) from 0x7fff: UNKNOWN
no soft switch at 0x7fff (cycle: 0x60852)
 *** last op code 0 count: 242 - new op code: 0x7e (JMP_extended)
0x40bb - 0x7e JMP extended to: 0x40bb
 *** new op code: 0x0 (NEG_direct)
SoftSwitches.read_byte (cycle: 0x6c621) from 0x7fff: UNKNOWN
no soft switch at 0x7fff (cycle: 0x6c621)
 *** last op code 0 count: 8098 - new op code: 0xbb (ADDA_extended)
0x8004 - 0xbb ADDA extended: Add 0x7e40 to accu A: 0xbde4c
0x8007 - 0xbb ADDA extended: Add 0x7e88 to accu A: 0xc5c8c
0x800a - 0xbb ADDA extended: Add 0x7ee5 to accu A: 0xcdb14
0x800d - 0xbb ADDA extended: Add 0x7eb5 to accu A: 0xd59f9
 *** last op code 187 count: 3 - new op code: 0xbc (CMPX_extended)
0x8010 - 0xbc CMPX extended: 0x0 - 0x7eab = -0x7eab (Set C to 0)
 *** new op code: 0xbd (JSR_extended)
write byte 0x80 to 0x1f4:
 * 0x1da-0x2d8 - Cassette I/O default data buffer - 255 bytes
 * 0x1da-0x268 - D64 - 64K mode bootstrap routine is copied here to run
write byte 0x12 to 0x1f3:
 * 0x1da-0x2d8 - Cassette I/O default data buffer - 255 bytes
 * 0x1da-0x268 - D64 - 64K mode bootstrap routine is copied here to run
0x7e1a - 0xbd JSR extended: push 0x7e19 to stack and jump to 0x7e1a
 *** new op code: 0x0 (NEG_direct)
SoftSwitches.read_byte (cycle: 0x6cbfc) from 0x7fff: UNKNOWN
no soft switch at 0x7fff (cycle: 0x6cbfc)
 *** last op code 0 count: 242 - new op code: 0x7e (JMP_extended)
0x40bb - 0x7e JMP extended to: 0x40bb
 *** new op code: 0x0 (NEG_direct)
SoftSwitches.read_byte (cycle: 0x789cb) from 0x7fff: UNKNOWN
no soft switch at 0x7fff (cycle: 0x789cb)
 *** last op code 0 count: 8098 - new op code: 0xbb (ADDA_extended)
0x8004 - 0xbb ADDA extended: Add 0x7e40 to accu A: 0xdd8ae
0x8007 - 0xbb ADDA extended: Add 0x7e88 to accu A: 0xe56ee
0x800a - 0xbb ADDA extended: Add 0x7ee5 to accu A: 0xed576
0x800d - 0xbb ADDA extended: Add 0x7eb5 to accu A: 0xf545b
 *** last op code 187 count: 3 - new op code: 0xbc (CMPX_extended)
0x8010 - 0xbc CMPX extended: 0x0 - 0x7eab = -0x7eab (Set C to 0)
 *** new op code: 0xbd (JSR_extended)
write byte 0x80 to 0x1f2:
 * 0x1da-0x2d8 - Cassette I/O default data buffer - 255 bytes
 * 0x1da-0x268 - D64 - 64K mode bootstrap routine is copied here to run
write byte 0x12 to 0x1f1:
 * 0x1da-0x2d8 - Cassette I/O default data buffer - 255 bytes
 * 0x1da-0x268 - D64 - 64K mode bootstrap routine is copied here to run
0x7e1a - 0xbd JSR extended: push 0x7e19 to stack and jump to 0x7e1a
 *** new op code: 0x0 (NEG_direct)
SoftSwitches.read_byte (cycle: 0x78fa6) from 0x7fff: UNKNOWN
no soft switch at 0x7fff (cycle: 0x78fa6)
 *** last op code 0 count: 242 - new op code: 0x7e (JMP_extended)
0x40bb - 0x7e JMP extended to: 0x40bb
 *** new op code: 0x0 (NEG_direct)
SoftSwitches.read_byte (cycle: 0x84d75) from 0x7fff: UNKNOWN
no soft switch at 0x7fff (cycle: 0x84d75)
 *** last op code 0 count: 8098 - new op code: 0xbb (ADDA_extended)
0x8004 - 0xbb ADDA extended: Add 0x7e40 to accu A: 0xfd310
0x8007 - 0xbb ADDA extended: Add 0x7e88 to accu A: 0x105150
0x800a - 0xbb ADDA extended: Add 0x7ee5 to accu A: 0x10cfd8
0x800d - 0xbb ADDA extended: Add 0x7eb5 to accu A: 0x114ebd
 *** last op code 187 count: 3 - new op code: 0xbc (CMPX_extended)
0x8010 - 0xbc CMPX extended: 0x0 - 0x7eab = -0x7eab (Set C to 0)
 *** new op code: 0xbd (JSR_extended)
write byte 0x80 to 0x1f0:
 * 0x1da-0x2d8 - Cassette I/O default data buffer - 255 bytes
 * 0x1da-0x268 - D64 - 64K mode bootstrap routine is copied here to run
write byte 0x12 to 0x1ef:
 * 0x1da-0x2d8 - Cassette I/O default data buffer - 255 bytes
 * 0x1da-0x268 - D64 - 64K mode bootstrap routine is copied here to run
0x7e1a - 0xbd JSR extended: push 0x7e19 to stack and jump to 0x7e1a
 *** new op code: 0x0 (NEG_direct)
SoftSwitches.read_byte (cycle: 0x85350) from 0x7fff: UNKNOWN
no soft switch at 0x7fff (cycle: 0x85350)
 *** last op code 0 count: 242 - new op code: 0x7e (JMP_extended)
0x40bb - 0x7e JMP extended to: 0x40bb
 *** new op code: 0x0 (NEG_direct)
SoftSwitches.read_byte (cycle: 0x9111f) from 0x7fff: UNKNOWN
no soft switch at 0x7fff (cycle: 0x9111f)
 *** last op code 0 count: 8098 - new op code: 0xbb (ADDA_extended)
0x8004 - 0xbb ADDA extended: Add 0x7e40 to accu A: 0x11cd72
0x8007 - 0xbb ADDA extended: Add 0x7e88 to accu A: 0x124bb2
0x800a - 0xbb ADDA extended: Add 0x7ee5 to accu A: 0x12ca3a
0x800d - 0xbb ADDA extended: Add 0x7eb5 to accu A: 0x13491f
 *** last op code 187 count: 3 - new op code: 0xbc (CMPX_extended)
0x8010 - 0xbc CMPX extended: 0x0 - 0x7eab = -0x7eab (Set C to 0)
 *** new op code: 0xbd (JSR_extended)
write byte 0x80 to 0x1ee:
 * 0x1da-0x2d8 - Cassette I/O default data buffer - 255 bytes
 * 0x1da-0x268 - D64 - 64K mode bootstrap routine is copied here to run
write byte 0x12 to 0x1ed:
 * 0x1da-0x2d8 - Cassette I/O default data buffer - 255 bytes
 * 0x1da-0x268 - D64 - 64K mode bootstrap routine is copied here to run
0x7e1a - 0xbd JSR extended: push 0x7e19 to stack and jump to 0x7e1a
 *** new op code: 0x0 (NEG_direct)
SoftSwitches.read_byte (cycle: 0x916fa) from 0x7fff: UNKNOWN
no soft switch at 0x7fff (cycle: 0x916fa)
 *** last op code 0 count: 242 - new op code: 0x7e (JMP_extended)
0x40bb - 0x7e JMP extended to: 0x40bb
 *** new op code: 0x0 (NEG_direct)
Sources: https://github.com/jedie/DragonPy/

I question me, if the memory layout and RESET_VECTOR is right:

Code: Select all

class Dragon32Cfg(BaseConfig):
    RAM_START = 0x0000
    RAM_END = 0x7FFF
    RAM_SIZE = 0x8000 # 32768 Bytes

    ROM_START = 0x8000
    ROM_END = 0xBFFF
    ROM_SIZE = 0x4000 # 16384 Bytes

    STACK_PAGE = 0x100

#     RESET_VECTOR = 0xB3B4 # RESET interrupt service routine (CoCo $a027)
    RESET_VECTOR = 0xB3BA # Cold start routine - clears lo mem, inits BASIC
#     RESET_VECTOR = 0xB39B # Called after Hardware init routine, following a RESET Inits stack, checks for Cold/warm start
#     RESET_VECTOR = 0xFFFE # RESET     ($b3b4; D64 64K mode $c000 - never accessed)
Full source: https://github.com/jedie/DragonPy/blob/ ... igs.py#L31


Next question is, what is 0x7fff ?
... 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 »

Found useful information here:
http://www.onastick.clara.co.uk/dragonhw.htm
http://www.onastick.clara.co.uk/sys1.htm
http://www.onastick.clara.co.uk/sys2.htm
http://www.onastick.clara.co.uk/sys3.htm
http://www.onastick.clara.co.uk/sys4.htm
http://www.onastick.clara.co.uk/sys5.htm
http://www.onastick.clara.co.uk/sys6.htm
jedie wrote:Next question is, what is 0x7fff ?
from http://www.onastick.clara.co.uk/dragonhw.htm :
Default ROM power-up:

Address Description

0000-0400h System workspace
0400-05FFh Text Screen
0600-0BFFh Graphics Page 0 or DOS workspace
0C00-1DFFh Graphics RAM
1E00-23FFh Graphics RAM if DOS present
-7FFFh User RAM (BASIC & M/C)
8000-BFFFh Basic ROM
C000-FF00h Cartridge ROM or DOS ROM (DOS=C000-DFFFh)
FF00-FF5Fh IO Ports
FF60-FFF1h SAM (Synchronous Address Multiplexor) chip vectors
FFF2-FFFFh CPU vectors
So it's the end of the user RAM?
... 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
Sarah
Posts: 177
Joined: Wed Apr 13, 2011 3:36 pm
Contact:

Re: Dragon emulator written in Python ???

Post by Sarah »

Yes RAM ends at $7FFF in 32K mode.

There's, of course, nearly another 32K available in 64K mode.
Post Reply