Discussion:
Merlin 32 (Brutal Deluxe) Questions
(too old to reply)
Hugh Hood
2014-10-04 06:35:04 UTC
Permalink
Fellas,

Have any of you built and used Antoine and Olivier's 'Merlin 32' for the
Unix command line?

<http://www.brutaldeluxe.fr/products/crossdevtools/merlin/index.html>


The download link for the Windows build (and the source code) for Merlin 32
is at the bottom of that page but it doesn't seem to be working at the
moment, or at least it won't for me.

Also, the docs mention using the companion Cross-Dev tool 'Cadius' first to
strip the high bit from 'real' Merlin Source files before feeding them to
Merlin 32, but I'm wondering if the Merlin 32 source couldn't be slightly
modified to do a bitwise 'and' operator (e.g. aByte = aByte & 0x007F;) on
the incoming text to eliminate this step.

I ask because I have been following Carrington Vanston's
<http://monsterfeet.com/kfest/> and Quinn Dunki's
<http://quinndunki.com/blondihacks/?p=1904> work with a rapid Apple II code
development system using Xcode on the Mac.

Their processes, however, use CC65/CA65 as the assembler/compiler component
of the 'pipeline', but as you know, Merlin syntax and CA65 syntax aren't
exactly the same. So, if Merlin 32 could be substituted for CC65, I think
that would be just swell for us Merlin diehards.

Antoine?





Hugh Hood
Bill Garber
2014-10-04 08:07:47 UTC
Permalink
Post by Hugh Hood
Fellas,
Have any of you built and used Antoine and Olivier's
'Merlin 32' for the Unix command line?
<http://www.brutaldeluxe.fr/products/crossdevtools/merlin/index.html>
The download link for the Windows build (and the source code)
for Merlin 32 is at the bottom of that page but it doesn't
seem to be working at the moment, or at least it won't for me.
It said "no file" when I tried to get it.

Bill Garber
http://www.sepa-electronics.com
Post by Hugh Hood
Also, the docs mention using the companion Cross-Dev tool 'Cadius'
first to strip the high bit from 'real' Merlin Source files before
feeding them to Merlin 32, but I'm wondering if the Merlin 32 source
couldn't be slightly modified to do a bitwise 'and' operator (e.g.
aByte = aByte & 0x007F;) on the incoming text to eliminate this step.
I ask because I have been following Carrington Vanston's
<http://monsterfeet.com/kfest/> and Quinn Dunki's
<http://quinndunki.com/blondihacks/?p=1904> work with a rapid
Apple II code development system using Xcode on the Mac.
Their processes, however, use CC65/CA65 as the assembler/compiler
component of the 'pipeline', but as you know, Merlin syntax and
CA65 syntax aren't exactly the same. So, if Merlin 32 could be
substituted for CC65, I think that would be just swell for us
Merlin diehards.
Antoine?
Hugh Hood
Bill Buckels
2014-10-04 08:27:48 UTC
Permalink
Rapid Apple II code development system using Xcode on the Mac.
Hugh, this all seems way more convoluted than running a make file in a
console windows then starting-up CiderPress to pop a compiled program onto a
disk image, then clicking on the disk image to start the AppleWin emulator
and test the compiled cc65 program, like I have been doing for the last many
years. My process takes about 20-30 seconds and I just described it in a
single sentence.

This pipeline seems like it replaces a 5 gallon pail.

I looked for some real work, like cc65 programs that do something and didn't
see any, so I assume this is just some demo and nobody really did any work
there. Have a look at my recent work in cc65 with SHR and DHGR and DLGR for
some cc65 programs (My latest work with DHGR conversion is part of this
too...) so it's not like nobody does any work around here. I just don't see
any there.

I think you would be just as far ahead to write your code in your
programmmer's editor and just keep afew windows open and do things the way
you have been doing them.

Or am I mising something?

Bill
Antoine Vignau
2014-10-04 13:29:36 UTC
Permalink
Merlin 32 is not ready yet. It is being tested and some useful features (at least for me) are being added.

Olivier will probably tell us more,
av
Hugh Hood
2014-10-04 19:22:01 UTC
Permalink
Bill,
Post by Bill Buckels
Hugh, this all seems way more convoluted than running a make file in a
console windows then starting-up CiderPress to pop a compiled program onto a
disk image, then clicking on the disk image to start the AppleWin emulator
and test the compiled cc65 program, like I have been doing for the last many
years. My process takes about 20-30 seconds and I just described it in a
single sentence.
OK, I'll admit that involving something like Xcode in the process to
assemble and compile Apple II source files does seem a bit like using a
jackhammer to drive a thumbtack. Point taken. But, these methods offer
plenty of the 'gee whiz' factor to things by automagically saving the object
code to a disk image and then running the code in the emulator. As you point
out, maybe there's not much time savings when compared your method, but ...
Gee whiz!
Post by Bill Buckels
I think you would be just as far ahead to write your code in your
programmmer's editor and just keep afew windows open and do things the way
you have been doing them.
Being a Merlin programmer, with access to quite a few subroutines written
using Merlin syntax (both mine and others), I'd like a way to assemble
Merlin files on the modern platform, rather than having to process them with
Merlin 16 on a (real or emulated) IIGS. _That_ is why I'm really interested
in Brutal Deluxe's Merlin 32. It should do for Merlin programmers what CC65
has done for 'C' programmers, such as yourself.
Post by Bill Buckels
Have a look at my recent work in cc65 with SHR and DHGR and DLGR for
some cc65 programs (My latest work with DHGR conversion is part of this
too...) so it's not like nobody does any work around here.
You've been very busy. No doubt. Frankly, I wonder how you ever find time to
fish. <grin>


