8 ms·
GameBoy Programming Manual
- deletes 13y agoMaybe i missed something, but the options are: Login with facebook or Pay Us. >>To download this document you must become a Premium Reader<< EDIT: http://www.romhacking.net/documents/544/ http://www.romhacking.net/documents/544/ https://www.google.com/search?hl=en&safe=off&q=GameBoy+Programming+Manual https://www.google.com/search?hl=en&safe=off&q=GameBoy+Progr...
- cyphax 13y agoI couldn't download it from Scribd either without paying. A 9 dollar one-day pass... don't think so. The first link you posted allows you to download the file. Thanks so much for posting it!
- incision 13y agoI'm really surprised Scribd seems to have had little public trouble with copyright. I used to find myself there all the time for various hard to find and not for public consumption automotive docs. The site was full of obviously infringing content.
- 0x09 13y agoThis post seems to have been inspired by a comment I made yesterday with the original PDF ( ´_ゝ`) https://news.ycombinator.com/item?id=6119347 https://news.ycombinator.com/item?id=6119347 http://chrisantonellis.com/files/gameboy/gb-programming-manual.pdf http://chrisantonellis.com/files/gameboy/gb-programming-manu...
- deletes 13y agoSo if i understand this correctly, you can only write in the screen buffer using a character of 8x8 pixels.
- bluedino 13y agoRight - everything has to be a sprite. That way you can represent the screen with something like 360 (20x18) sprites, instead of 23040 (160x144)) pixels. The sprites are also done by blitting hardware, the Z80 CPU presumably couldn't update a 160x144 screen at a playable framerate if it had to update pixel by pixel.
- gcv 13y agoI didn't know that GB consoles didn't have a flat memory model. That was horrible to program with x86/DOS and must have sucked even more on a tiny hand-held.
- pdw 13y agox86/DOS actually was much nicer than most consoles, as it had a 20 bit address space. All memory in the machine could be addressed, even if you had to juggle NEAR and FAR pointers. The 8/16-bit consoles could only address 64k, which was to be used for program, data, VRAM and memory-mapped I/O. So you were forced to partition your code and data in 8k or 16k banks and manually swap them in and out. If bank 1 was swapped in, there was no way to access bank 2...
- g-rex 13y agoThe NES had 32K addressable RAM...while some behemoths like Castlevania 3 (http://en.wikipedia.org/wiki/Castlevania_III:_Dracula%27s_Curse http://en.wikipedia.org/wiki/Castlevania_III:_Dracula%27s_Cu...) had 256K of program code to fit in that little box. Every game company solved this problem differently, it seems: http://wiki.nesdev.com/w/index.php/Mapper http://wiki.nesdev.com/w/index.php/Mapper
- NanoWar 13y agoAwesome find, this also helps to program for other devices that run the z80 processor (TI83 anyone?)! :-D
- dmm 13y agoNot particularly... The game boy's processor is more like a i8080 than a z80. It lacks the second register set used for interrupt handling and the iX and iY registers and the super-sweet addressing mode they enable. Game boy assemblers do use the z80 syntax rather than the crazy i8080 syntax, thankfully.
- kowdermeister 13y agoNo jQuery plugin for app dev? :)
- krallja 13y agohttp://imrannazar.com/GameBoy-Emulation-in-JavaScript:-The-CPU http://imrannazar.com/GameBoy-Emulation-in-JavaScript:-The-C...
- jorgeleo 13y agofrom the manual: "2. CPU 2.1 OVERVIEW OF CPU FEATURES The CPUs of DMG and CGB are ICs customized for DMG/CGB use, and have the following features. CPU Features Central to the 8-bit CPU are the following features, including an I/O port and timer. 127 x 8 bits of built-in RAM (working and stack)" How much memory is needed today to make games that are only half entertaining?
- deletes 13y agoOf course modern games use more memory as they are running on completely different platforms. Memory usage has nothing to do with entertainment level. A 8-bit Chess Game might be as entertaining to someone as is Call of Duty 26 to someone else. (Game boy has 8192 bytes of working ram. 127x8 bits is only for stack)
- pdw 13y agoAnd cartridges could have additional RAM for games that needed it.
- felipebueno 13y agoThanks for the manual. =] I know it's not an official manual but it's worth mentioning: GBA Tonc - http://www.coranac.com/tonc/text/toc.htm http://www.coranac.com/tonc/text/toc.htm PDF download: http://www.coranac.com/files/tonc.pdf http://www.coranac.com/files/tonc.pdf
- rtpg 13y agoI've really been wanting to get into GBA programming. I really would like to buy a cart to be able to develop directly on my DS ( I thought I would be able to find one in Akiba, but they seem a bit impossible to find in person, and all the online stores I've seen seem mega shady)
- dyselon 13y agoPractically speaking, most of your iteration will be on emulators anyway, so don't let not having a cart stop you from getting started. GBA programming is a ton of fun!
- felipebueno 13y agoHere's a nice tutorial to get you started: http://dev-scene.com/NDS/Tutorials_Day_1 http://dev-scene.com/NDS/Tutorials_Day_1
- laurent123456 13y agoThat's an amazing document, looking forward to read it.
- Keyframe 13y agoIt's always interesting to see game console programming. On a similar note tonc http://www.coranac.com/tonc/text/ http://www.coranac.com/tonc/text/ is a great intro to homebrew GBA programming.
- brickmort 13y agowow. My childhood dissected into something I can (to a marginal extent) comprehend. It's quite the fascinating reality check. It isn't really magic after all.
- adjwilli 13y agoI can hardly understand anything in that doc. I'm a decent-enough iOS programmer from a LAMP and design background. It makes me wonder if in 20 years people like me will look back at the iOS programming guide and be equally confused. As programming gets abstracted out, put into frameworks and simplified at the user-level it's sure to go even more visual.
- segmondy 13y agoI like that you said you are an "iOS programmer" that's the problem with programming today. you are not a programmer. if you were a programmer, you would be able to make sense of that document. so to answer your question, 20 years from now, programmers of that era will be able to make look at iOS programming docs and understand it, meanwhile "20 year future language programmers" won't. I say this because I learned gameboy programming in my first year of college (1997) by learning z80 and reading gameboy programming text files that were probably around 5 pages. that low level programming, till today serves me well.
- deletes 13y agoI don't see any reason why "future" programers could not just learn low level stuff. Your reasoning is completely subjectively based. Programing is something more than just specific knowledge. programmer from dictionary: >>a person who writes computer programs; a person who programs a device, especially a computer. << iOS Programers fit that description.
- aa0 13y agoOP is referring to programmer in the same vein as someone refers to an 'artisan.' You wouldn't call someone an artisan if all they do is manage the inventory order from Baked-Cakes-For-Fakes. There are far too many 'programmers' who can't code their way out of a paper bag. If you don't know assembly you probably blow at debugging, and that's amateur.
- diydsp 13y agohmmm. a bit harsh and inaccurate to call him "not a programmer." We are all really just digital stage managers. Here's the secret to understanding the difference between API'ists and low-level programmers: time-to-market. iOS programming is deeply mainstream in the market right now, so elaborate frameworks are available for it. GameBoy was waaaay ahead of its time and had no APIs for developing. The same is true today: If you want to get ahead of the market, you can take the hit in complexity and develop for a lower-level of hw/sw, like the Parallela, in exchange for a short-term advantage, but there's no mainstream market yet. Or, you can write a great iOS app today, but you won't be the first. The initiative was lost a long time ago. It's all about withstanding the headaches of bleeding-edge HW and SW, versus gaining the edge of being earlier to market. If you're assembling a team, you want a range of abilities, from lowest-level people who can tell you what's really going on down deep inside up to the APIists who can leverage the work of many others to get access to widely-used features.
- plnewman 13y agoBack when I was teaching English in Japan, I stayed up late hacking on Game Boy code to keep that part of my brain active. It was during that time that I really realized that I wanted to work in software, or at least something with some creative output. I didn't use any of this though, I found a Japanese book on the GBDK C compiler. It's still available here: http://gbdk.sourceforge.net/ http://gbdk.sourceforge.net/ and there are more resources here: http://devrs.com/gb/software.php#assemble http://devrs.com/gb/software.php#assemble I've thought since then that working on a simple machine like that is a great way to learn the fundamentals of computer science.
- mackwic 13y agoAs I understand CS, it deals a lot with Data structure construction and management. In my school, we began with high-level functional languages and it's only after 3 years of programming than we discovered low level programming and could write a Kernel. Can you explain how a RISC assembly language can help you learn CS ?
- plnewman 13y agoI'm not sure if I define CS that narrowly, but anyway I was working with the C compiler, not the asm code. It was a good learning tool for me because of the simple output and the slow processor, which meant that I didn't need to worry much about the graphics and that poorly performing code was immediately, painfully noticeable. There were plenty of data structures to work with sprites, characters, screens, etc. My CS course (in the late 90s) kind of went the other way. One of the earliest courses was one that taught how a cpu operates -- what a register is, what the accumulator is, etc. There was no actually programming, just working through the steps of what the computer does to perform a given operation. After that there were a number of directions to go in.
- mackwic 13y agoAw right, I missed the C compiler point. > I'm not sure if I define CS that narrowly I mostly wanted to bold the data structure manipulation, something you wouldn't see when manipulating directly the assembly code.
- jevinskie 13y agoThis cribsheet was very handy when I was writing a Z80 emulator. http://www.otakunozoku.com/nintendo-gameboy-cribsheet/ http://www.otakunozoku.com/nintendo-gameboy-cribsheet/