gameboy software for reading tarot cards
Go to file
2025-04-25 20:24:12 -04:00
card_art i did so much. sorry. 2025-04-25 20:24:12 -04:00
.gitignore attempt to write my own audio engine. didnt work well. 2025-04-03 10:59:18 -04:00
00TheFool.inc some more animations 2025-03-11 17:01:21 -04:00
01TheMagician.inc some more animations 2025-03-11 17:01:21 -04:00
02TheHighPriestess.inc every animation except the four cards i want to fully rework. the world was so hard 2025-03-27 09:45:01 -04:00
03TheEmpress.inc some more animations 2025-03-11 17:01:21 -04:00
04TheEmperor.inc some more animations 2025-03-11 17:01:21 -04:00
05TheHierophant.inc some more animations 2025-03-11 17:01:21 -04:00
06TheLovers.inc anims 6 and 7 2025-03-17 15:08:25 -04:00
07TheChariot.inc every animation except the four cards i want to fully rework. the world was so hard 2025-03-27 09:45:01 -04:00
08Strength.inc every animation except the four cards i want to fully rework. the world was so hard 2025-03-27 09:45:01 -04:00
09TheHermit.inc some more animations 2025-03-11 17:01:21 -04:00
10WheelOfFortune.inc animations 10 and 11 2025-03-16 15:44:34 -04:00
11Justice.inc might have tracked down that async bug 2025-03-18 15:48:04 -04:00
12TheHangedMan.inc might have tracked down that async bug 2025-03-18 15:48:04 -04:00
13Death.inc added animations for 13 14 16 and 17 2025-03-23 16:52:56 -04:00
14Temperance.inc added animations for 13 14 16 and 17 2025-03-23 16:52:56 -04:00
15TheDevil.inc some more animations 2025-03-11 17:01:21 -04:00
16TheTower.inc added animations for 13 14 16 and 17 2025-03-23 16:52:56 -04:00
17TheStar.inc every animation except the four cards i want to fully rework. the world was so hard 2025-03-27 09:45:01 -04:00
18TheMoon.inc every animation except the four cards i want to fully rework. the world was so hard 2025-03-27 09:45:01 -04:00
19TheSun.inc every animation except the four cards i want to fully rework. the world was so hard 2025-03-27 09:45:01 -04:00
20Judgement.inc every animation except the four cards i want to fully rework. the world was so hard 2025-03-27 09:45:01 -04:00
21TheWorld.inc a lot of refactors, and waffling on audio engines. 2025-04-06 11:16:30 -04:00
Async.inc i did so much. sorry. 2025-04-25 20:24:12 -04:00
Audio.inc i did so much. sorry. 2025-04-25 20:24:12 -04:00
CardHelpers.inc i did so much. sorry. 2025-04-25 20:24:12 -04:00
CardLibrary.inc some more animations 2025-03-11 17:01:21 -04:00
CopyRange.inc a lot of refactors, and waffling on audio engines. 2025-04-06 11:16:30 -04:00
CopyTiles.inc a lot of refactors, and waffling on audio engines. 2025-04-06 11:16:30 -04:00
curve_authoring.html minor art updates 2025-03-12 11:52:47 -04:00
gb_tarot_theme.inc got frustrated, wrote an audio engine 2025-04-07 12:20:57 -04:00
gb_tarot_theme.s3m i did so much. sorry. 2025-04-25 20:24:12 -04:00
gb-export.lua add up to 11 justice 2025-02-06 21:43:52 -05:00
gbmnopedie.flac i did so much. sorry. 2025-04-25 20:24:12 -04:00
gbmnopedie.mp3 i did so much. sorry. 2025-04-25 20:24:12 -04:00
gbmnopedie.s3m i did so much. sorry. 2025-04-25 20:24:12 -04:00
gbmnopedie.wav i did so much. sorry. 2025-04-25 20:24:12 -04:00
generate_animation_circling.py async working and three cards circling 2025-01-14 15:06:27 -05:00
GraphicsManipulation.inc i did so much. sorry. 2025-04-25 20:24:12 -04:00
hardware.inc refactor everything to use the websites format and more files 2025-01-08 14:03:54 -05:00
main.asm i did so much. sorry. 2025-04-25 20:24:12 -04:00
misc.py every animation except the four cards i want to fully rework. the world was so hard 2025-03-27 09:45:01 -04:00
mod2gbt a lot of refactors, and waffling on audio engines. 2025-04-06 11:16:30 -04:00
Printing.inc i did so much. sorry. 2025-04-25 20:24:12 -04:00
Random.inc a lot of refactors, and waffling on audio engines. 2025-04-06 11:16:30 -04:00
readme.md a paragraph about the audio engine 2025-04-07 12:29:18 -04:00
RecreatingCards.inc i did so much. sorry. 2025-04-25 20:24:12 -04:00
s3m2shoofmt.py i did so much. sorry. 2025-04-25 20:24:12 -04:00
ScreenCardBrowse.inc i did so much. sorry. 2025-04-25 20:24:12 -04:00
ScreenCardRead.inc i did so much. sorry. 2025-04-25 20:24:12 -04:00
ScreenMainMenu.inc i did so much. sorry. 2025-04-25 20:24:12 -04:00
ScreenShuffle.inc a lot of refactors, and waffling on audio engines. 2025-04-06 11:16:30 -04:00
ScreenSpreadSelect.inc i did so much. sorry. 2025-04-25 20:24:12 -04:00
shoofles_audio_engine_test.s3m i did so much. sorry. 2025-04-25 20:24:12 -04:00
source.zip i did so much. sorry. 2025-04-25 20:24:12 -04:00
theme.inc got frustrated, wrote an audio engine 2025-04-07 12:20:57 -04:00