One final question, open to anyone who can answer it --

Is there a text/code editor, either Windows or Mac, that supports _multiple_
variable tab stops? I'd prefer a code editor with syntax coloring, but I'm
not picky.

Everything I've used or seen on the Mac will support changing the tab
spacing to 'x', but it applies to _every_ tab on a line.

For example, I prefer my Merlin tab spacing at 15/22/34. Heck, AppleWorks
5.1 on the Apple II handles that great. BBEdit on the Mac sure won't. I can
set the tab spacing to 15, but then the next (2) are at 30 and 45,
respectively. Sure, I can expand the line out wider than 80 columns, but...

Surely, some 'modern' platform text editor supports what AppleWorks does. Is
that too much to ask? Tell me I missed something.






Hugh Hood
roughana
2014-10-08 02:30:52 UTC
Permalink
Post by Hugh Hood
Is there a text/code editor, either Windows or Mac, that supports _multiple_
variable tab stops? I'd prefer a code editor with syntax coloring, but I'm
not picky.
I haven't yet looked at it, but this claims to be "a [text editor] you can customize to do anything"
https://atom.io/

Regards,
Andrew
mdj
2014-10-08 15:14:43 UTC
Permalink
Post by Hugh Hood
Surely, some 'modern' platform text editor supports what AppleWorks does. Is
that too much to ask? Tell me I missed something.
In Emacs, just change the value of tab-stop-list.
Hugh Hood
2014-10-09 04:18:15 UTC
Permalink
Matt:

Thanks. Concerning code editors, I had completely overlooked Emacs, and as
you said, it does allow variable tab stops (and about a million other
things!), as does the Aquamacs Emacs version.

I also missed TextEdit on the Mac, which does allow variable tab stops, but
it is probably not something I'd use for code editing.





Hugh Hood
Post by mdj
Post by Hugh Hood
Surely, some 'modern' platform text editor supports what AppleWorks does. Is
that too much to ask? Tell me I missed something.
In Emacs, just change the value of tab-stop-list.
mdj
2014-10-09 07:49:48 UTC
Permalink
Post by Hugh Hood
Thanks. Concerning code editors, I had completely overlooked Emacs, and as
you said, it does allow variable tab stops (and about a million other
things!), as does the Aquamacs Emacs version.
I just use a standard build myself, which you can get at http://emacsformacosx.com/, or install it with MacPorts.

I run fullscreen so it's much like a terminal, but with the better font handling capabilities of a GUI, so I have no need/desire for the Aquamacs stuff.
Post by Hugh Hood
I also missed TextEdit on the Mac, which does allow variable tab stops, but
it is probably not something I'd use for code editing.
Well, it has the advantage of being better than nothing ;-)
Olivier Zardini
2014-10-04 14:36:51 UTC
Permalink
Post by Hugh Hood
The download link for the Windows build (and the source code) for Merlin 32
is at the bottom of that page but it doesn't seem to be working at the
moment, or at least it won't for me.
Because the documentation is usually the boring part of a project, the Merlin 32 documentation was written before then end of programming work. It is also a good reference to Merlin 16+ options. So even if you are not using Merlin 32 right now the documentation may help you.

Merlin 32 exists today and some people have received a beta version. This current version does exactly everything that is describe in the documentation except the OMF Multi-Segment part. So currently, Merlin 32 can be used to assemble 64 KB of 6502 / 65c02 / 65816 code and can also create Single OMF S16 files. So for GS/OS files, your are currently limited to 64 KB of code (S16 are bigger due to the dictionary size).

Because the way Merlin 16+ was handling Multi-Segment OMF files was not what we could expect, we have decided to build a new Make file for such large project.

So you should be able to take your existing Merlin 16+ files and assemble them with Merlin 32 without having to do any modifications. If you are building large OMF file (having more than 1 Segment), you should create a small text file describing the OMF structure.

Cadius is useful to indent the text file. Usually, you open your NotePad (or any other Text editor) and you write there your code. You can use Spaces or Tab characters to indent the code (separate Label, Opcode, Operand and Comment columns) but at the end, it is easier to ask Cadius to re-indent everything for a proper indentation.

The other interest of Cadius is its capability to prepare (SETHIGHBIT) and transfer the source files (ADDFILE) to a .2mg disk Image. This is useful if you want to get your source file back to the Apple IIgs world in case you wish to assemble it with Merlin 16+.

Since I'm using Merlin 32, I no longer use Merlin 16+. Editing & Assembling on the PC is much more efficient than working on the Apple IIgs side. The output file lets you see what has been assembled and can be used during trace session.

We can send you the beta version if your code is compatible with current version constraints (only one OMF Segment for S16 files)

Regards,

Olivier ZARDINI
Hugh Hood
2014-10-04 19:55:09 UTC
Permalink
Olivier,
Post by Olivier Zardini
Because the documentation is usually the boring part of a project, the
Merlin 32 documentation was written before then end of programming work. It is
also a good reference to Merlin 16+ options. So even if you are not using
Merlin 32 right now the documentation may help you.
I agree. That is a very good Merlin reference. So good, that I printed a
copy to pdf. Thanks.
Post by Olivier Zardini
Since I'm using Merlin 32, I no longer use Merlin 16+. Editing & Assembling
on the PC is much more efficient than working on the Apple IIgs side. The
output file lets you see what has been assembled and can be used during trace
session.
Excellent! Kelvin Sherlock built a very nice process in Mac OS X for ORCA/M
files <https://bitbucket.org/ksherlock/mpw>, but we Merlin guys need not
apply there, of course. Your work should fill that void nicely.
Post by Olivier Zardini
We can send you the beta version if your code is compatible with current
version constraints (only one OMF Segment for S16 files)
While my code is compatible with the current constraints, I think I'll wait
for the chefs to finish the dish before I begin the meal. I do, however,
appreciate your offer.

