|
ForumsSega Master System / Mark III / Game GearSG-1000 / SC-3000 / SF-7000 / OMV |
Home - Forums - Games - Scans - Maps - Cheats - Credits Music - Videos - Development - Hacks - Translations - Homebrew |
Author | Message |
---|---|
|
Z80Editor v1.0.7
Posted: Mon Oct 12, 2015 12:18 pm
|
Hi Guys,
I've released a new version of my Z80 eclipse IDE. v1.0.7 Some of the highlights
Installation notes.
The new Z80 instruction view can be opened from Window->Show View->Other...->Other->Z80 Instruction View Any feedback is greatly appreciated. :) Eric |
|
|
Posted: Mon Oct 12, 2015 7:20 pm |
Always with the problems :) I'm using my Picross project, here's what fails:
- _sizeof_[struct name] isn't supported - the "undocumented" registers ihx/ixl/iyh/iyl - the ".incdir" directive - jump targets _b and _f - af' does't syntax highlight properly - It doesn't like this: Label: .incbin "filename" ...because it seems to assume that directives can't come on the same line as a label.
Some stuff fails because unused code (in discarded sections) has invalid references. I guess that will be hard to filter out, and in a real project you'd end up cleaning that away anyway. I guess one interesting alternative (!) would be to continuously run the assembler and highlight the lines it errors on, although that would frequently produce a lot of noise. |
|
|
Posted: Tue Oct 13, 2015 12:40 am |
Thanks for updating, checking it out now. | |
|
Posted: Tue Oct 13, 2015 1:32 am |
It might be an idea to have an option letting the code fall through to the assembler even if there are syntax errors. I mean you can do this already just not within the IDE.
The update has already proven valuable to me. Picked up a bug of a bad label (+ instead of +:) and I got some cycle counting wrong which i now need to fix up. Is compiling the project supported. Do we need to supply our own wlaz80? For me using the compile function does not compile? Again thanks for the work. These types of tools are tedious to bring together. |
|
|
Posted: Tue Oct 13, 2015 11:23 am |
I've committed a fix for the _sizeof_ define. It doesn't xref though. :( I've also added the .incdir tag and support for the anonymous label jumps _b and _f I'm not sure why the highlighter doesn't trigger on the af' It might not like the quote character. :( I'll look at adding support for the undocumented registers soon. I also need to restructure the grammar a bit to better handle labels on the same line as commands.
Yeah that sounds good but also a fair bit of work ;-) |
|
|
Posted: Tue Oct 13, 2015 11:30 am |
There isn't any native toolchain support for WLAZ80 at the moment. I just added an external build configuration which calls a script to build the project with WLA. You can set that up by right clicking on your project and selecting preferences->Builders->New->Program. I also setup a "Run external tool" to invoke the emulator and load the resulting .sms file. I hope that helps. :) |
|
|
Posted: Thu Oct 15, 2015 12:18 pm |
I've just added support for the "undocumented" registers ihx/ixl/iyh/iyl :)
It can now load the Picross source without parse errors :-) (After I stubbed in the missing labels/defines) I'll fix the labels on the same line as commands issues then I'll cut another release. Is there anything else people would like to see in the next release? |
|
|
Posted: Mon Oct 19, 2015 1:24 pm |
Ok I've made another release. 1.0.8
This includes
Enjoy. :) |
|
|
Posted: Mon Oct 19, 2015 5:27 pm |
Just a few things from testing more old code...
1. It looks like WLA DX tolerates some invalid mnemonics, I had this: in a,$dc instead of in a,($dc) It might be good to support it, even if it is a bit dodgy. I fixed my code :) Also, the error message is a bit unhelpful ("no viable alternative at input 'a'").
2. Defined symbols in DB statements, specifically: .define B $00
It seems to be interpreting B as a register here, which seems odd.
.define W $3f .db B B B B W W W W W W B B W W B B 3. Directive .orga is missing 4. Extra arguments to .incbin are missing (skip, read) 5. I'm using StructName,StructField to obtain struct offsets, then using them with index registers, like this: inc (ix+TitleScreen.BlindsOffset) and it doesn't work...
6. I'm abusing WLA DX's float support to write code like ld a, 2.14*60 (becomes ld a, 128) to express certain things (here, 2.14 seconds). Your parser seems not to support floats in expressions.
It's still possible to trigger Eclipse to do things that kill it, I guess because it just starts maxing out the CPU on the UI thread. That's probably Eclipse's fault... |
|
|
Posted: Mon Oct 19, 2015 10:04 pm |
Wouldn't it better that it doesn't? Work towards z80 rather than WLA DX at least on op code validity. |
|
|
Posted: Mon Oct 19, 2015 10:34 pm |
It depends whether the goal is to target WLA DX or just a certain subset of its functionality. I think a grammar can't support everything, as it's too complicated (have a look at what mod2psg2 does with labels and despair), but in terms of Z80 opcodes, why not support the dialect variations? | |
|
Posted: Tue Oct 20, 2015 12:04 pm |
Ok I've published another version. 1.0.9 :)
Is that a popular convention? If so I guess we could support it. That error message comes straight out of xtext. I can change the message but I'd have to write a custom validator.
This is the main problem with this parser. The lexer consumes all keyword tokens ahead of ID strings. This means that it is hard to implement labels that share their name with a keyword. Even if that keyword isn't allowed in the particular context. I'm yet to find a good way to handle this. And as the list of keywords grows clashes become more likely. :( Getting the dot expression syntax to work was a real pain because the lexer would match against the keywords before the cross reference ID. eg struct.obj would fail because the lexer would consume '.o' trying to match .org for example. It would then bomb out because it doesn't backtrack. To get around that I broke all the dot tags up '.org' becomes '.' 'org' :(
Fixed. :)
This is actually failing because 'TitleScreen' is both a label and a struct name :( The parser finds the label first and errors because it isn't a struct ref.
Fixed. :)
Hmm, Do you have a repeatable example? I haven't observed it maxing out recently myself. |
|
|
Posted: Tue Oct 20, 2015 5:15 pm |
I don't have it to hand but I think I was trying to do a column selection by keyboard (shift+alt+down in many editors) and that is mapped to something terrible in Eclipse :)
The in opcode without parentheses is not very common, I hadn't used it on purpose (if it compiles, it ships). The port number is kind of logically an indirection, but there's no meaning to the direct value so the parentheses don't add anything either. I can't think of a case where there's a Z80 opcode which can be valid, with different meanings, with and without them, but I don't think it would be a good idea to make them optional everywhere... |
|
|
Posted: Wed Oct 21, 2015 8:18 am |
the quirk is that if you can write
IN A,(N)
as IN A,N
then you should also be able to write IN A,(C)
as IN A,C
which is confusing, IMHO. |
|
|
Posted: Mon Jan 14, 2019 2:30 pm |
mmm... does that still work with current Eclipse?
I just tried downloading Eclipse (3.8) on a Linux box, got your plug-in from https://dl.bintray.com/yuv422/EclipseZ80Editor and nothing appeared :| Surely I have missed something...? edit: that wasn't 'current Eclipse', it was just what's on Ubuntu repositories: Eclipse 3.8, which seems to be too old for xText to instal. Trying with latest version, now... edit2: OK, seems to work :) Will run a few tests... |
|
|
Posted: Wed Jan 16, 2019 12:57 pm |
I'm stuck here now. I created a new builder, and I can start that. But sometimes ${resource_loc} value is the path to my project folder and sometimes it's the path to the .asm file I'm editing, and I don't get why. Also, I'm not sure this ${resource_loc} is the correct variable... (this Eclipse thing seems too much of a mess to me, but maybe it's just because I never used this IDE before) edit: in general, a short tutorial on how to set up Eclipse to work with Z80Editor and WLA-DX would be very nice :) (also a note on how to launch the generated ROM on emulator(s) would be handy.) |
|