Top all-time · #2352
Coranac
Personal blog · coranac.comgamesprogramminghardware
Coranac is a personal blog at coranac.com about games, programming and hardware. Since 2008, 35 different Hacker News readers have linked it 42 times, most often “Game Boy Advanced programming tutorial”. It is still writing: the last post was on 2025-08-24, and you can follow it by feed.
Most-linked posts?
- Game Boy Advanced programming tutorial5 people · 5 mentions · first linked 2018-04-27
- /tonc/text/4 people · 5 mentions · first linked 2018-11-26
- A Guide to Programming Nintendo GameBoy Advance4 people · 4 mentions · first linked 2012-12-21
- A Whirlwind Tour of ARM Assembly4 people · 4 mentions · first linked 2013-08-01
- Whirlwind Tour of ARM Assembly3 people · 4 mentions · first linked 2018-04-29
- Another fast fixed-point sine approximation3 people · 3 mentions · first linked 2014-01-16
- /tonc/text/bitmaps.htm2 people · 2 mentions · first linked 2020-11-15
What Hacker News says?
Practice. A lot. A good start is actually the ARM processor; since it's a RISC instruction set, it's quite simple. I've done lots of assembly in my ugrad days, even writing a Motorola HC11 micro-controller emulator, but ARM would be a much better choice right now. I found the "Tonic: Whirlwind Tour of Assembly" [1] site invaluable to get me started for SnappyCam, as it covers a lot of the ARM ISA. For iOS-related as…
Comment linking /tonc/text/asm.htm
on “Scientific Breakthrough Lets SnappyCam App Take 20 Full-Res Photos Per Second”Submitted Matrices from a geometric perspective as a story · 206 points
HN discussionWow It is really cool to see you on hackernews as well. I have programmed 2 different gameboy advance games for game jams in the past. But building it from scratch is really hard. Most resources are down with the exception of TONC https://www.coranac.com/tonc/text/ So you will have to use the spec sheets a lot. Gbstudio is very well made and easy to use. But if you are looking for a challenge i will leave the trivia…
Comment linking /tonc/text/
on “Microsoft Tilecode”Submitted A Whirlwind Tour of ARM Assembly as a story · 42 points
HN discussionRelated: here is a very good article and comments on estimating transcendental functions: http://www.coranac.com/2009/07/sines/ I'm annoyed that one of the links in the comments is broken: there was a page where you entered your function and it provided a chebyshev polynomial to generate it to a particular precision. EDIT: well here is another one: http://goddard.net.nz/files/js/chebyshev/cheby.html
Comment linking /2009/07/sines/
on “Intel Underestimates Error Bounds by 1.3 Quintillion”Submitted Low level stuff in ARM as a story · 23 points
HN discussionI've found this to be a good resource: https://www.coranac.com/tonc/text/
Comment linking /tonc/text/
on “How to run a program without an operating system?”Submitted Game Boy Advanced programming tutorial as a story · 3 points
HN discussionInteresting post. I wish it went deeper but I guess it's just a post-mortem. Related, I found this old post that goes into the basics of GBA coding [1]. It doesn't look nearly as bad as I expected. That said I'm sure performance might be the issue once you start having a few things going. If you have a good resource please let me know (I prefer C). Edit: also this library [2]. [1] http://www.loirak.com/gameboy/gbatu…
Comment linking /tonc/text/toc.htm
on “I wrote a Game Boy Advance game in Zig”Submitted Introduction to GBA Graphics as a story · 3 points
HN discussionThe Game Boy Advance is a fun console to program for. Though you'd need to get a flash cart to easily run your code on it, which isn't especially cheap. https://www.coranac.com/tonc/text/ http://problemkaputt.de/gbatek-index.htm
Comment linking /tonc/text/
on “Notris: A Tetris clone for the PlayStation 1”Submitted Another fast fixed-point sine approximation as a story · 3 points
HN discussionPokémon! GBA (ARM7) is even being used in some undergrad level OS classes. Although you may get more mileage out of RP3 development. disassembly of Pokémon Red/Blue https://github.com/pret/pokered TONC GBA Programming Principles https://www.coranac.com/tonc/text/toc.htm
Comment linking /tonc/text/toc.htm
on “Ask HN: What are some examples of beautiful x86 assembly code?”Submitted Detailed guide on GBA game programming as a story · 2 points
HN discussionIf anyone is interested in making a Gameboy game from scratch. Tonc is basically the resource that everyone is using to do that. https://www.coranac.com/tonc/text/
Comment linking /tonc/text/
on “GB Studio: A game maker for the Game Boy”Submitted A Look at Arctangent Implementations as a story · 2 points
HN discussionI haven't written a GBA emulator, but GBA got me into ARM. Tonc's old guide to ARM[1] I'll still send to people who want to learn ARM. [1] https://www.coranac.com/tonc/text/asm.htm
Comment linking /tonc/text/asm.htm
on “Writing a Game Boy emulator”Submitted Whirlwind Tour of ARM Assembly as a story · 2 points
HN discussionIn my sibling comment about the overall systems aspects of the situation, I asserted that there was in fact enormously more information available for how to program in the 32-bit ARM assembly used by the ATSAMD20 than in Z80 assembly. This is an overview of that information, starting, as you did, from the Internet Archive's texts collection. Searching the Archive instead for [arm thumb programming] I find https://ar…
Comment linking /tonc/text/asm.htm
on “Collapse OS”Submitted A Guide to Programming Nintendo GameBoy Advance as a story · 2 points
HN discussionThe most popular toolchain is devkitPro, which is based on GCC: https://devkitpro.org/wiki/Getting_Started The impression I've gotten is that the GBA is powerful enough that you can write most of your programs in C, but some performance-critical stuff (like if you're trying to draw pixels directly instead of using the sprite/tile hardware) is best written in assembly. If you're interested in learning more, I would h…
Comment linking /tonc/text/toc.htm
on “Game Boy Advance “Hello World” Using Zig”Submitted Another fast fixed-point sine approximation as a story · 1 points
HN discussionhttps://www.coranac.com/tonc/text/toc.htm http://ianfinlayson.net/class/cpsc305/notes/01-intro By programming for the Game Boy Advanced ofcourse
Comment linking /tonc/text/toc.htm
on “Ask HN: Resources for getting started with bare-metal coding?”Submitted Making Games the Hacker Way - Tonc GBA as a story · 1 points
HN discussionHe lists resources at the end. TONC is really invaluable: http://www.coranac.com/tonc/text/ It's an interesting thing to try out. Especially to see what memory pre-allocation and limited resources can do to your way of modern thinking. It's also a nice exercise in C. You can do it via emulator, but linkers are rather cheap for GBA. There's something insanely satisfying seeing your crap run on mystical hardware of ye…
Comment linking /tonc/text/
on “Writing a Game Boy Advance Game”I can also recommend these blog posts about mode 7 (2 parts) https://www.coranac.com/tonc/text/mode7.htm https://www.coranac.com/tonc/text/mode7ex.htm
Comment linking /tonc/text/mode7ex.htm
on “Mode7 Graphics Library for Playdate”You could try old systems. The GameBoy Advance is reasonably well-documented[0] (enough for me to write a simple game for it over the summer as my first real C program), and a hacked 3DS[1] can run the game on real GameBoy hardware through Virtual Console injection. [0] http://coranac.com/tonc/text/ [1] reddit.com/r/3dshacks
Comment linking /tonc/text/
on “What is the “two-drive trick” that can read Amiga disks on a PC?”If you like this article you might be interested in this article about the mode7 on the GBA: http://www.coranac.com/tonc/text/mode7.htm Personally I love this kind of old-school programming article. It reminds me when I was developing homebrew games for the GBA!
Comment linking /tonc/text/mode7.htm
on “Lou's Pseudo 3d Page”That kind of empty loops are actually used for delays, waiting on interrupts to kick in etc. in embedded systems, where you typically fight against the compiler using volatile keyword. Example from https://www.coranac.com/tonc/text/video.htm : #define REG_VCOUNT *(volatile u16*)0x04000006 while(REG_VCOUNT < 160);
Comment linking /tonc/text/video.htm
on “A Plan 9 C compiler for RISC-V [pdf]”You are definitely right. Tonc has some interesting data (here: http://www.coranac.com/tonc/text/text.htm#tbl-txt-se2 ) about performance of operations with 16 bit vs 32 bit variables, but none of that information applies to memcpy, and I think I jumped the gun on making as much as possible 32 bit types. Thanks for catching that! I'll remedy that line later this evening. Although, evidently ARM chips have an optimiz…
Comment linking /tonc/text/text.htm
on “Gameboy Advance Development by Example: Drawing and Moving Sprites”