Best regards,





Hugh Hood
roughana
2014-10-08 01:13:53 UTC
Permalink
Hi Oliver,
I'm really interested in Brutal Deluxe's Merlin 32. It should do for Merlin programmers what CC65 has done for 'C' programmers.
Amen.
We can send you the beta version
Yes please.

Thanks,
Andrew
Jeff Blakeney
2014-10-08 11:40:16 UTC
Permalink
Post by roughana
Hi Oliver,
I'm really interested in Brutal Deluxe's Merlin 32. It should do for Merlin programmers what CC65 has done for 'C' programmers.
Amen.
We can send you the beta version
Yes please.
This is the first I've heard of Merlin 32 and the funny thing is, while
at KansasFest this year, I realized just how out of touch I've gotten
with my IIgs programming. Shortly after getting back it occurred to me
that I could improve my coding environment as well as refreshing my
65816 assembly knowledge by writing a 65816 macro assembler for Windows.
I've never used Merlin on a real Apple II so I'm not sure whether I'd
be comfortable with Merlin 32.

Guess I should check out what I can about Merlin 32 but I may not give
up on my project as I was thinking I might expand it to be a BASIC
compiler as well that support inline assembly.
Steve Nickolas
2014-10-08 11:56:30 UTC
Permalink
This is the first I've heard of Merlin 32 and the funny thing is, while at
KansasFest this year, I realized just how out of touch I've gotten with my
IIgs programming. Shortly after getting back it occurred to me that I could
improve my coding environment as well as refreshing my 65816 assembly
knowledge by writing a 65816 macro assembler for Windows. I've never used
Merlin on a real Apple II so I'm not sure whether I'd be comfortable with
Merlin 32.
Guess I should check out what I can about Merlin 32 but I may not give up on
my project as I was thinking I might expand it to be a BASIC compiler as well
that support inline assembly.
Well, ca65 can act as a 65816 macro assembler...

-uso.
mdj
2014-10-09 13:14:51 UTC
Permalink
Post by Olivier Zardini
We can send you the beta version if your code is compatible with current version constraints (only one OMF Segment for S16 files)
I'd like to use Merlin32 as a Merlin 8/16 compatible tool on MacOS X and Linux. Are there plans to support the 8 bit REL format in addition to OMF ?

A short presentation I'm planning for OzKFest 2015 would be greatly aided by Merlin32 being available, so I would be really happy if the source was available soon :-)

Matt
Olivier Zardini
2014-10-09 19:41:34 UTC
Permalink
Gentlemen,

So you know what you do using this pre-relase. There is no source code yet because this is a work in progress. If something goes wrong, send me the source code file + the command you have used and a short description of what you consider to be the issue and I may have a look. Read the documentation, you will find there what you need. This is currently Windows only but other platforms will be there for the final release.

You can use Cadius to format your source code and send back the results into an prodos Image Disk.

Have fun.

http://www.brutaldeluxe.fr/products/crossdevtools/merlin/Merlin32.zip

Olivier
Antoine Vignau
2014-10-09 20:13:00 UTC
Permalink
Oh, il a donné le programme ;-)
toto
Olivier Zardini
2014-10-10 18:49:38 UTC
Permalink
Post by Antoine Vignau
Oh, il a donné le programme ;-)
toto
Meuuh non... Oups, ça c'est vu ?
Hugh Hood
2014-10-10 14:53:34 UTC
Permalink
Olivier:

Thank you for allowing us to look behind the curtain.

I admit that it is much too early for you to consider feature requests, but
I do have one thing that I hope you consider adding to your Merlin 32.
As a result, if everything went ok, you get one binary file (fixed position
object code or OMF file) and, if the -V option was enabled, a text file
In addition to the text file containing the output of the assembly process
(i.e. The -V option), could you add another option to generate a text file
duplicating the results generated by the Merlin 8/16 'Printfiler' utility,
which shows the assembly listing including the addresses and bytes?

I can't explain it, but for some reason I have always preferred to read
source code with the addresses and bytes included to the left. Perhaps I'm
strange in that regard. I certainly won't rule that out.

Thanks.




Hugh Hood
Gentlemen,
So you know what you do using this pre-relase. There is no source code yet
because this is a work in progress. If something goes wrong, send me the
source code file + the command you have used and a short description of what
you consider to be the issue and I may have a look. Read the documentation,
you will find there what you need. This is currently Windows only but other
platforms will be there for the final release.
You can use Cadius to format your source code and send back the results into
an prodos Image Disk.
Have fun.
http://www.brutaldeluxe.fr/products/crossdevtools/merlin/Merlin32.zip
Olivier
Steve Nickolas
2014-10-10 15:23:22 UTC
Permalink
Post by Hugh Hood
I can't explain it, but for some reason I have always preferred to read
source code with the addresses and bytes included to the left. Perhaps I'm
strange in that regard. I certainly won't rule that out.
The script I use to run my code through ca65 is set up to do that too.

-uso.
Olivier Zardini
2014-10-10 18:48:39 UTC
Permalink
Post by Hugh Hood
I admit that it is much too early for you to consider feature requests,
Not at all. After, it will be too late, so if you want some stuffs, speak now or forever hold your peace... ^_^
Post by Hugh Hood
In addition to the text file containing the output of the assembly process
(i.e. The -V option), could you add another option to generate a text file
duplicating the results generated by the Merlin 8/16 'Printfiler' utility,
which shows the assembly listing including the addresses and bytes?
Hum. Have you tried already the software ? Because what you describe looks like the result of the -V option...