This is a tarot deck for the Nintendo Game Boy (1989). I hand-coded it in assembly using gbdev.io's live rgbds interface. I made the art in Aseprite, using a script I heavily modified to export the data in a gameboy-compatible format for inclusion in the assembly source.

The entry point for this software is main.asm. I would love to have properly separated all the functionality into different asm files, but rgbds-live seems not to be able to link them together. So I used INCLUDE directives to split it up instead. Each file beginning wih Screen describes one screen of the app. Simple enough. I tend to organize apps into screens or scenes, with the main loop repeatedly calling the appropriate update and draw functions on a scene object, and a helper function to change what scene is loaded (and call setup and teardown, if applicable). It seemed natural enough. It doesn't lend itself to fancy scene-changing animations, but... I'm working with hand-coded assembly on the Game Boy (1989). Forgive me for not putting enough delight and pop! in the UI of my tarot project.

What is there to say about this project? The hardest part by far has been the art. I get into flow states programming really easily - major thanks to my spouse for keeping me from burning out on this project by enforcing working hours. The art has been a struggle. I did not realize how many drawings 22 pieces of art is. It's twenty two! That's a lot! I vaguely dread the idea of doing a whole deck. I'm going to avoid it for now.

The part of this project I'm most proud is the Async subsystem, which you can find defined, unsurprisingly, in Async.inc. It's a fully functioning multithreaded programming system, powered by the game boy's LYC interrupt - a "safe" time period is defined, as a subset of the vblank period, and whenever the LY counter reaches that region, the interrupt is used to switch to a second stack and resume execution of the second thread. The upshot of this is you can write totally normal-looking code, and if you call Async_Spawn_HL with the appropriate argument, it will then run that code only during the "safe" time period. This went through a lot of changes in development, initially without a second stack, so the second thread had to be written with weird compromises like disabling interrupts around function calls. But now it's proper, fully functional context switching!

Let me rephrase: you can have two simultaneous threads of execution, with their own stacks, and it will jump between them so that the second thread only executes during a safe subset of vblank. So you can write totally normal code that copies data to vram, and you don't have to keep track of when it's safe to write.

I'm really proud of some of the art. Especially the sun, the meteor, death, and strength.

Ah, I mentioned The Meteor! I changed Judgement to The Meteor to make the final six cards form a neat sequence of astral bodies. The meteor is depicted streaking down towards Earth, bringing destruction, devastation, a total reset, a game over. It's more oblique than Judgement but honestly, I'm the artist and I get to make the decisions. Maybe I just wanted to draw a meteor. Maybe it's a little bit of a Homestuck reference.

I agonized for a long time over how to integrate sound. I wanted at least sound effects and preferably a background music of some sort, but I'm not a very musical person. I tried GBT player and the Carillon editor/player, both found on gbdev.io. Unfortunately, neither suited my purposes, so I dedicated myself to the task of writing my own audio engine and data format. I cribbed the tooling (an s3m template file and the bones of a conversion script) from GBT player, but largely wrote it myself. Honestly, though it only took a couple days, writing this audio engine was a beast of its own work, and I'd love to write it up and distribute it at some point.