News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Tarek701

Pages: [1]
Personal Projects / Re: Super Mario World (Extended)
« on: July 21, 2015, 12:22:27 pm »
I personally prefer Gyazo because it's fast and uploads images right after capturing them.

UPDATE(05/11/2015) - CajeASM v7.24 (Stable) RELEASED!!
Fixed includes crashing CajeASM + after .incbin (if binary is not multiple of 4) auto-aligns following asm code to 4 byte boundary.

  • [FIX]: Fixed immediate crash when including an ASM or bin file from another folder outside of CajeASM.exe
  • [FIX]: After incbin the code is auto-aligned to 4 byte boundary so ASM code is not messed up when assembling.
(Download-Link should be available after review)
CajeASM v7.24

UPDATE(04/29/2015) - CajeASM v7.2b (r301) RELEASED!!
Pseudo-Branch instruction assembling error fix.

  • [FIX]: BLT, BGT, BLE, BGE didn't assemble correctly (they assembled R0, R0, offset, which was wrong)
CajeASM v7.2

I'm very new to the N64 world but I'm really glad to see that it's getting the love it deserves.  I'm not sure when, but I definitely plan to use your program as it seems to be the most detailed one out there and is being improved on heavily.  I can't speak for everyone, but I'm EXTREMELY glad that you're doing this!  Keep up the amazing work!