Olivier
Bill Garber
2014-10-10 21:56:46 UTC
Permalink
Post by Olivier Zardini
Post by Hugh Hood
I admit that it is much too early for you to consider feature requests,
Not at all. After, it will be too late, so if you want some stuffs,
speak now or forever hold your peace... ^_^
Yes, after will be too late. There will be 'NO' updating of software
once it is completed. LOL I hope that is not what you meant. 8>)
Post by Olivier Zardini
In addition to the text file containing the output of the assembly
process (i.e. The -V option), could you add another option to
generate a text file duplicating the results generated by the
Merlin 8/16 'Printfiler' utility, which shows the assembly listing
including the addresses and bytes?
Hum. Have you tried already the software ? Because what
you describe looks like the result of the -V option...
Olivier
I have tried it, and I agree that there is too much info in the text
file that is output. We are used to seeing Line#, Address, Instruction,
and then the source code in that file.

Bill Garber
http://www.sepa-electronics.com
Olivier Zardini
2014-10-11 09:37:13 UTC
Permalink
Post by Bill Garber
Post by Olivier Zardini
Not at all. After, it will be too late, so if you want some stuffs,
speak now or forever hold your peace... ^_^
Yes, after will be too late. There will be 'NO' updating of software
once it is completed. LOL I hope that is not what you meant. 8>)
It is.

I'm going to spend some times to complete it (remove bugs, handle multi OMF Segments, add extra stuff asked here) and I'll publish the official v1.0 with source code.

Everything else, you will do it yourself thanks to its open source distribution :-) Of course, I'll clean up any bugs found after the first release but I'm not going to spend years on this one. This in one software among many others, and the to Do List is long...
Post by Bill Garber
I have tried it, and I agree that there is too much info in the text
file that is output. We are used to seeing Line#, Address, Instruction,
and then the source code in that file.
Merlin 32 targets the Apple IIgs. You can use use it as a 6502 or 65c02 assembler, but its main purpose is to assemble Apple IIgs code. Because of that, we need to keep track of the MX bits of the status register to know if we are assembling 8 or 16 bit. We also need to display information related to Relocation (number of bytes relocated and binary operation performed). The Apple IIgs projects can be big and imply most of the time many source files. So we need also to display the file names and the line numbers (local and global). At the time, we were printing the result of Merlin 16+ assembly. Now, we use a text editor (and its search function) to dive in the code.

Merlin 16+ was a 8 bit assembler enhanced to assemble 16 bit code. Here we have really started by thinking what was useful when we assemble a 16 bit file. We are no more limited to 80 columns display on the screen or by the size of the output file, so we push on the assembly result file what we think is useful. If you only care about the right part of the output, use a script to remove the extra columns, or wait for the final release and you will modify the sprintf() used to create the output file. Some text editor like PsPad let you select by column. You can easily remove everything you don't like.

Olivier
Steve Nickolas
2014-10-11 10:16:02 UTC
Permalink
Post by Olivier Zardini
Merlin 16+ was a 8 bit assembler enhanced to assemble 16 bit code. Here
we have really started by thinking what was useful when we assemble a 16
bit file. We are no more limited to 80 columns display on the screen or
by the size of the output file, so we push on the assembly result file
what we think is useful. If you only care about the right part of the
output, use a script to remove the extra columns, or wait for the final
release and you will modify the sprintf() used to create the output
file. Some text editor like PsPad let you select by column. You can
easily remove everything you don't like.
The *x command "cut" will do the job too.

-uso.
Dagen Brock
2014-11-07 21:44:50 UTC
Permalink
Before my honeymoon, I was able to set up a build server using Merlin 32 and connect it to an Apple IIgs using A2Server.

Let me quickly describe how awesome it is:
1) I write code in my favorite editor on Windows/Mac/Linux
2) I run my build command:
- Merlin 32 compiles my codes
- CADIUS (or AppleCommander) generates an image with my binary and assets
- It copies it to a folder shared with my IIgs
3) I run my program on REAL HARDWARE!!! 5 seconds after I hit build on my modern laptop.

I plan to extend this a few ways:
1) Make it simultaneously launch it in GSPort
2) Write a listener app for GSOS that will automatically run new builds as soon as they appear (currently, the one manual step is double-clicking on my S16 file)
3) Make an optional listener to run my build script every time I save, or integrate it into my editor for realtime feedback on errors ala a modern IDE with syntax checking

Please don't underestimate. This is the absolute best assembly pipeline for the IIgs that there will ever be.

I had intended to wait to talk about this, but I see Olivier has started showing this incredible product so I see no harm. I will try to give a video demonstration soon. It is truly a thing of beauty. Merlin is awesome. Merlin32 is the Holy Grail.
Hugh Hood
2014-11-07 21:55:21 UTC
Permalink
Dagen:

May I ask you to describe the particulars of your Merlin32 build server?

Specifically, what hardware and which O/S.

Thanks.





