XRoar 0.32 released

A place to discuss everything Dragon related that doesn't fall into the other categories.
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

XRoar 0.32 released

Post by sixxie »

Here it is: http://www.6809.org.uk/xroar/

No real excitement to this one - lots of minor changes listed in the ChangeLog.

The biggest single update would be the new Windows UI - so I've not pushed a GTK+ executable this time. It's not perfect, and if anyone out there knows much about Windows programming, some insight into the "missed clicks" would be useful.

Never did manage to replicate that Delta problem. The only issue I see is that if you put a blank disk in after power up, "INIT A" will fail the first time, then succeed the second. If the disk is inserted *before* you press a key, it'll give a seek error before returning to the BASIC prompt, then "INIT A" will succeed.

Anyway, hope the new UI is useful. Do let me know of any regressions.
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: XRoar 0.32 released

Post by pser1 »

Hello Ciaran,
I have been trying the GDB and now when it starts under Win7, it accepts both:
layout asm
layout regs
But these two windows use the very same window area, I mean that with just "asm" you can see about 14 lines of disassembled code, whereas having both opened
you just have six for registers and seven for disassembled code.
The regs window never shows the registers S, U, only: CC,A,B,DP,X,Y are shown.
This is what you could see if you don't change the dimensions of the emulated DOS window under Windows 7

It turns out that you MUST give it the maximum heigh in order to gain more lines for every sub-window.
I attach here a Word doc with some screenshots to explain these cases.
I ended up with not less that 20 lines for disassembled code and seeing all of the registers, the 6309 special ones included!

Just one question: Does GDB disassemble 6309 code, maybe with a special parameter ?
The test I include at the end of the Word Text, shows a bad disassembled 6309 code.
These two special 6309 opcodes are ignored or bad translated
7002 01 AA 55 should be *OIM <$AA,$55
7005 02 F0 55 should be *AIM <$F0,$55

Anyway, that's a great forward leap for helping debugging.

Thanks a lot!!
pere
Attachments
GDB Test.zip
GDB Test - Screen shots
(426.1 KiB) Downloaded 213 times
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: XRoar 0.32 released

Post by sixxie »

Sorry, the GDB patch doesn't do 6309 yet. XRoar does offer up the 6309 registers though, as you've seen.

As for the limitations of the TUI, what you really want is a proper GUI front-end that can make use of m6809-gdb. Turns out that's trickier than it looks under Windows:

Under Unix, DDD is an old but functional GUI front-end to GDB, and works well with a small patch (it's unmaintained, and GDB changed in the meantime). It might well be available as part of Cygwin, but you'd probably end up needing to run an X server too.

Most of the other available front-ends I can find throw up obstacles:

Qt Creator seems to demand a local binary object even when connecting to a remote target (I think it should fall through to a dummy object type). Because of that, I wasn't able to explore further - it might not even handle instruction level operation.

Codelite doesn't even seem to support remote targets at all.

WinGDB looks like it's a plugin for Visual whatever - I can't test that, and it's commercial with a trial period.

Affinic Debugger GUI for GDB is a standalone app, but it doesn't start up under Wine, so also not tested. Also commercial with a trial period.

I think in general, the use of a debugger to inspect at the instruction level isn't something these GUI programmers really think of - sad...
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: XRoar 0.32 released

Post by pser1 »

Hello Ciaran,
I am not in a hurry, I don't use to program 6309 everyday!
I changed the DOS window configuration, so that the letters are greater without losing the number of lines, so it is much better for the user to work with it.
What I have found is that despite I am steping the code forward, nothing happens in the XRoar window. I mean that if the program is meant to modify the text screen, nothing happens while you are debugging with GBD.
Only when you issue the command "cont", XRoar gets control again and it executes everything from the beginning.
Is this what I should expect?
thanks again
pere
User avatar
robcfg
Posts: 1529
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Re: XRoar 0.32 released

Post by robcfg »

I do like the new UI, great work!

How do you compile it for windows? If I can compile it under Visual Studio, then I could trace the problems.

Regards,
Rob
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: XRoar 0.32 released

Post by sixxie »

robcfg wrote: How do you compile it for windows? If I can compile it under Visual Studio, then I could trace the problems.
I compile it using MinGW from a Linux box. It should be possible to do it directly on a Windows machine if you have MSYS installed, but I've never tried it.

Code: Select all

./configure --host=i686-w64-mingw32
make
The relevant code is in src/windows32/ui_windows32.c. You can see in there that the SDL video subsystem is initialised, and the "hwnd" extracted. A menu is created (separated out over several functions, but they all do pretty basic stuff).

When an SDL video module actually opens the window, it calls sdl_windows32_update_menu(), which calls SetMenu() as appropriate to add or remove the menu depending on fullscreen mode.

You can see another function in there called sdl_windows32_handle_syswmevent() which handles the menu selections. This is called from the main SDL event loop in sdl_run() in src/sdl/common.c.

I feel that I should be handling more message types - especially when using the OpenGL video output, where menus don't disappear as you move between them. But any example code I've found online does only this stuff. The online MS help pages about menus don't mention anything else needing to be handled, but the relevant message could be somewhere else entirely, and affect which "hwnd" is notified of menu selections.
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: XRoar 0.32 released

Post by pser1 »

Hello Ciaran,
I have found snapshot 22229 on the web and so, I have downloaded it.
I have used it for a while whith some emulations, but I can't spot the differences with respect to the version 3.2
By the way, incredibly helpfull GDB!!!
I am working on a program that intercepts DOS commands, so it reacts when you are on the Basic screen or inside a Basic program (detects the tokens).
I have not been able to debug it with DiskDream, as the breakpoints seem to be deleted as soon as you get out of the program.
Maybe there is a trick not to lose them, but I just don't know how to do it.
With GDB I have been able to do all the tests I needed. I could even put breakpoints at ROM space, great indeed!
regards
pere
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: XRoar 0.32 released

Post by sixxie »

pser1 wrote: I have found snapshot 22229 on the web and so, I have downloaded it.
I have used it for a while whith some emulations, but I can't spot the differences with respect to the version 3.2
Very few in that one, a few more in the new one I just pushed out. You can check the ChangeLog files in the same directory, but here's what's new in the most recent one:
  • New option -tape-ao-rate hz - specifies output samplerate for wav files.
  • New option -timeout-motoroff s - quits s seconds after tape motor off.
  • New option -snap-motoroff file - creates snapshots on tape motor off.
  • New option -tape-channel-mode mode - specifies how to read stereo audio files: mix, left or right.
Some of these are good for standalone tape rewriting, e.g.:

Code: Select all

xroar -ui null -ao null \
	-load luciferskingdom.wav -tape-rewrite -tape-write luciferskingdom.cas \
	-timeout-motoroff 1 -tape-channel-mode right \
	-type CLEAR1,32767:CLOADM\\r
Will open the stereo audio file "luciferskingdom.wav", reading only the right channel and load it with the appropriate command. ROM calls are intercepted to rewrite the data to "luciferskingdom.cas". Once the tape motor is turned off for 1s (i.e., after loading but not immediately after the header block), the emulator quits. No user-interface is displayed.

A bit of a complex command line, but shows what's possible.
By the way, incredibly helpfull GDB!!!
I'm glad to hear it's been of use!
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: XRoar 0.32 released

Post by pser1 »

back again, Ciaran
I am trying to add the possible emulated machines to the menu, by creating them in the xroar.conf and it really does it, but once I have started xroar with a bat file that copies the needed roms to the xroar directory, the program starts and works without problems, but when I want to change of machine by the menu, I only get garbage on the screen. It seems to show that xroar is not able to locate the needed roms for the new chosen machine.
I don't know how to prevent this error, I don't want to copy all of the possible roms in the xroar directory, instead I have two directories, one for Basic and another for DOS roms
I have read that XROAR_ROM_PATH environment variable is deprecated so not a good idea for me ...
Any advice to be able to change of emulated machine via the menu?
This is the xroar.conf I have created

Code: Select all

machine color64
machine-desc Color 64 (Brazilian)
machine-arch coco
ram 64

machine cp400-16
machine-desc CP-400 16K (Brazilian)
machine-arch coco
ram 16

machine cp400-64
machine-desc CP-400 64K (Brazilian)
machine-arch coco
ram 64

machine dragon200
machine-desc Dragon 200 (Eurohard)
machine-arch dragon200e
ram 64

machine pippin
machine-desc Dragon Pippin (prototype)
machine-arch dragon32
ram 16

thanks beforehand
pere

Ps. by the way, the brazilian machines don't start if I use machine-arch cocous, they only work with coco. In Brazil they had PAL B/G, I think. Is this one supported or simply treated as NTSC?
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: XRoar 0.32 released

Post by pser1 »

I have added this line to the config file:
rompath=:d:/XRoar/DOS-ROMs/:d:/XRoar/ROMs/
And it seems to work for some machines, but not with Dragon200E and some others ... will keep on searching
regards
pere
Post Reply