|
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 |
---|---|
|
z80 eclipse IDE initial release
Posted: Thu May 07, 2015 1:39 pm
|
Hi Guys,
I've finally gotten this project to a state where I'd like to share it. Some features of the editor
You can find the source on github here https://github.com/yuv422/z80editor I've also got pre-build binaries. For those of you that haven't used the Eclipse IDE before I've put together a little step by step guide to installing my Z80 editor plugin. Here goes.
Any feedback you can give would be greatly appreciated. |
|
|
Posted: Thu May 07, 2015 2:07 pm |
You can leave the name fields of the Add Site dialog (steps 4 and 7) blank. It will fill them in automatically then. :) | |
|
Posted: Thu May 07, 2015 10:57 pm |
Hi Calindro, Good point. I forgot that you could do that. :) |
|
|
Posted: Fri May 08, 2015 9:03 am |
I still have to try this, but I was wondering if you really had to use ".z80asm" extension. Is it compulsory?
I'm using '.asm' and '.inc' atm... |
|
|
Posted: Fri May 08, 2015 12:01 pm |
Hi sverx, At the moment yes it's best if all your files use the .z80asm extension. I am working on adding proper support for ".asm" and ".inc" extensions. You can manually assign inc and asm files types to the Z80 Editor and they work now but the cross references of labels and defines doesn't work correctly between the different extensions at the moment. Hopefully I'll have these issues ironed out soon and you'll be able to intermix all three file types in your project. |
|
|
Posted: Fri May 08, 2015 12:04 pm |
I also need to add support for local label scoping in sections with the use of an underscore as the first character of a label name. | |
|
Posted: Sat May 09, 2015 4:18 am |
Ok, I've fixed the issues with multiple file extensions. So you should be able to use ".z80asm", ".asm" or ".inc" files in your projects. I've updated the release to 1.0.5 |
|
|
Posted: Mon Jun 01, 2015 3:09 pm |
I'm experimenting with this... I pointed it at some existing code (my Picross clone) and it falls down here:
.struct Tiles
... .endst ...saying "no viable alternative at character 't'". It highlights ".endst" correctly but doesn't pick up ".struct". The outline stops there too. It also stops on .macro, .if, and a bunch more directives. I can't seem to fold any code either. |
|
|
Posted: Tue Jun 02, 2015 1:37 pm |
Hi maxim, I've only really tested it with my own code which doesn't use many of the wla-dx directives. :( I hadn't included support for struct I've just added support for a bunch more directives including struct .struct, .enum, .repeat, .def, .redefine, .redef and .if wla-dx sure does support a lot of directives. :) I'm not too sure how I'll handle the substitution commands (\1 \2 \@ \! etc) in the macro directive. Do you use them in your code? I've committed it into github but I haven't made a new release build yet. Code folding should work for sections. You can see the wla-dx language grammar that I've created in this file here. https://github.com/yuv422/z80editor/blob/master/org.efry.z80editor/src/org/efry/... |
|
|
Posted: Tue Jun 02, 2015 2:13 pm |
I'd found that, I'm not super comfortable with the grammar (I'm not a real computer scientist, I fear) but it seems like something I could hack on. Could you give some pointers on how I might work on it inside Eclipse?
I suspect WLA DX suffers from an ill-defined grammar, thanks to its somewhat simplistic parser. It might be challenging to support all of its oddities... I do use \1 etc because named macro arguments are quite buggy... |
|
|
Posted: Wed Jun 03, 2015 11:24 am |
Yeah I was looking at some of the syntax and wondering how that would work in a formal grammar. :( If you'd like to play around with the grammar, I'd suggest following the instructions laid out in the 5 minute tutorial on the XText webite. https://www.eclipse.org/Xtext/documentation/101_five_minutes.html Just skip the initial project creation step and instead import the 4 z80editor projects. Just be aware that you may have to increase the memory arguments given to the eclipse application when you run it. Otherwise it might start acting strangely. I increased my maxPermSize setting to 256m -XX:MaxPermSize=256m |
|
|
Posted: Thu Jun 04, 2015 7:04 pm |
I'm finding it locking up at 100% CPU for long periods. I'm looking at large disassemblies that are failing the grammar, if that's relevant. Sometimes it just locks up when I switch to its window, not even typing anything... | |
|
Posted: Sat Jun 06, 2015 12:10 pm |
I think that might be caused by a lack of memory on the eclipse application when you're running it. You can increase the available memory to the Eclipse Application by changing the VM arguments from the run configurations menu. Right-click the project and select the "Run As" menu and the "Run Configurations..." submenu Then select Eclipse Application and the "Arguments" tab. There will be a section for VM arguments. -Xmx is the max memory available and -XX:MaxPermSize is the memory set aside for permanent objects. Maybe try this? -XX:MaxPermSize=512m -Xmx1024m |
|
|
Posted: Mon Jun 08, 2015 6:55 pm |
I bumped Eclipse to 512MB perm and 2GB max, and it's still locking up, using about 1GB RAM and one core. I'm not a big fan of Eclipse or Java and this is not helping :) I'd love to have modern tools with code completion, validation as I type, hints, even a little refactoring support, but the resource usage and performance have to be a bit better :( I'm hoping it will be better when it has fewer unsupported syntax errors... | |
|
Posted: Mon Jun 29, 2015 11:10 am |
Yeah it really is chalk and cheese, java and sms z80. :) Are you able to share your sample file? Maybe I can help with implementing the unsupported syntax and improving editor performance. |
|
|
Posted: Mon Jun 29, 2015 7:27 pm |
My large file was an Emulicious disassembly, you can make many yourself. | |
|
Posted: Tue Jul 07, 2015 11:50 am |
I've just tried loading up a disassembly created with Emulicious. You're right it really slow and is quite unusable. :( I have been able to remove all the syntax errors though. It is still slow even on a clean file.
I don't think XText likes parsing the 21,400+ lines of asm. :( I'll have a look to see if there is anything I can do to speed things up. I wonder how many homebrew projects would ever have that much in one file? |
|
|
Posted: Tue Jul 07, 2015 4:07 pm Last edited by Maxim on Wed Jul 08, 2015 6:16 pm; edited 1 time in total |
Well, disassembly projects are not unheard of. Maybe we need disassemblers to split to more files.
I'll try it on some handwritten code and get back to you... |
|
|
Posted: Wed Jul 08, 2015 12:16 pm |
I think the slowness might actually be due to the number of cross references in the file.
It seems to be spending most of the time in the following method. EcoreUtil2.resolveLazyCrossReferences(resource, cancelIndicator); |
|
|
Posted: Wed Jul 08, 2015 6:17 pm |
One thing I tried was renaming a label, which was hugely slow, while a textual search and replace was fast. That sounds like the same issue, I guess. | |