5 ms·
Yes, it's all written in z80 assembly, although the GameBoy CPU really uses a mix of i8080 and z80 instructions, the mnemonics are all z80. I've also written my
by BonsaiDen 12y ago
Yes, it's all written in z80 assembly, although the GameBoy CPU really uses a mix of i8080 and z80 instructions, the mnemonics are all z80. I've also written my own assembler just recently, to have more control over the output and more easily generate debugging information: https://github.com/BonsaiDen/gbasm https://github.com/BonsaiDen/gbasm
- glhaynes 12y agoalthough the GameBoy CPU really uses a mix of i8080 and z80 instructions, the mnemonics are all z80. I'd love to hear more about this if anybody knows and feels like telling about it...
- userbinator 12y agoIt's a Z80-like core with some modifications; not all the Z80 instructions and registers are present and some instructions are completely different. Most instructions are the same as the 8080, but all 3 CPUs are not completely binary-compatible. It's neither truly an 8080 with added instructions, nor a Z80 with omitted ones. For comparison: http://pastraiser.com/cpu/gameboy/gameboy_opcodes.html http://pastraiser.com/cpu/gameboy/gameboy_opcodes.html http://pastraiser.com/cpu/i8080/i8080_opcodes.html http://pastraiser.com/cpu/i8080/i8080_opcodes.html
- harwoodr 12y ago"my own assembler" - now you're just showing off. :)
- BonsaiDen 12y agoNah' I would only be showing off if I were to put it onto a real cartrdige and GameBoy, wouldn't I? ;) - https://dl.dropboxusercontent.com/u/2332843/tuff.cartridge.jpg https://dl.dropboxusercontent.com/u/2332843/tuff.cartridge.j... - https://www.youtube.com/watch?v=yXNEeld8Lq8 https://www.youtube.com/watch?v=yXNEeld8Lq8
- stevelosh 12y agoIf folks want to try it on a real Gameboy without all the wires, the Drag'n'Derp works pretty well. It's a Gameboy cart with a USB port for easy writing: http://derpcart.com/ http://derpcart.com/
- BonsaiDen 12y agoI was looking at these option initially too, but ended up going for the challenge since, both I read some not-so-good reviews and shipping the thing to germany would probably ended up being at least as expensive as buying the soldering equipment :) Building one of those custom GamePaks takes about ~4 hours once you have all the materials prepared (you really need very, very thin wires!) and putting it together for the first time is one of those finger crossing moments which you'll remember for a really long time :)
- DanBC 12y agoI took a cart, removed the game IC, and soldered in a ZIF socket for eproms. And I'm a klutz so it's easy enough. http://www.devrs.com/gb/files/faq.html http://www.devrs.com/gb/files/faq.html
- voltagex_ 12y agoAm I right in thinking that GameBoy carts are now a precious resource? We'll run out one day?
- JonnieCache 12y agoPretty sure you could make your own with a 3d printer and one of those kitchen PCB-etching setups you see people using. There's no magic in there AFAIK.
- ant512 12y agoThe Everdrive GB takes micro SD cards, so it has more space: http://krikzz.com/index.php?route=product/product&product_id=60 http://krikzz.com/index.php?route=product/product&product_id...
- phaer 12y agoIt sounds very advanced but an assembler for a rather simple architecture like z80 is much easier to write like most (other) compilers for example.
- ams6110 12y agoUsed to be a standard 2nd or 3rd year assignment in a comp. sci. curriculum. Not sure if it is anymore.
- tete 12y agoNice! Also nice that these days Assemblers get written in JavaScript. ;)
- pjmlp 12y agoWell, they used to be written in Basic as well, so given that JavaScript has apparently taken Basic's role....
- jldugger 12y agoWhen I was tinkering with gbdev 15 years ago, we had lcc targetting z80. It seems far less painful to write in C than asm.
- vegedor 12y agoC is just an advanced macro-assembler anyway. Would seem painful enough as soon as speed or size became limited. C then was not as optimized as today. Old games used to be written in assembler, now the eeproms are bigger, the compilers are faster and portable.