Re: Another year, another pyz80 revision

2007-04-12 Thread Edwin Blink


From: "Simon Owen" <[EMAIL PROTECTED]>

Converting existing source files is fairly easy, using the print-to-file 
feature in SimCoupe.


you can also use the COMetCONverter utiliy to convert txt files to comet 
source

and vice versa.

http://home.wanadoo.nl/edwin.blink/samcoupe/software/comet/comcon.zip


So, what are you waiting for? :-)


Must have a go at it then. Wondering why I have not tried it yet...

Edwin 



Re: Another year, another pyz80 revision

2007-04-12 Thread Stuart Brady
On Thu, Apr 12, 2007 at 04:26:15PM +0100, Simon Owen wrote:
> True source-level debugging is difficult without proper integration of 
> the editor and assembler tools, and I'd definitely not want to edit 
> source code inside SimCoupe.  Even just having my text editor alongside 
> while I'm single-stepping is a huge improvement on how it used to be.

Don't all laugh at once, but I've been wondering about hooking GDB up to
some emulators, and perhaps even adding debugging support to one of the
Z80 C compilers to use with GDB.  I can imagine that this would be a
pretty big task, though.

What got me thinking about this is the Z80 target for QEMU that I've
been writing.  QEMU is an emulator that uses dynamic recompilation to
convert emulated code into machine code appropriate for the system that
it is running on.  QEMU provides support for debugging emulated machines
using GDB -- however, GDB lacks remote debugging support for the Z80.

BTW, if anyone's interested in this:
http://homepage.ntlworld.com/wholehog/stuart/qemu/index.html

Currently, it only emulates the 48K Spectrum, but I would welcome patches
to fix bugs or add features (such as SAM emulation :-)

(BTW, I am not especially interested in emulating undefined behaviour at
this point, nor am I interested in accurate timings.)

Cheers,
--
Stuart Brady


Re: Another year, another pyz80 revision

2007-04-12 Thread Simon Owen

Andrew Collier wrote:

"SimCoupe: The Eclipse Plug-in"


Does emacs not have a SAM emulation mode yet?

Si



Re: Another year, another pyz80 revision

2007-04-12 Thread Simon Owen

Geoff Winkless wrote:

step through the source and modify any line I want without restarting.

> I was only kidding, hence the smiley.

I completely misinterpreted your smiley - maybe as it's not tooo out of 
the question, even if it's not easy!


Labels tied in to source files would be very good, perhaps with a global 
symbol file for the ROMs.  Mmmm


Si


Re: Another year, another pyz80 revision

2007-04-12 Thread Andrew Collier
On Thu, Apr 12, 2007 at 03:34:33PM +0100, Geoff Winkless wrote:
> Simon Owen wrote:

> > So, what are you waiting for? :-)
> 
> Integration with SimCoupé to include clock-accurate debug stepping and
> real-time code reassembly? :)

"SimCoupe: The Eclipse Plug-in"

Andrew

-- 
 ---   Andrew Collier 
   http://www.intensity.org.uk/ ---
  --
r<2+ T<4* cSEL dMS hEn/CB

RE: Another year, another pyz80 revision

2007-04-12 Thread Geoff Winkless
Simon Owen wrote:
> Geoff Winkless wrote:
>> and real-time code reassembly? :)
> 
> To inject new code into a running SimCoupe, or something more?  It

Well ideally what I would want is proper integration with the debugger and
the source editor, so I can - Visual Basic stylee - step through the source
and modify any line I want without restarting. I was only kidding, hence the
smiley.

Geoff


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


Re: Another year, another pyz80 revision

2007-04-12 Thread Simon Owen

Geoff Winkless wrote:

Integration with SimCoupé to include clock-accurate debug stepping


We do have some of that already, with the raster accurate display 
updates when stepping, and tstate timings shown for instructions and 
stepped-over blocks.  Should be easy to debug fancy display effects.


True source-level debugging is difficult without proper integration of 
the editor and assembler tools, and I'd definitely not want to edit 
source code inside SimCoupe.  Even just having my text editor alongside 
while I'm single-stepping is a huge improvement on how it used to be.


A balance might be to have the assembler output label and source line 
information that the SimCoupe debugger can use to show portions of the 
original file.  Or even just having known labels in the disassembly 
window would make quite a difference.




and real-time code reassembly? :)


To inject new code into a running SimCoupe, or something more?  It would 
be nice to have a socket interface to the core, for debugger-like 
functions and other live tweaking.  Maybe someone can write their own 
then ;-)


