- Set mapmode0 and reinstate the mapmode0 ROM
- Set DP to #0
- Set the I and F flags in CC to mask interrupts
- Load PC from $FFFE
Dragon emulator written in Python ???
Re: Dragon emulator written in Python ???
This is what to do at reset:
Re: Dragon emulator written in Python ???
Note also that after reset, NMI stays disabled until a program sets S.Sarah wrote:You shouldn't need a value for S as code executing after reset cannot assume it to be set.
Re: Dragon emulator written in Python ???
That's a little to hight for me, at the moment. e.g. what is "mapmode0" ?
Beside implementing more Opcode i have only implement some "Dummy" objects for PIA 1 & 2 and SAM...: https://github.com/jedie/DragonPy/blob/ ... #L336-L463
And without unittests for the new implemented Opcodes, i consider there are a few bugs
The current debug output is this: https://gist.github.com/jedie/6779646
I raised a NotImplementedError while writing to text screen:
If i don't raise it will stay in this loop:
Beside implementing more Opcode i have only implement some "Dummy" objects for PIA 1 & 2 and SAM...: https://github.com/jedie/DragonPy/blob/ ... #L336-L463
And without unittests for the new implemented Opcodes, i consider there are a few bugs
The current debug output is this: https://gist.github.com/jedie/6779646
I raised a NotImplementedError while writing to text screen:
Code: Select all
$ba7e read pc byte: $e7 from $ba7e
$ba7e STB INDEXED instruction_ST8 | $ba7e: $ba79-$ba85 - Clears text screen with value in B (CoCo $a92a)
$ba7f read pc byte: $80 from $ba7f
$ba80 addressing 'indexed' with postbyte: $80 == 10000000
$ba80 indexed addressing mode ea=$401 | $401: $400-$5ff - Default Text screen
$ba80 get 'indexed' byte: ea = $401 m = $0
$401 instruction_ST8 kwargs: ea=$401 m=$0 opcode=$e7 operand=<B (8-Bit):96>
$ba80 ST8 store value $60 from B at $401 | $401: $400-$5ff - Default Text screen
**** TODO: write $60 '`' to text screen address $401
If i don't raise it will stay in this loop:
Code: Select all
$ba7e read pc byte: $e7 from $ba7e
$ba7e STB INDEXED instruction_ST8 | $ba7e: $ba79-$ba85 - Clears text screen with value in B (CoCo $a92a)
$ba7f read pc byte: $80 from $ba7f
$ba80 addressing 'indexed' with postbyte: $80 == 10000000
$ba80 indexed addressing mode ea=$401 | $401: $400-$5ff - Default Text screen
$ba80 get 'indexed' byte: ea = $401 m = $60
$401 instruction_ST8 kwargs: ea=$401 m=$60 opcode=$e7 operand=<B (8-Bit):96>
$ba80 ST8 store value $60 from B at $401 | $401: $400-$5ff - Default Text screen
**** TODO: write $60 '`' to text screen address $401
**** write $60 to $401 - mem info:
$60: $5c-$61 - Floating Point Accumulator Num 2
$401: $400-$5ff - Default Text screen
-------------------------------------------------------------------------------
$ba80 read pc byte: $8c from $ba80
$ba80 CMPX IMMEDIATE instruction_CMP16 | $ba80: $ba79-$ba85 - Clears text screen with value in B (CoCo $a92a)
$ba81 read pc word: $05ff from $ba81
$ba81 addressing 'immediate word' value: $5ff
$ba81 instruction_CMP16 kwargs: ea=$ba81 m=$5ff opcode=$8c operand=<X (8-Bit):1024>
$ba83 CMP16 X $400 - $5ff = $-1ff
-------------------------------------------------------------------------------
$ba83 read pc byte: $23 from $ba83
$ba83 BLS RELATIVE instruction_BLS | $ba83: $ba79-$ba85 - Clears text screen with value in B (CoCo $a92a)
$ba84 read pc byte: $f9 from $ba84
$ba85 addressing 'relative' ea = $ba85 + -7 = $ba7e | $ba7e: $ba79-$ba85 - Clears text screen with value in B (CoCo $a92a)
$ba85 get 'relative' byte: ea = $ba7e m = $e7
$ba7e instruction_BLS kwargs: ea=$ba7e m=$e7 opcode=$23
$ba85 BLS branch to $ba7e, because C|Z==0 | $ba7e: $ba79-$ba85 - Clears text screen with value in B (CoCo $a92a)
-------------------------------------------------------------------------------
$ba7e read pc byte: $e7 from $ba7e
$ba7e STB INDEXED instruction_ST8 | $ba7e: $ba79-$ba85 - Clears text screen with value in B (CoCo $a92a)
$ba7f read pc byte: $80 from $ba7f
$ba80 addressing 'indexed' with postbyte: $80 == 10000000
$ba80 indexed addressing mode ea=$401 | $401: $400-$5ff - Default Text screen
$ba80 get 'indexed' byte: ea = $401 m = $60
$401 instruction_ST8 kwargs: ea=$401 m=$60 opcode=$e7 operand=<B (8-Bit):96>
$ba80 ST8 store value $60 from B at $401 | $401: $400-$5ff - Default Text screen
**** TODO: write $60 '`' to text screen address $401
**** write $60 to $401 - mem info:
$60: $5c-$61 - Floating Point Accumulator Num 2
$401: $400-$5ff - Default Text screen
... 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
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
Re: Dragon emulator written in Python ???
The map mode basically controls the configuration of RAM and ROM for a system using an MC6883 (SAM). You can read full details about how it decodes addresses in the data sheet:jedie wrote:That's a little to hight for me, at the moment. e.g. what is "mapmode0" ?
http://images.ihscontent.net/vipimages/ ... -5-323.pdf
Or perhaps take a look at 'What can be done with it all' here:
http://archive.worldofdragon.org/index. ... 4K_Upgrade#
It's not really something you need to be concerned about whilst your emulator is in the early stages of development.
Re: Dragon emulator written in Python ???
Thanks! That's interesting!Sarah wrote:Or perhaps take a look at 'What can be done with it all' here:
http://archive.worldofdragon.org/index. ... 4K_Upgrade#
... 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
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
Re: Dragon emulator written in Python ???
I ask myself if it's make more fun to start with a simpler hardware. e.g.: http://searle.hostei.com/grant/6809/Simple6809.html So i have only to implement a virtual RS232 interface
... 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
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
Re: Dragon emulator written in Python ???
The way I started with XRoar was to have some RAM, load the ROMs and periodically dump the state of 0x0400 - 0x05FF to the console using VT100 escape codes. Then I implemented CPU instructions basically in the order they're encountered in the BASIC ROM (obviously doing the "easy" stuff that was similar at the same time).
As things progress you need to flesh out a bit of the hardware at a time or fake it for the time being. Seeing the initial copyright message was really rewarding
Sadly I wasn't using version control beyond "copy the old files somewhere safe" at the time, so I can't trace through and see what got implemented when. Suspect once it sat there with a cursor flashing, some sort of proper video and keyboard input would have been next. It was good fun...
As things progress you need to flesh out a bit of the hardware at a time or fake it for the time being. Seeing the initial copyright message was really rewarding
Sadly I wasn't using version control beyond "copy the old files somewhere safe" at the time, so I can't trace through and see what got implemented when. Suspect once it sat there with a cursor flashing, some sort of proper video and keyboard input would have been next. It was good fun...
Re: Dragon emulator written in Python ???
That's simmilar to my way. I get writes to 0x0400 (see post above):sixxie wrote:The way I started with XRoar was to have some RAM, load the ROMs and periodically dump the state of 0x0400 - 0x05FF to the console using VT100 escape codes. Then I implemented CPU instructions basically in the order they're encountered in the BASIC ROM (obviously doing the "easy" stuff that was similar at the same time).
But i think '`' is a "wrong" char, isn't it?jedie wrote:$ba80 ST8 store value $60 from B at $401 | $401: $400-$5ff - Default Text screen
**** TODO: write $60 '`' to text screen address $401
Yes, is hope to get it at least to this point...sixxie wrote:Seeing the initial copyright message was really rewarding
Currently i work on the support for Simple6809 and Dragon by changing the CLI arguments.
... 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
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
Re: Dragon emulator written in Python ???
It's just what 0x60 is in ASCII. On the VDG 0x60 is an empty character cell. The VDG character set is not a direct ASCII mapping - the BASIC ROM does the interpretation when you PRINT CHR$(...). For intelligible output you'll have to do a certain amount of translating values.jedie wrote: But i think '`' is a "wrong" char, isn't it?
Last edited by sixxie on Mon Oct 07, 2013 10:49 am, edited 1 time in total.
Re: Dragon emulator written in Python ???
Ah! that's good news! Thanks!sixxie wrote:It's just what 0x60 is in ASCII. On the VDG 0x60 is an empty character cell. The VDG character set is not a direct ASCII mapping - the BASIC ROM does the interpretation when you PRINT CHR$(...). For intelligable output you'll have to do a certain amount of translating values.jedie wrote: But i think '`' is a "wrong" char, isn't it?
I have started to support for Simple6809 with: https://github.com/jedie/DragonPy/commi ... a03c5d7a9c
... 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
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809