Hugh Hood
Post by Dagen Brock
Before my honeymoon, I was able to set up a build server using Merlin 32 and
connect it to an Apple IIgs using A2Server.
1) I write code in my favorite editor on Windows/Mac/Linux
- Merlin 32 compiles my codes
- CADIUS (or AppleCommander) generates an image with my binary and assets
- It copies it to a folder shared with my IIgs
3) I run my program on REAL HARDWARE!!! 5 seconds after I hit build on my modern laptop.
1) Make it simultaneously launch it in GSPort
2) Write a listener app for GSOS that will automatically run new builds as
soon as they appear (currently, the one manual step is double-clicking on my
S16 file)
3) Make an optional listener to run my build script every time I save, or
integrate it into my editor for realtime feedback on errors ala a modern IDE
with syntax checking
Please don't underestimate. This is the absolute best assembly pipeline for
the IIgs that there will ever be.
I had intended to wait to talk about this, but I see Olivier has started
showing this incredible product so I see no harm. I will try to give a video
demonstration soon. It is truly a thing of beauty. Merlin is awesome.
Merlin32 is the Holy Grail.
Dagen Brock
2014-11-07 22:26:18 UTC
Permalink
Currently, Merlin32 is only available as a Windows Executable. The build server has to be on Windows (though you could use a Windows virtual machine running under Mac/Linux). Hardware requirements are very minimal. The only special hardware is the Ethernet-to-AppleTalk adapter I used to run Ivan's A2Server from my Mac.

So in my case, I kind of hacked some things together because I was doing dev on a MacBook at the time. My build script put the source in a directory where Windows could see it. I made a little listener program in Golang that ran on both the Mac and Windows boxes. So when Windows saw new source files, it would assemble them and put the output in a special directory. Then when the Mac saw new build output, it would copy them to the IIgs server.

In reality it can (and should, and will) be much simpler, but that was what I came up with after about 2 hours of playing around.
roughana
2014-11-10 06:18:00 UTC
Permalink
Post by Dagen Brock
The only special hardware is the Ethernet-to-AppleTalk adapter
Which is?
Hugh Hood
2014-11-11 16:08:07 UTC
Permalink
Dagen:

I appreciate your quick explanation on your Merlin32 setup, and I look
forward to your video.

Now forgive me for being dense, but may I ask what hardware is running
Ivan's A2Server?

Is there a Pi in there somewhere you didn't mention, or are you using
something virtual on the Mac or Windows box to run it?

Thanks.





Hugh Hood
Post by Dagen Brock
Currently, Merlin32 is only available as a Windows Executable. The build
server has to be on Windows (though you could use a Windows virtual machine
running under Mac/Linux). Hardware requirements are very minimal. The only
special hardware is the Ethernet-to-AppleTalk adapter I used to run Ivan's
A2Server from my Mac.
So in my case, I kind of hacked some things together because I was doing dev
on a MacBook at the time. My build script put the source in a directory where
Windows could see it. I made a little listener program in Golang that ran on
both the Mac and Windows boxes. So when Windows saw new source files, it
would assemble them and put the output in a special directory. Then when the
Mac saw new build output, it would copy them to the IIgs server.
In reality it can (and should, and will) be much simpler, but that was what I
came up with after about 2 hours of playing around.
Olivier Zardini
2014-11-11 19:07:05 UTC
Permalink
Hi,

I have posted a new release of the beta version of Merlin32. You can download from there :

http://www.brutaldeluxe.fr/products/crossdevtools/merlin/Merlin32.zip

This release is now capable to built multi-segment OMF files. So what you have here is not that far from the final product. There are still few things to polish, so do not hesitate to report any weird behavior. The documentation has also been updated.

Olivier
Dagen Brock
2014-11-11 19:21:50 UTC
Permalink
Post by Olivier Zardini
Hi,
http://www.brutaldeluxe.fr/products/crossdevtools/merlin/Merlin32.zip
This release is now capable to built multi-segment OMF files. So what you have here is not that far from the final product. There are still few things to polish, so do not hesitate to report any weird behavior. The documentation has also been updated.
Olivier
Thanks! What is the best way to report behavior? Would you prefer we post here or email or something else?
Antoine Vignau
2014-11-11 19:41:10 UTC
Permalink
There is a merlin32@ you know what.fr email address you can use
av
Olivier Zardini
2014-11-11 19:53:45 UTC
Permalink
Post by Dagen Brock
What is the best way to report behavior? Would you prefer we post here or email or something else?
Email is probably the best option, especially if you have to provide source code as attach files.

I'm also preparing a new release of OMFAnalyzer (now capable to decode the ~ExpressLoad segment).

Olivier

ps : the issue about duplicated EQU declarations located into DO ELSE FIN has not yet been cleared. Should be done soon.
mmphosis
2014-11-11 21:22:45 UTC
Permalink
Thanks for the link to the downloadable Windows EXE.

I just installed wine on Linux, and can run Merlin32 using wine ...

# cat > t.s
LDA #$00
STA $FF
RTS
^D
# wine Merlin32.exe -V t.s

fixme:heap:HeapSetInformation (nil) 1 (nil) 0
Z:\camelot\arthur\roundtable\Merlin32.exe v 1.0, (c) Brutal Deluxe 2011-2014
+ Assemble project files...
o Loading Sources files...
- t.s
o Loading Macro files...
o Check for duplicated Macros...
o Decoding lines types...
o Process local/variable Labels...
o Process Asterisk lines...
o Build External table...
o Build Equivalence table...
o Build Variable table...
o Process Equivalence values...
o Replace Lup with code...
o Replace Macros with Code...
o Process MX directives...
o Process Conditional directives...
o Build Label table...
o Check for duplicated Labels...
o Check for unknown Source lines...
o Check for Dum lines...
o Compute Operand Code size...
o Compute Operand Data size...
o Compute Line address...
o Build Code Line...
o Compact Code for Direct Page Lines...
o Build Data Line...
o Build Object Code...
+ Link project files...
o Build Binary output file...
=> Creating Object file 't.st'

# hexdump -Cv t.st

