Schrijver
| Cross Compiler with editor
|
Maggoo msx professional Berichten: 590 | Geplaatst: 02 Mei 2006, 04:19   |
Is there such thing as a Cross Compiler for PC that also has an editor ? Or a PC editor that works with a cross compiler / batch files.
What I'd like is being able from a PC editor that allows me to:
* Edit my ASM Code (simple notepad like).
* Allows me to compile when pressing a button and display errors if any.
* Allows me to compile to a .rom file, and start an emulator using that .rom file
* Allows me to compile to a .??? file, copy that file to a .dsk file amd start an emulator using that .dskfile
It seems very simple, yet I can't find such program. Alright I can just make a bunch of batch files to do the job but that justain't "neat" enough  Every modern programming environment has at least those features, it would be nice to have it for MSX development as well... |
|
manuel msx guru Berichten: 3528 | Geplaatst: 02 Mei 2006, 07:05   |
Isn't just any professional editor capable of such things? Like VIM, UltraEdit, ScIte?
It's a matter of writing a Makefile with it, e.g.
IMHO: an editor should just let you edit. Possibly it lets you run external commands easily to get the other stuff done. But using one of the mentioned editors in combination with a normal cross compiler (liike sjasm, tniasm, pasmo, z80asm) and something like 'make', it should be easy, no?
|
|
BiFi msx guru Berichten: 3142 | Geplaatst: 02 Mei 2006, 10:00   |
and next he wants to have the emulator intergrated as well
seriously, an IDE (intergrated development environment) for PC capable of producing MSX code is Chaos Assembler using TASM which is (according to many cross developers) not so good, as they ended up creating their own assembler. It contains tools for COPY commands by selecting the source rectangle in a picture viewer which can load MSX pictures and output it to a source which is inserted in the source... and a primitive Mode 2 sprite editor which can do the same.
I use tniASM with a seperate editor and compile it with an option in the context menu. |
|
jltursan msx professional Berichten: 886 | Geplaatst: 02 Mei 2006, 13:53   |
A very good one is ConTEXT editor, totally free and enough to do all the task you list (with the help of a .BAT file to automatically choose the action between ROM and DSK). If you want to try I cand send you this batch file...
With ConTEXT you can even click over an error message on the output console and jump instantly to the offending line! |
|
Maggoo msx professional Berichten: 590 | Geplaatst: 02 Mei 2006, 17:12   |
ConTEXT looks very close to what I am looking for. Also, which cross assembler are you using with it ? Could you please send me a copy of that batch file ? Thanks  |
|
jltursan msx professional Berichten: 886 | Geplaatst: 02 Mei 2006, 22:08   |
Here's the batch file:
@echo off
set name=%~n1
if exist %name%.bin del %name%.bin
if exist %name%.rom del %name%.rom
<path to assembler>\sjasm -ql %name%.asm
if exist %name%.bin goto :dsk
if exist %name%.rom goto :rom
goto :endl
:dsk
if exist %name%.dsk del %name%.dsk
echo 10 CLEAR 0,57343 >AUTOEXEC.BAS
echo 20 BLOAD"%name%.bin",r >>AUTOEXEC.BAS
<path to wrdsk>\wrdsk %name%.dsk AUTOEXEC.BAS %name%.bin
<path to MSX emulator>\openmsx.exe -machine Philips_NMS_8245 -diska %name%.dsk
goto :endl
:rom
echo Running %name%.rom
<path to MSX emulator>\openmsx.exe -machine Philips_NMS_8245 -carta %name%.rom
:endl
It's designed to use sjASM; but you can easily adapt to other assemblers.
Note that I usually compile to .BIN files when the destination is a DSK, so I've setup a pair of lines to choose the running method (lines 6-7), you may want to change that also.
To create the DSK I'm using the well-known wrdsk tool from Arnold Metselaar.
To compile a assembler file you only need to link this batch to a hotkey and invoke exec <file name only>.
Try to play a bit with ConTEXT and you'll find that's very easy to setup.  |
|
Maggoo msx professional Berichten: 590 | Geplaatst: 03 Mei 2006, 03:06   |
Works even better than I'd have expected !
Thanks a lot man, that makes development a LOT easier  |
|
msd msx professional Berichten: 615 | Geplaatst: 03 Mei 2006, 12:17   |
Magoo: I use ultraedit. I can assemble within the editor and output of it is displayed in ultraedit. I can even click on the error and it jumps to the line with the error. Also I've a file for ultraedit with syntax highligting. Also with this file ultraedit can make a function list when labels look like this Label:. labels which start with a . are not listed. You can add several buttons with different functions in UE. No problem to make a button which starts an emulator.
|
|
Prodatron msx master Berichten: 1110 | Geplaatst: 04 Mei 2006, 11:24   |
@msd: Ultraedit is my favourite editor, too. Do you also use sjASM? Is the combination of UltraEdit, sjASM and OpenMSX a good choice for cross-development on a PC?
@jltursan: Thank you for publishing the batch, looks very usefull.
|
|
jltursan msx professional Berichten: 886 | Geplaatst: 04 Mei 2006, 12:35   |
You're welcome!
Some thoughts about software I use and why:
ConTEXT: Clearly less powerful than UltraEdit; but, hey!, it's free!!. And usually I don't use the zillions of options that UE comes with. Having the syntax highlighting for sjASM or AsMSX is enough for me...
sjASM: As good as others assemblers like TNIASM or AsMSX. All of them have their own nifty features; so the best way is to RTFM and choose the one that fits better your needs.
OpenMSX: Again, as good as BlueMSX. To link with the editor I'm using this one because is faster loading than Blue. Once the first running test is done I usually run BlueMSX to debug the program. His debugger is the most intuitive and friendly in the MSX scene.
|
|
msd msx professional Berichten: 615 | Geplaatst: 04 Mei 2006, 13:09   |
@prodatron: Yes I use sjasm and blueMSX. I don't start the emulator from within UE. Which is posible offourse. I simple use DirasDisk in blueMSX. Only need to refresh the disk in blueMSx and than start it.
|
|
manuel msx guru Berichten: 3528 | Geplaatst: 04 Mei 2006, 19:39   |
You can do the same in openMSX, of course
Note that I expect a GUI for the openMSX debugger in the next coming months. At least some betas. If you're interested, ask for one on our IRC channel (#openMSX on freenode.net). |
|
Maggoo msx professional Berichten: 590 | Geplaatst: 06 Mei 2006, 00:36   |
@ jltursan: What rule do you use for Compiler parser rule for Context with SJASM ?
I have tried %f line %l:
but it doesn't seem to be working...
Also do you use a Z80 highlighter ? (not that it's necessary or anything)
|
|
jltursan msx professional Berichten: 886 | Geplaatst: 06 Mei 2006, 01:48   |
With sjASM this rule works fine: "%n line %l:"
...and yes, I've edited my own sjASM syntax highlighter. I've sent to your e-mail the file  |
|
Maggoo msx professional Berichten: 590 | Geplaatst: 06 Mei 2006, 15:02   |
It works ! Kewl
Thanks again ! |
|
|
|
|