Alberto has both Linux and Aix versions of his assembler on his downloads page. If you asked nicely, he’d probably give you the source to any of them.
Here’s Reality Boy’s open-source Java + Antlr assembler… Java’s a bit like C, right? 😉
Also, you should be able to compile gccVB for *nix and use gas.
AFAIK, they’ve removed v8xx support from gcc. I think the patch is to convert the (now gone) v850 support into v810, but don’t quote me 😉
EDIT: Just thought of something: It would seriously rock if you added some of the features in Brian’s Grand Theftendo assembler! (a.k.a. NESHLA)
Post Edited (02-13-05 06:37)
Thanks! I don’t know why I didn’t think of looking at the source to the Java compiler. In fact I don’t know why I didn’t think to use it, since I have java on my machine…..I easily miss the obvious sometimes. The reason I wanted the source code is that I run Linux on a Mac(don’t laugh), so the regular Linux binaries wouldn’t work.
I may still go ahead with my own assembler, though, especially if there are features others would like to see in it. Also, the time it would take to program it would take away from my VB programming 🙂
Also, when you say compile gccVB, does that mean that source is available? I’ve only seen the win32 binary.
I would also like the actual source to gccVB.
I’ve heard that there’s a V810 patch available for an old version of GCC, but I have absolutely no clue what it is or what I’m supposed to do.
Yes, I know it’s in Japanese, but here it is.
lameboyadvance is right; you have to get the gcc code (probably only works with the version shown) and patch it with the diff, then compile. Then, do the same with the binutils.
If you do try it with other versions (perhaps using the gcc update patches before or after the v810 patches?) let us know how it goes!
Also, I don’t know if there are any, but other Mac user/VB dev’ers would probably like precompiled binaries. I’m sure PlanetVB would be happy to host them. 😉
Post Edited (02-17-05 07:53)
Thanks for the link! The page was actually easy enough to follow. I’m gonna compile it tonight and see how it goes. If all goes well I can get back to developing my pacman game:)
When you have the source in a compiling state, please share it if you don’t mind.
I don’t think it supports some custom V810 addresses like bit swapping.
Its not compiling yet, so it might take a little work. I would like to adapt the patch to the current releases of binutils and gcc, so we can fix things like the custom v810 addresses you mentioned.
I’ll definately share, I’m completely for open source. (and I’m sure people smarter than me will improve on whatever I do 😉
I would not waste my time with my java assembler (unless you want to improve it or are masocistic) It basicaly is just a bytecode reinterpreter and has veryy little in common with real assemblers. I would do almost anything to get GCC going and use that instead of any assembler (way nicer).
Have you thought about using a simple dos or linux emulator? vbGCC for dos should run nicely in any of the various dos mode emus for linux since it does not require anything fancy like a frame buffer.
On a side note, Reality Boy should compile nicely on your system. Let me know if it does or you have any troubles.
Actually, the only pre-compiled gccVB binaries I know of (the ones on the above-linked PCFX site and, with the new linker script added, on this site) are console-mode Win32 progs, not DOS. You’ll probably need WINE to run them.
atari24: What are some specific problems with compiling? Any error messages? Maybe some missing files I/we can help you find?
I think I’ve decided to try compiling it twice, but never got past the “collecting all needed files” stage 😛 I think I might’ve tried applying the patches, once, and gave up…
OK, I didn’t have much time to work on this weekend, and I’m going from memory…
When I try to build binutils, it fails at the point where it is compiling tc-v810.c in the gas/config directory. This file appears to be the main file for the gas assembler. The problem is, I get a bunch of harmless(?) warning messages, but no error message. It actually gives the error on the tc-v810.o file. So it could be a linker error, but I don’t think its at that point in the build yet. So….I’ve got my work cut out for me. If anyone has any ideas, let me know.
As for reality boy, I tried compiling it, but realised I didn’t have the allegro library installed, so I’ll get back to you with those results.
If anyone wants to undertake the task of moving reality boy off of Allegro and onto SDL or another cross platform library I would apriciate the help. Its realy quite simple I only use 5 or 6 allegro functions, just abstract them and swap out the underlying library. The big kicker is rewriting the key routines, but while your at it you could hack in joystick support and make the world a better place.
I’ve got gccvb up and running!
I just had to slighty alter a macro in the tc-v810.c file, and voila! it works! I haven’t done extensive testing(still haven’t gotten around to compiling allegro & reality boy) but it successfully compiled some source. I added in the linker script and crt0.o from the official gccvb (thanks Parasyte!) and it linked succesfully as well. I was also able to compile padromvb (thanks RunnerPack!), but I haven’t tested it yet. I checked the assembly listing and it was in correct v810 format, so as long as the assembler works, it should be a valid VB image once I add a header and pad off the rom.
So now I’ve got a working gccvb on my Linux/PPC system. Hell, its even got a fortran compiler 🙂 So, I’ll test it out fully, and then I’ll also compile it for Linux/i386, and eventually for OS 9 & OS X.
WOOT! Good job!
Which version of gcc/binutils did you patch? Since you mentioned fortran, it makes me think you used a different, or at least more complete, version. If you did, I’d love to get your sources (or a patch) and try building new Win32 binaries.
I’d like a standalone version that can coexist with otherwise-targetted gcc’s (like MinGW) without changing environment vars. Like the two that are used for Dreamcast development. Maybe also with Para’s linker-script compiled-in.
BTW, you’re welcome to padromvb. 😉 I’m sure you could make something even better yourself, anyway…
Can’t wait to see the cool VB stuff you make!
I used the version found at the japanese site, which is 2.10. I’m hoping in the next couple of days to try it on 2.14, and maybe gcc 3.3.3.
I only found a couple small things that needed altering from the files on the site, so it doesn’t take much to get it going.
Sounds great! I have always wanted to compile my own copy (with updated binutils, and adding those NVC-specific instructions). I guess I never got around to trying it. I was also quite interested in getting newlib or libc to compile for v810, since the standard libs are almost a necessity. One problem I can imagine would be memory usage. Poor VB only has 64KB WRAM, so the standard libs would have to be quite lean. You can bet that things like malloc() would cause problems.
Otherwise, that is really great news! Now all that is needed is [another!] fixup to the linker script and crt0. The linker script is missing support for memory overflow checking. It’s really too easy to overflow WRAM. Especially when you forget to declare large, static arrays and structures as const. As for the crt0, the publically available version is missing interrupt support, and the interrupt support in the current revision is nasty, at best. It just saves all 32 GPRs, rather than only the volatile GPRs. (r1 – r5, and r30, I believe. though the bitstring regs (r26 – r30, or so) may also need saving). Blah. 🙂
One day we’ll have a completely stand-alone copy of gccvb!