pret / pokeyellow

Disassembly of Pokemon Yellow
716 stars 266 forks source link

Errors. Errors everywhere. #1

Closed dannye closed 9 years ago

dannye commented 9 years ago

This doesn't even come close to building anything. I know of course it isn't going to build a real Yellow, but you have introduced so many bugs and typos that this is a nightmare for me to go behind you and fix your mess. This should be redone from the start.

luckytyphlosion commented 9 years ago

Can you give examples of some of the bugs/typos I have introduced?

dannye commented 9 years ago

https://github.com/luckytyphlosion/pokeyellow/blob/master/home.asm#L168 https://github.com/luckytyphlosion/pokeyellow/blob/master/home.asm#L545 https://github.com/luckytyphlosion/pokeyellow/blob/master/home.asm#L1064 https://github.com/luckytyphlosion/pokeyellow/blob/master/home.asm#L1066 https://github.com/luckytyphlosion/pokeyellow/blob/master/home/copy2.asm#L17 https://github.com/luckytyphlosion/pokeyellow/blob/master/home/copy2.asm#L21 https://github.com/luckytyphlosion/pokeyellow/blob/master/home/copy2.asm#L72 https://github.com/luckytyphlosion/pokeyellow/blob/master/home/copy2.asm#L137 https://github.com/luckytyphlosion/pokeyellow/blob/master/home/copy2.asm#L140 https://github.com/luckytyphlosion/pokeyellow/blob/master/home/copy2.asm#L141 https://github.com/luckytyphlosion/pokeyellow/blob/master/home/copy2.asm#L143 https://github.com/luckytyphlosion/pokeyellow/blob/master/home/overworld.asm#L190 https://github.com/luckytyphlosion/pokeyellow/blob/master/home/overworld.asm#L290 https://github.com/luckytyphlosion/pokeyellow/blob/master/home/overworld.asm#L641 https://github.com/luckytyphlosion/pokeyellow/blob/master/home/overworld.asm#L1783 https://github.com/luckytyphlosion/pokeyellow/blob/master/home/overworld.asm#L1784 https://github.com/luckytyphlosion/pokeyellow/blob/master/macros.asm#L77 https://github.com/luckytyphlosion/pokeyellow/blob/master/main.asm#L22 https://github.com/luckytyphlosion/pokeyellow/blob/master/main.asm#L2035 https://github.com/luckytyphlosion/pokeyellow/blob/master/main.asm#L2037 https://github.com/luckytyphlosion/pokeyellow/blob/master/main.asm#L4861 https://github.com/luckytyphlosion/pokeyellow/blob/master/yellow/bank3d/random.asm#L1 https://github.com/luckytyphlosion/pokeyellow/blob/master/yellow/bank3f/main.asm#L24

These mistakes consist of multiple identical global labels, multiple identical section names, references to labels that don't exist, references to wram address labels that don't exist, references to files that don't exist, opcodes that don't exist, labels that have invalid symbols, and a macro that doesn't have an ENDM.

In addition to these, there are many other references to labels that don't exist in home/overworld.asm (and bank3f/main.asm) but I'm not going to list them all. That file is seriously messed up, and the worst part is that I can't trace your changes because your text editor changed the EOL encoding of many files and ruined the commit: click -> https://github.com/luckytyphlosion/pokeyellow/commit/b5f5a16f43ef62680f09666073f07911306e1561

Plus, you shouldn't have loose .asm files in the yellow/ folder. That folder is just for object files. What you did causes the Makefile to think that bank3c/main.asm, bank3d/random.asm, and bank3f/main.asm (and the several other files in yellow/) are their own object.

This commit fixes most of the bugs I mentioned, except for all the references to labels that don't exist in home/overworld.asm and bank3f/main.asm (and any other errors that rgbds hasn't told me about yet) https://github.com/dannye/pokeyellow/commit/d48ea223eaad84af95e4f29043c279b56aa4ae88

Also, apparently, rgbds doesn't like this syntax: https://github.com/luckytyphlosion/pokeyellow/blob/master/sram.asm#L13

Also, every instance that FarCopyData2, SerialFunction, LoadWalkingPlayerSpriteGraphics, Func_11a5, Func_342a, Func_f6203, Func_fcdb8, Func_fc6d5, Func_fcb84, or Func_fce18 is called gives an error because those functions don't exist.

luckytyphlosion commented 9 years ago

Fixed the EOL encoding and merged with your repo.

Most of the labels/references that don't exist are because I haven't gotten to fixing/adding those all (e.g. FarCopyData2 is completely removed in Yellow, so it would require a lot time fixing functions that have used the function in pokered)

The other bugs you've mentioned were completely on my fault, so I'll be sure to take caution when editing.

EDIT: Just for clarification, all addresses wSGB on have an offset of 1, which means wram labels like "wd430" point to an address of $d42f.

luckytyphlosion commented 9 years ago

pokeyellow now builds to baserom, closing issue.