00000000 a9 00 85 ff 60 |....`|
00000005
Olivier Zardini
2014-11-11 21:37:27 UTC
Permalink
Post by mmphosis
Thanks for the link to the downloadable Windows EXE.
I just installed wine on Linux, and can run Merlin32 using wine ...
# cat > t.s
LDA #$00
STA $FF
RTS
^D
# wine Merlin32.exe -V t.s
fixme:heap:HeapSetInformation (nil) 1 (nil) 0
Z:\camelot\arthur\roundtable\Merlin32.exe v 1.0, (c) Brutal Deluxe 2011-2014
+ Assemble project files...
o Loading Sources files...
- t.s
=> Creating Object file 't.st'
# hexdump -Cv t.st
00000000 a9 00 85 ff 60 |....`|
00000005
The second parameter should be the Library folder path :

# wine Merlin32.exe -V <path>\Library t.s

Regards,

Olivier
Olivier Zardini
2014-11-16 17:45:30 UTC
Permalink
Weekly update of Merlin 32 beta version. Still available at :

http://www.brutaldeluxe.fr/products/crossdevtools/merlin/Merlin32.zip

The new release has cleared few bugs :
- Assembling / relocating the PER opcode
- Assembling the CMP (byte,S),Y instruction
- Super IntersegXX dictionary
- Line command parameters decoding
- Default Output file path

This new release was capable to re-assemble properly the Shuffle Puck source code (S16 with 39 OMF Segments !).

Regards,

Olivier
Antoine Vignau
2014-11-16 18:34:43 UTC
Permalink
Youpi !!!!!!
mmphosis
2014-11-16 19:01:09 UTC
Permalink
Merci pour la nouvelle.

-----
http://hoop-la.ca/apple2/2012/forestfire/

### on Mac OS X...
# curl -O http://hoop-la.ca/apple2/2012/forestfire/forestfire.s

### Or, on Linux...
# wget http://hoop-la.ca/apple2/2012/forestfire/forestfire.s

### remove those pesky colons
# sed -e 's/://g' forestfire.s > forestfire-merlin32.s

### Assemble
# wine Merlin32.exe -V '' forestfire-merlin32.s
roughana
2014-11-23 04:17:55 UTC
Permalink
Post by Olivier Zardini
This new release was capable to re-assemble properly the Shuffle Puck source code (S16 with 39 OMF Segments !).
If I have a Link file created with Merlin 16+, can I use Merlin 32 to link with it?
The Marinetti link layers that use the serial port need to link with an object file as the source is not publicly available.

The ERR opcode was used by Richard Bennett to check for object code overruns in memory mapped areas so support for this would be desirable to avoid changing source files.

Thanks,
Andrew
Michael J. Mahon
2014-11-23 21:09:40 UTC
Permalink
Post by roughana
Post by Olivier Zardini
This new release was capable to re-assemble properly the Shuffle Puck
source code (S16 with 39 OMF Segments !).
If I have a Link file created with Merlin 16+, can I use Merlin 32 to link with it?
The Marinetti link layers that use the serial port need to link with an
object file as the source is not publicly available.
The ERR opcode was used by Richard Bennett to check for object code
overruns in memory mapped areas so support for this would be desirable to
avoid changing source files.
Thanks,
Andrew
I frequently use ERR, too. It's a handy replacement for what would
otherwise be a macro.
--
-michael - NadaNet 3.1 and AppleCrate II: http://home.comcast.net/~mjmahon
Olivier Zardini
2014-11-23 21:12:03 UTC
Permalink
Post by roughana
If I have a Link file created with Merlin 16+, can I use Merlin 32 to link with it?
No. You have to write a dedicated Merlin 32 link file. Check the web page for full syntax.

Merlin 16+ link file is like a command file where you chain assembly + link (+Xpress the final file). Merlin 32 link file is more a definition file where you define the Segments properties (align, org address, seg name, load name, type...) and the name of each master source file for each Segment.
Post by roughana
The Marinetti link layers that use the serial port need to link with an object file as the source is not publicly available.
Merlin 16+ has its own object file format. Orca uses the OMF Object file format. Merlin 32 doesn't use any object file format because it is reassembling everything together, every time. With current PC power (unlimited RAM + unlimited CPU power), we can re-assemble very large project in few seconds. No need anymore to cut into object file in order to save on assembling time, by assembling separately smaller parts.