Thank you very much for these words. They really mean a lot to me. A few use my assembler already for SM64 Hacking, but as of the newest update, it can be used for any N64 ROM with any endian format(n64, z64 and v64). I also plan to add a disassembler, which should then fully replace LemASM. (CajeASM will be also able to disassemble RSP ASM code, which LemASM didn't do)

VERY IMPORTANT PATCH! CajeASM had some odd branching error. I just fixed it and posted the update to Wait until the new update is out. If you want it now, re-download from here:

April 12, 2015, 06:44:20 am - (Auto Merged - Double Posts are not allowed before 7 days.)
UPDATE(04/12/2015) - CajeASM v7.1b (r128) RELEASED!!
Very important fix. Better download it. It will save you.

  • [FIX]: Counters, Labels, Vars resetted and cleared once assemble process is done. - The errors you eventually have occured recently like branching errors were caused because the counter was not reset. It's finally fixed now.
CajeASM v7.1 (Later replaced with link)

UPDATE(04/05/2015) - CajeASM v7.0b (r14) RELEASED!!
OMG OMG OMG OMG OMG It's here, even if no one cares (or only a few) I can tell you, it's finally here. As this is the "beta" version, this means that the disassembler and the listing file (command-line) update is still not available and will be probably done in a few days or weeks. However, the rest is completely done and therefore CajeASM is finally ready to be released. Actually a lot of updates are internal, which are way too complicated to explain, so I put them at the 2nd update list. The first update list just contains the stuff which is useful for the user.

  • [IMPR]: Recoded and improved errors in code, writes errors now to a log file. (Logs/log.txt) Label and define errors are saved in two separate log files in Logs folder.
  • [IMPR]: CajeASM assembles 12-20 secs faster than before. Hyperspeed fucky fuck funky.
  • [ADD]: CajeASM is now able to assemble ASM code to big-endian (.z64), little-endian (.v64) and byteswapped/middle-endian (.n64).
  • [ADD]: Added new directives:
    • .incbin "binfile.bin" -> Let's you include binary files into your ASM code.
    • .byte/.halfword/.word/.float -> Let's you insert numeric values into your code.
    • .align alignment, (optional) fill -> Aligns your data/code to a byte boundary, optionally filling the skipped bytes with 'fill'.
    • .skip n, fill -> skips 'n' bytes, optionally filling them with 'fill'.
  • [FIX]: Fixed decimal, binary value conversion.
  • [FIX]: Fixed LI instruction to not use ADDI/ADDIU anymore for values which are in 16-bit range.
  • [FIX]: Fixed crashes caused if the immediate value didn't have a prefix or was too short.
  • [FIX]: Re-added missing instruction SYSCALL.
  • [FIX]: Rewritten label/define list code. This time it should work better and more efficient now and prevent mystical label errors.
  • [ADD]: New command-line options, new command-line argument parser.
  • [IMPR]: If no destination register is specified in pseudo-branch instructions, then on default AT register is used.
  • [FIX]: Fixed MTC2/MFC2 (RSP) instructions not reading the element. (ex.: mtc2 t0, v3[2])
  • [FIX]: Fixed vector load/store instructions not reading the address properly.
  • [ADD]: New CajeASM v7.0+ Manual. Better, explains all pseudo-stuff step-for-step and shows how they look like when translated to real MIPS code.
  • [FIX]: ROM and ASM Files close properly now.
  • [FIX]: include directive for ASM files didn't work properly before and didn't import all defines.
  • [FIX]: hex {} parser/lexer error and confusing it with labels. Has been finally fixed.
  • [FIX]: CajeASM v6.03 crashed when labels were called three times.
  • [DEL+REPL]: (internal) Deleted some old encoding algorithm (originally this was supposed to be a small, quick reader (encoding) for ASM code, fucked up crap which never worked in the end. This was replaced with an algorithm somewhat similiar to ( w(v') >= t + 1) )
  • [FIX]: Closing CajeASM console-command line by pressing "X" caused that rn64crc.exe and chksum64.exe didn't open.
  • [FIX]: CajeASM update checker sometimes didn't read the URL.
  • [FIX]: Fixed prefixes like "0X" not being recognized (forgot to uppercase that one in my check code)
  • [FIX]: Fixed inefficient use of my BitFields (some fields were left filled with bits of preceding instructions, sometimes causing horribly wrong instruction encodings)
  • [FIX]: Fixed instruction reader and code which passes the bits to it's fields, especially the FPU instructions were sometimes not written properly.
  • [FIX]: CajeASM GUI no longer crashes if file is in use (actually it shouldn't even crash before, but it still did for some others. )
  • [FIX]: BEQI/BNEI and BGEI/BLEI/BLTI/BGTI not being correctly translated. Fixed this finally.
  • [FIX]: Lexer errors sometimes crashed CajeASM, especially LI instructions once again.
  • [FIX]: Result of MIPS instructions (Appending BitFields) sometimes were out of range (leading zero's) causing errors.
  • [FIX]: Fixed CajeASM GUI being not properly getting the filepath sometimes (when space was used in filenames).
  • [FIX]: include directive for ASM files sometimes didn't assemble some instructions (forgot to point to visitor, blame me)
  • [FIX]: CajeASM didn't read RSP instructions properly sometimes (especially the scalar modes)
  • [IMPR]: Re-coded reader for scalar modes for RSP instructions (0q, 1q, 0h, 1h, 2h, 3h, 0w-7w)
  • [FIX]: Removed "URL not found" spam. (caused when link wasn't available or when some crap was wrong with the host)
  • [FIX]: Fixed crash when attempting to open a zero byte file.
  • [FIX]: Fixed various memory corruption issues (random crashing)
  • [FIX]: Fixed parser not recognizing RSP instruction VSUB.
  • [FIX]: Fixed endless loop if define didn't exist.
  • [FIX]: Fixed B instruction not being translated correctly to real MIPS ASM instruction.
  • [IMPR]: CajeASM GUI and CajeASM console-application merged to one.

Download here:

Personal Projects / Re: Paper Mario Modding Suite -- Star Rod
« on: February 24, 2015, 09:58:23 am »
(for example, I wrote a MIPS assembler/disassember to integrate into the script editor yesterday after work).

Kewl b3ans, another MIPS guy. Made a mips assembler too. Looking forward to this editor. Looks really amazing so far.

So, update folks. CajeASM v6.0 is done. I don't know if my assembler is the first of all, but CajeASM can finally assemble RSP ASM Instructions too. The disassembler is not done yet and is planned for v6.2.

  • [ADD]: Added RSP ASM Instruction Set.
  • [FIX]: Error when using more than 3 or 4 labels.
  • [FIX]: Some instructions not recognizing lowercased registers.
  • [FIX]: A lot of BitField errors (blame me)
  • [FIX]: Read/Write Error when including an asm file which includes asm files too which also include asm files. (lol)
  • [FIX]: Unclosed FileStreams; Sometimes caused some code not to be written. (blame me^2)
  • [FIX]: Counter error; didn't properly count the value out of range errors.
  • [FIX]: CajeASM sometimes didn't properly open rn64crc and chksum64 and so didn't fix the checksum.
  • [IMP]: Improved speed of CajeASM and use Streams properly now to save RAM. (Fastz)

Once CajeASM v6.0 is reviewed and accepted, it will be downloadable here:

Big plans for CajeASM v6.0:
- Adding RSP Instruction Set
- Disassembler

Currently I'm implementing RSP ASM (COP2 instructions) for my MIPS Assembler. As the N64 made use for it (especially for graphics stuff) I'm working to add it too, as I believe some people might be actually able to do something with it.

So far (thanks to HatCat) I implemented the scalar modes (quarter, halves, whole and register)

A simple test:

Too bad, that IDA Pro doesn't disassemble it right.

So, CajeASM v5.11 is released on SMWCentral and is getting online here once it's accepted. Basically, a lot of stuff has changed. I rewrote a lot of my CajeASM, as well the parser and lexer rules. As of currently, CajeASM seems to be pretty much bug-free but eventually someone might find one. If this is the case, don't hesitate and post either here or PM it to me.

Main Features:
  • Labels no longer need to be prefixed with a "!" token. It was useless from the beginning anyway and guarantees 0.0034 secs faster coding. Lol
  • Variables/Defines act properly now when load in upper half instructions and lower half instructions. If the define/variable is a 32-bit value, then LUI only loads the upper half, while all other lower half instructions load the lower half. Example below.
  • An .include directive, allowing to include other ASM files into your main asm file. It also imports labels and defines/variables used in the included file.
  • New Pseudo-Instructions: BEQI, BNEI, BGTI, BLEI, BGEI, BLTI.
  • [FIX]: Base Instructions Instructions (LH, SH, LB, SB, LW, SW, etc.) couldn't take shortened values. (if you wrote 0x0, then CajeASM didn't recognize it)
  • [FIX]: Include path not correctly specified.
  • [FIX]: Comments not being ignored by CajeASM.

To show off an example of what I meant above:

You can make "defines" (or variables, however you want to call them) and give them a specific value. We'll do a simple example with SM64.

LUI would only load 0x8034, while LH would load 0xB218. In a macro context, CajeASM just takes the first four bytes from left into LUI while the first four bytes from right are taken to LH.

So, later if the code is assembled it would look like this if you disassemble it:

In other words, CajeASM splits the value into upper and lower half and places the upper half into LUI and the lower half to LH. This is really useful when creating a kind of variable list. Also, if mistakes were made, you wouldn't have to rewrite each line. A quite common mistake is the 0x7FFF negative rule. Actually Mario's current coins (in SM64) is stored in 0x8033B218 and not 0x8034B218. However, the lower half 0xB218 is over 0x7FFF and therefore negative. Later it's aligned to a 32-bit value. MIPS wants to keep the negative value and so we add (in reality) 0xFFFFB218 to 0x8033. Obviously this would result in loading the value from 0x8032B218, which is wrong. So, we add 1 to the upper half (0x8034) so later the game loads the correct value from 0x8033B218. Now imagine, you made this mistake and didn't use a define. Well, that can be pretty depressing. Of course, Notepad++ would offer macros to prevent this but most variables (in SM64 especially) start with 0x8033 and so it's pretty hard to use a macro to replace all of them with 0x8034 because some of them have a positive lower half. So, if we use defines instead, we simply change the value and everything is good again.

For the .include directive you can also make up a kind of small "library" with all the variables from the game you find or will find. Labels are also imported through .include allowing to even make a JAL to them and write own subroutines.

Nice to see new assemblers, particularly on systems where previous offerings tend to be... lacking. I would have settled for one that was reliable, if you are going to add labels and other fun things then even better.

By the way if you are going to be playing in MIPS assembler most would probably hold as the gold standard for these kinds of assemblers around here, it does have MIPS as well but MIPS I rather than MIPS III is what it does. Now if you wanted to harmonise usage/syntax between the two then you might gain a few friends.

I am not sure, what you're trying to imply here, FAST6191. First off, CajeASM already allows to use labels, defines (or variables), LUI-To-SW/LW/SH/LH/SB/SH auto-extension (which NO other assembler so far ever did) and even does properly assemble ALL RSP ASM instructions (without allowing illegal LDV instructions unlike most assemblers) since v3.50. In fact, I would say, it's the most advanced N64 assembler out there from a technical viewpoint (lexer, parser). Only the bass assembler is still better by miles. But words are useless here, since I know anyway that you and KC keep campaigning your assembler continously everywhere and worship it almost as a deity.

There is no dispute that CajeASM is better than LemASM (which was quite easy though, since it's very out of date and hasn't been updated for a very long time) and better than armips. You can take a look at my source code yourself. Don't get me wrong. I don't want to say that CajeASM is perfect. I do know my limits and I know CajeASM still misses a few crucial features, such like macros. But armips certainly isn't a gold standard. (see explanation below, but I know you won't read it anyway)

That's only true for the version on RHDN, the current version on the GitHub repository has vast but incomplete support for MIPS3 platforms like PSP and PS2.

It is definitely nice to see more work on these system though. I would definitely be open to integrate more N64 support too, if that is a route you would like to go.
I'm sorry, Kingcom, but I don't understand why you (and your troll friends) keep spamming your ludicrous joke of an assembler into my topic and any board in which N64 Assembly talks occur. And yes, I know FAST6191 was just here to mention your assembler so you would have a reason to post it here again. Seriously. It's not even that good. "Reliable". Lmao. Up to this day you still did not explain why ".your .commands .have .to .be .like .this" (despite that I know exactly why. It's because you cannot write a proper lexer and parser, thus need to do this in order for your assembler not to collapse like a house of cards). Hiding all your inability behind the term "design choice" had me laugh good. ;D . Even though your assembler has been around for so long, I see nothing but new bloated BS being added, in every new commit, while serious bugs and even incorrect encodings (RSP ASM) continue to linger inside. Not to mention that your documentation of the assembler also leaves a lot to be desired. So it's not even really usable, because hardly anyone who downloads and wants to use the assembler for the first time even knows what commands are available without having others begging you for help. What a fucking joke. How do you define "reliable" ? I am really interested into that. Armips is not reliable at all. Not in its current state.

More specifically, your assembler still misses nested scoping, a proper syntax and dynamic macros. Hell, it doesn't even properly assemble RSP instructions (and there are still many missing) and allows illegal instructions (unaligned addr). Anyone calling this assembler of yours the "Gold Standard" is honestly grossly exaggerating or must be one of your troll friends (the latter being more likely). Yes, perhaps your assembler being a "gold standard" was true at the time when N64 assemblers were rare and the first ones just came up back then. But that would be from a historical POV, not a technical one. From a technical POV, it's one of the worst assemblers written out there and definitely not something a future programmer should take as a role example. That's my 2 cents to this.

If you want to talk about an actual gold standard, then let's talk about byuu's creation: bass. (formely known as xkas)

Bass allows dynamic macros, doesn't rely on miserable design decisions (caused by shitty coding) like writing a dot before each command, is highly customizable so you can easily add new instruction set architectures without recompiling the source code, is fully documented and can be used right away by any newcomer and most of all it allows nested scoping. Bass has come a far way. It's really the only assembler that I think is worth to call an absolute masterpiece. It's not surprising, of course, since byuu has even written his own SNES emulator (bsnes) that outshined all others, even right on its initial release. (and later with the SA1-chip emulation)

So, if we were looking for a "gold standard", then it is without doubt bass from byuu. So, Kingcom. Take a good look at how an assembler is actually made by peaking into the source code byuu's bass assembler, so that you might hopefully learn that an assembler does not have to rely on hacky workarounds in order for it to work properly. Coining hardcoded BS, bugs or limitations caused by your own source code (such like the dot thing) as "features" or "design choices" is truely evidence of incapacity. Instead of campaigning so much for this half-assed assembler of yours, you should invest your time to actually fix it. People can wait. But you actually need to do something if you're that desperate to have it called a "gold standard".

CajeASM - A MIPS R4300i Assembler
CajeASM is, as the title states, a MIPS R4300i Assembler and soon a PowerPC Assembler for GC and Wii. If you aren't aware yet, what exactly "Assembly" is, let me sum it up for you:

Assembly is basically a low-level language. With assembly we give the game or to be more specific the CPU "commands" to do something. That could be a very simple task like adding 1 and 1 or a more complex task like calling a subroutine(or better known as function) and passing arguments.

Download Link:

To assemble something in CajeASM, just watch this video. It shows a sample ASM Code assembled to a SM64 ROM.

SM64 Hacking - CajeASM : How to assemble an ASM File to your ROM

If you know assembly, you can do a lot of nice stuff.


FLUDD by Kazeshin(aka Kaze):

(Full Video: FLUDD)

Shop Guy by Tarek701/Cajetan (aka me):

(Full Video + Download Link: Shop Guy v0.2)

More Objects Patch by Kazeshin(aka Kaze):

(Full Video + Download Link: More Objects Patch

Pages: [1]