31-05-2015, 09:46 AM
|
Posts: 42
Threads: 5
Joined: Jan 2015
|
(29-05-2015, 09:51 PM)David Wrote: You do have a good point there, but I am sticking to my guns with the image idea. I don't fully agree with the "beyond the role of an assembler" statement. I am the type of person who prefers to have 1 tool that does everything vs 10 separate tools that do specific jobs, but that is just me. You can already insert raw hex code into the game using this tool, what's the difference of being able to directly import an image? I could write up a tool that could covert 1 or more images into a file containing hex data, then I could insert that file using the line .include "MyImage.asm".
I can understand this being an issue of code compatibility, but how many N64 assemblers are there? I've only ever seen 3 of them: LemAsm, CajeASM, and your n64split program. You can already insert images/skyboxes using your tool, and as far as I know LemAsm only allows you to edit the code line-by-line anyways.
As queueram said already, you could convert your image to RGBA5551 binary and then use the .incbin "myimage.bin" directive. In fact, that was also my original intention why I added incbin. Mainly for people who want to replace HUD images, letters or similar stuff. I don't think it would be that much of work to convert it; Sure I could code my tool to do it for you but then again it would kinda leave the function of an assembler. I'm thinking about this in future.
(29-05-2015, 10:16 PM)shygoo Wrote:
Something I was planning for my assembler and I'd like to suggest here was something like a .shell directive and a safemode option. The .shell directive would be able to execute external programs which could apply changes to the rom, and a filename/path macro would be useful in combination with this.
Code:
.shell "sm64-program.exe @ROMPATH 0 1 2 3 etc"
Yes, that sounds good. I thought of something similar before, but didn't come to it yet. This is added on my list. Thanks honey.
(29-05-2015, 11:55 PM)queueRAM Wrote:
To me, an assembler is a tool that takes human readable assembly code and generates machine code. Hex data values are inherently part of this because data sections need to be defined. CajeASM does this AND also adds the convenience of injecting it directly into an existing ROM. Doing the conversion from PNG/BPM/JPEG to one of the N64 compatible image formats doesn't fit well into this, in my opinion. Again though, I am used to many smaller tools being used in combination to build up a final ROM instead of injecting bytes into areas of an exiting ROM. Using this process, I would lean toward an external process to convert from PNG to RGBA5551 binary and then use CajeASM to .incbin "MyImage.rgba" to inject it into the ROM. shygoo's idea of a .shell directive is also interesting and could also be used to assist with this.
Almost any MIPS assembler will work with the N64: LemAsm, CajeASM, mips64 GNU binutils (n64split relies on this), MARS, LLVM. The sky boxes and other textures flow through the n64split toolchain like this: PNG->[n64graphics]->RGBA5551->[mio0]->compressed->[mips64-as]->OBJ->[mips64-ld]->ELF->[mips64-objcopy]->ROM. Again though, this is just my opinion based on tools I've used in the past. I'd like to hear what Tarek thinks with regards to CajeASM though.
Yes, I agree here. CajeASM mainly aims to be an assembler. As I said, I could add a feature which would let you directly insert an image without having it yourself to convert it to RGBA5551 before. But well, I don't really think it would be that much of work to use another tool for this and then simply use the .incbin "image.bin" directive.
R.I.P Tarek701. 2005-2016
|