The best option is probably to disassemble (using TFBD) your object file so you can re-assemble everything together (even if the output of the disassembly process is not very clear, you don't care until the assembly process give back the same output).

If you can't handle the disassembly yourself, send us the binary file, we will do it.
Post by roughana
The ERR opcode was used by Richard Bennett to check for object code overruns in memory mapped areas so support for this would be desirable to avoid changing source files.
Do you have examples of source file using that ? (not sure to understand how it is really used)

Regards,

Olivier
Michael J. Mahon
2014-11-24 03:05:21 UTC
Permalink
Post by Olivier Zardini
Post by roughana
If I have a Link file created with Merlin 16+, can I use Merlin 32 to link with it?
No. You have to write a dedicated Merlin 32 link file. Check the web
page for full syntax.
Merlin 16+ link file is like a command file where you chain assembly +
link (+Xpress the final file). Merlin 32 link file is more a definition
file where you define the Segments properties (align, org address, seg
name, load name, type...) and the name of each master source file for each Segment.
Post by roughana
The Marinetti link layers that use the serial port need to link with an
object file as the source is not publicly available.
Merlin 16+ has its own object file format. Orca uses the OMF Object
file format. Merlin 32 doesn't use any object file format because it is
reassembling everything together, every time. With current PC power
(unlimited RAM + unlimited CPU power), we can re-assemble very large
project in few seconds. No need anymore to cut into object file in order
to save on assembling time, by assembling separately smaller parts.
The best option is probably to disassemble (using TFBD) your object
file so you can re-assemble everything together (even if the output of
the disassembly process is not very clear, you don't care until the
assembly process give back the same output).
If you can't handle the disassembly yourself, send us the binary file, we will do it.
Post by roughana
The ERR opcode was used by Richard Bennett to check for object code
overruns in memory mapped areas so support for this would be desirable
to avoid changing source files.
Do you have examples of source file using that ? (not sure to
understand how it is really used)
Regards,
Olivier
ERR evaluates a single operand. If the operand is zero, no action occurs.
If the operand is non-zero, an error is reported at the current line number
and the assembly continues, but no object file is produced.
--
-michael - NadaNet 3.1 and AppleCrate II: http://home.comcast.net/~mjmahon
o***@itn-group.eu
2014-11-24 08:38:23 UTC
Permalink
Post by Michael J. Mahon
ERR evaluates a single operand. If the operand is zero, no action occurs.
If the operand is non-zero, an error is reported at the current line number
and the assembly continues, but no object file is produced.
What the operand looks like ? What do we try to catch as error ?

Andrew talked about in memory collisions between object code and mapped areas. Is there something else ?

Olivier
Michael J. Mahon
2014-11-24 15:53:07 UTC
Permalink
Post by o***@itn-group.eu
Post by Michael J. Mahon
ERR evaluates a single operand. If the operand is zero, no action occurs.
If the operand is non-zero, an error is reported at the current line number
and the assembly continues, but no object file is produced.
What the operand looks like ? What do we try to catch as error ?
Andrew talked about in memory collisions between object code and
mapped areas. Is there something else ?
Olivier
The ERR operand is a Merlin general 16-bit arithmetic expression, like any
address.

By carefully choosing an expression, many assembly-time conditions can be
tested for--like exceeding a size or missing an alignment requirement.
--
-michael - NadaNet 3.1 and AppleCrate II: http://home.comcast.net/~mjmahon
mdj
2014-11-24 03:45:02 UTC
Permalink
Post by Olivier Zardini
Merlin 16+ has its own object file format. Orca uses the OMF Object file format.
I thought half the point of Merlin 16+ was to support OMF in addition to the existing Merlin 16 linker types ? Well, that and the hashed symbol tables ...
Post by Olivier Zardini
Merlin 32 doesn't use any object file format because it is reassembling >everything together, every time. With current PC power (unlimited RAM + >unlimited CPU power), we can re-assemble very large project in few seconds. >No need anymore to cut into object file in order to save on assembling time, by assembling separately smaller parts.
Does this mean there are no plans to implement the linkers at all ?
o***@itn-group.eu
2014-11-24 09:12:20 UTC
Permalink
Post by mdj
I thought half the point of Merlin 16+ was to support OMF in addition to the existing Merlin 16 linker types ? Well, that and the hashed symbol tables ...
The first goal of Merlin 32 is to let you assemble+link your Merlin 16+ source files on a modern PC to get at the end a binary file (fixed address or relocatable OMF v2.1).

Our starting point is a set of source files (+ a link file if you are targeting multiple OMF Segments file) and the result is a binary file you can send to your computer to run it.

There is no intermediate file like object file (.l) and no support to see the link part as a separate process. We Assemble+Link+Xpress the whole stuff in 1 operation. At least for the release 1.0 of Merlin 32. If there is a need later, we could open the capability to incorporate the object files (Merlin's .l or OMF). Because the source code will be available, anyone could modify Merlin 32 as he wants.
Post by mdj
Does this mean there are no plans to implement the linkers at all ?
One of the interest behind Merlin 32 was to break Merlin 16+ limitations. One of them was the number of EXT labels it could handle. Try to re assemble large executable like the GS/OS 6.01's Finder was impossible due to that particular limitation. The other limitation was the size of the source file (64 KB per file) where you have to limit the information stored in one file (comments are size limited, as well as label...). We would like to work on large source file without having to cut into 64 KB files.

Now, working on a modern computer give us unlimited disk space storage. So re assembling source files or reassembling source files + object files is about the same (in term of duration). We can roll back the object files as source file using a disassembler and reassemble everything together. The object file itself has small value. We are no more in a market where some could delivery object files because they don't want to expose the source code or because they want to keep a market share.

I can understand the interest of object file when the re-assembly of a program on an Apple IIe could take 30 minutes (or when the assembly program is working using a 64 KB memory model that imply the code to be split into 64 KB parts). Now with modern CPU, fast hard drive and unlimited memory space, re-assembling large project take few seconds on my PC.

Olivier
roughana
2014-11-25 00:50:21 UTC
Permalink
Post by Olivier Zardini
Do you have examples of source file using that ? (not sure to understand how it is really used)
Here are some examples.

For checking build parameters usage:
TCPDEBUG = 0 ;TCP diagnostics on -- must TCPIPSetTCPDebug(1)
TCPTOBUFFER = 0 ;TCPDEBUG must be on. Must do a FULL build
TCPTODISK = 0 ;TCPDEBUG must be on. Must do a FULL build
ERR TCPTOBUFFER+TCPTODISK/2 ;either can be set but not both

For checking that built code fits into memory map:
ORG $300
...
ERR *-$3F0 ;Avoid overwriting the Page 3 vectors

When evaluation of the expression returns true, the build must stop.

Regards,
Andrew
Olivier Zardini
2014-12-02 20:31:24 UTC
Permalink
Hi,

Weekly update of Merlin 32 beta version. Still available at :

http://www.brutaldeluxe.fr/products/crossdevtools/merlin/Merlin32.zip

This new release is now capable to build Multi-Segments Fixed-Address Binary files. So if you have the "No Tools" mood and you want to assemble several chunks of code (at fixed address, in several banks), Merlin 32 will create the binary files and will process the inter-segments calls check (LDAL, STAL, JMPL, JSL...). The usage of EXT and ENT directives (like we do for OMF relocatable code) let you declare your EXTernals and your Global (ENT) labels.

The documentation has been updated on the web site.

Regards,

Olivier
Olivier Zardini
2014-12-12 21:59:55 UTC
Permalink
Hi,

Weekly update of Merlin 32 beta version. Still available at :

http://www.brutaldeluxe.fr/products/crossdevtools/merlin/Merlin32.zip

This new release is now capable to build Multi-Segments Fixed-Address Binary files with several segments merged into one binary file. The documentation has been updated on the web site, so you can have a global picture of what kind of Multi-Segments are supported under Merlin 32.

This new release can re-assemble RASTAN GS source code (check What Is The Apple IIgs web site to get them). Simply replace the Link file of Merlin 16+ by a new Link file for Merlin 32 :


TYP $06

*---------------------------------
* File 1 : RASTAN1
*---------------------------------

DSK RASTAN1
ORG $030000

*-----------

ASM RASTAN.S
SNA RASTAN

ASM SUBS.S
SNA SUBS

ASM RAST.SHAPES.S
SNA RAST.SHAPES

ASM DCB.S
SNA DCB

*---------------------------------
* File 2 : RASTAN2
*---------------------------------

DSK RASTAN2
ORG $038000

*-----------

ASM RAST.BLIT.S
SNA RAST.BLIT

ASM RAST.LEFT.S
SNA RAST.LEFT

ASM RAST.LEFT4.S
SNA RAST.LEFT4

ASM RAST.RIGHT.S
SNA RAST.RIGHT

ASM RAST.RIGHT4.S
SNA RAST.RIGHT4

ASM RAST.UP.S
SNA RAST.UP

ASM RAST.DOWN.S
SNA RAST.DOWN

ASM RAST.UPDATEV.S
SNA RAST.UPDATEV

ASM RAST.UPDATEH.S
SNA RAST.UPDATEH

ASM DOWNLEFT4.S
SNA DOWNLEFT4

ASM UPLEFT4.S
SNA UPLEFT4

ASM DOWNRGHT4.S
SNA DOWNRGHT4

ASM UPRIGHT4.S
SNA UPRIGHT4

*---------------------------------------

And use the assembly command line :

c:\Merlin32Merlin32.exe -V c:\Merlin32\Library c:\Rastan\Link.txt

to build the RASTAN1 and RASTAN2 binary files.

If you want to get the same RASTAN1 and RASTAN2 files that are available on the source disk, you have to modify the RAST.UP.S souce file :

LDA :JMPADR,X
STA :MOD1+1
LDA :DPADR,Y
TCD
BRK $FF

by removing the BRK $FF line (located at line 41 of the source file).

Considering that other BRK can be found in the source code, I doubt this is the one of the final product.

Regards,

Olivier
Dagen Brock
2014-12-15 04:27:47 UTC
Permalink
Beautiful! I have missed so many improvements.

I will try it this week. Too bad I don't know how to program for the IIgs. ;)
Dagen Brock
2014-11-11 19:21:00 UTC
Permalink
Post by Hugh Hood
I appreciate your quick explanation on your Merlin32 setup, and I look
forward to your video.
Now forgive me for being dense, but may I ask what hardware is running
Ivan's A2Server?
I run the server on a Mac or Windows box hosting a Linux VM. The only special hardware is an AsanteTalk Ethernet<->AppleTalk adapter. With this, I can netboot the IIgs and share folders between it and Ivan's A2Server software. I got my AsanteTalk adapter for $25 on ebay. Normally there are some sitting there with "Buy It Now" prices, but I'm not seeing any at the moment.
Hugh Hood
2014-10-11 04:36:29 UTC
Permalink
Olivier:

I'm afraid I have not run your Merlin 32, as I don't currently have access
to a Windows computer for use with my personal projects.

My request was based solely on the 'Cogito_Output.txt' sample output from
the '-V' option as shown on your docs page for Merlin 32, although I am
probably not seeing that exactly as you intended due to an apparent line
wrapping issue in my browser.

I (and it seems Bill Garber as well) am asking for something a little
simpler than what you provided. For example, this is the style of output I'd
like to see written to a .txt file:


1 ************************************************
2
008000: 20 58 FC 3 BEGIN JSR $FC58 ;CLEAR SCREEN
008003: A9 C1 4 LDA #$C1 ;HIGH ASCII "A"
008005: 8D BC 05 5 STA $5BC ;SCREEN LOCATION
008008: 60 6 DONE RTS

Symbol Table, etc...



Of course, this info is really just a subset of that already provided by
your '-V' option, with slightly different formatting.

Thanks.





Hugh Hood
Post by Olivier Zardini
Post by Hugh Hood
In addition to the text file containing the output of the assembly process
(i.e. The -V option), could you add another option to generate a text file
duplicating the results generated by the Merlin 8/16 'Printfiler' utility,
which shows the assembly listing including the addresses and bytes?
Hum. Have you tried already the software ? Because what you describe looks
like the result of the -V option...
Olivier
Antoine Vignau
2014-10-11 06:41:14 UTC
Permalink
The caped developer says: "We want multi-segment support"

John Doe
Loading...