The pyz80 setup works well for me because it starts with a clean system 
each time, adding in the new code and data files I want in memory.  That 
way I can be sure I've not corrupted anything and am not relying on some 
thing from the old state.  For live injection there's still the Import 
feature, but that's only really convenient for occasionally importing 
single files.


Si


RE: Another year, another pyz80 revision

2007-04-12 Thread Geoff Winkless
Simon Owen wrote:
> Andrew Collier wrote:
>> So if you're doing any assembly language development on the Sam,
>  > why not check it out?

> Output from other assemblers may need a some tweaking, particularly if
> the labels lack a trailing colon.  The assembler directives might be
> slightly different too, but that's only a small part of the source.
> 
> So, what are you waiting for? :-)

Integration with SimCoupé to include clock-accurate debug stepping and
real-time code reassembly? :)

Geoff


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


Re: Another year, another pyz80 revision

2007-04-12 Thread Simon Owen

Andrew Collier wrote:

So if you're doing any assembly language development on the Sam,

> why not check it out?

I'm a big fan, and have already moved a dozen or so projects over to it. 
 I really can't see myself going back to using a SAM-based assembler...


Why switch?  Assembly time is pretty much instant, and you get to use 
your favourite text editor for the code.  A single command-line can have 
it assembled and launched in SimCoupe for testing.  Using auto-boot in 
SimCoupe and the "autoexec" keyword in your source file, the code will 
be running within a second of you hitting return.  What more can you ask 
for?


Converting existing source files is fairly easy, using the print-to-file 
feature in SimCoupe.  Just print the source from Comet and you'll have a 
plain text file ready to feed into pyz80 - chances are you won't need to 
change anything for it to work.


Output from other assemblers may need a some tweaking, particularly if 
the labels lack a trailing colon.  The assembler directives might be 
slightly different too, but that's only a small part of the source.


So, what are you waiting for? :-)

Si



Re: Another year,another pyz80 revision

2007-04-11 Thread Bob Wilkinson

Thanks Andrew.

I've only modified one source file, :)  will adjust it back..

Nice work :)

Bob.

Andrew Collier wrote:


On 11 Apr 2007, at 01:40, Bob Wilkinson wrote:

Does it allow mixed labels Andrew, or is "LOOP" the same as "loop"  
as before COMET allows the mix of upper case and lower case  
labels and they are treated as separate labels.



Hi Bob,

Yes, labels can be treated case-sensitively now. However, I made it a  
command-line option to enable this behaviour (because I had already  
started writing source files which didn't obey this rule). Add --case  
to the command line to get Comet's behaviour.


Andrew



Re: Another year,another pyz80 revision

2007-04-11 Thread Andrew Collier

On 11 Apr 2007, at 01:40, Bob Wilkinson wrote:

Does it allow mixed labels Andrew, or is "LOOP" the same as "loop"  
as before COMET allows the mix of upper case and lower case  
labels and they are treated as separate labels.


Hi Bob,

Yes, labels can be treated case-sensitively now. However, I made it a  
command-line option to enable this behaviour (because I had already  
started writing source files which didn't obey this rule). Add --case  
to the command line to get Comet's behaviour.


Andrew

--
 ---   Andrew Collier 
   http://www.intensity.org.uk/ ---
  --




Re: Another year,another pyz80 revision

2007-04-10 Thread Bob Wilkinson
Does it allow mixed labels Andrew, or is "LOOP" the same as "loop" as 
before COMET allows the mix of upper case and lower case labels and 
they are treated as separate labels.


Bob Wilkinson.



Another year, another pyz80 revision

2007-04-10 Thread Andrew Collier

Hi all,

Just wanted to let you know that I have released pyz80 version 1.0,  
available for download from my web site or sourceforge.


pyz80 is a z80 cross-assembler; meaning that you run it on your PC or  
Mac or unix box (i.e. anywhere that Python can be installed) and it  
will output z80 object code in disk images suitable for copying onto  
a Sam floppy disk or loading into SimCoupe.


New features in this release include:

- better compatibility with existing COMET-syntax source files.
- support for all Z80 instructions including every undocumented op-code.
- extended syntax with FOR loops, IF ... ELSE constructs, local  
symbols and more.


So if you're doing any assembly language development on the Sam, why  
not check it out?


http://sourceforge.net/projects/pyz80


Cheers,
Andrew

--
 ---   Andrew Collier 
   http://www.intensity.org.uk/ ---
  --