aboutsummaryrefslogtreecommitdiff
path: root/src/jetpac.s
Commit message (Collapse)AuthorAgeFilesLines
* Initialize 'zp_pause_toggle' before NMI enablementMiquel Sabaté Solà2026-03-071-1/+6
| | | | | | | | | Otherwise we might randomly get weird scenarios like the title screen not showing up properly. Fixes: bc99212539f6 ("Toggle a "Paused" message on top of the screen") Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Add the Game Over screenMiquel Sabaté Solà2026-03-051-3/+29
| | | | | | | This is still missing the support for player 2, but I've left traces about it. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Update lifes left for player 1Miquel Sabaté Solà2026-03-041-0/+1
| | | | | | | The whole handling of player 2 will come whenever I set to implement multi-player for this game. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Let enemies die whenever they touch a bulletMiquel Sabaté Solà2026-03-031-1/+1
| | | | Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Add a pool of explosion effectsMiquel Sabaté Solà2026-03-031-0/+1
| | | | | | | For now this only applies to enemies, but it's general enough so it can target any given coordinate, and hence any given object. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Remove vector.sMiquel Sabaté Solà2026-02-131-1/+66
| | | | | | | | | | | | | | | | | Instead of this, the 'reset' function can go into 'jetpac.s', as we could consider it's part of the 'main' work. As a bonus, doing this alignment gives us 3 bytes back from ROM space. Not that we care too much about space, but it's amusing nonetheless. The debug scope has been moved into its own file in include/. Admittedly it's not the most crucial file in the project, but it makes things more logical and it opens the door to more debugging utilities. This leaves us with a vector.s file only containing interrupt code. Thus, it just makes sense to rename it to interrupts.s, which in the end makes things more organized. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Replace some todo's with the safe __fallthrough__Miquel Sabaté Solà2026-02-111-1/+1
| | | | Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Adapt the code to play well with nasm's asanMiquel Sabaté Solà2025-12-151-4/+4
| | | | | | | The address sanitizer from nasm provides quite a few goodies, so let's adapt the code more to it to benefit from those. Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
* Initialize enemies at a random Y coordinateMiquel Sabaté Solà2025-05-161-0/+1
| | | | | | | | | The randomness comes from a pre-computed table of "random" numbers. This is of course the most simple technique you can come across a code base for the NES/Famicom, but for the purposes of this game is good enough and (most importantly) fast. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Add the skeleton code for enemiesMiquel Sabaté Solà2025-05-151-0/+1
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Define the notion of a levelMiquel Sabaté Solà2025-05-151-0/+13
| | | | | | | | | This is for now just a variable that will be set during initialization, and that it can be influenced through the `LEVEL` make variable. Both the level and the level "kind" notions are used tracking, at least, which kind of enemy wave we have to send. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Implement the base for moving bulletsMiquel Sabaté Solà2025-05-141-0/+1
| | | | | | | | | | | This establishes a way for bullets to move, be displayed as independent sprites, cycle these sprites, and check for the collision on the background. This is still lacking the collision check with enemies and has some obvious bugs that will be fixed on the next commits. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* reset: Do not zero out RAMMiquel Sabaté Solà2025-05-121-1/+9
| | | | | | | | | | | | | | | | This is usually done so the programmer can forget about initializing in the future, but it not only hides programming mistakes, but we are also resetting memory addresses which are never to be used by this simple game. Hence, just skip resetting RAM altogether. Last but not least, sprite initialization in `reset` code has also been optimized so instead of around 2000 cycles it takes half of that. This is done by only touching the first byte of the four bytes for a sprite in OAM, which is enough for hiding random sprites and the cost of extra `inx` instructions is far cheaper than all the extra `sta` to absolute address with X-index from the old code. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* player: First PAL implementationMiquel Sabaté Solà2025-04-021-0/+6
| | | | | | | | | The steps by which a player increases its current velocity to reach the target one has been adapted on PAL, so every five frames it takes an extra step compared to NTSC. This at least brings PAL to grow its values at the same rate as NTSC. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Disable the PPU between the title to main screensMiquel Sabaté Solà2025-03-191-1/+8
| | | | | | | During other transitions like game over and such it might also be needed to have something similar, but for now this should cut it. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Expanded ground collision to the other platformsMiquel Sabaté Solà2025-03-181-0/+1
| | | | | | This comes with a more general approach to handle background collision. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Add basic vertical movementMiquel Sabaté Solà2025-03-171-0/+1
| | | | | | | Collisions are not quite there yet, and horizontal movement is still to be done. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Support PAL nativelyMiquel Sabaté Solà2025-03-141-4/+26
| | | | | | | Also add a make target specific for a PAL version, even if only the full game will be built, not the development "partial" one. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Add a title and a main screensMiquel Sabaté Solà2025-03-131-55/+58
| | | | | | | | This commit adds the skeleton for having a title and a main screen. For now the title menu doesn't do much, as the selection is simply ignored, but at least it already knows how to cycle between these two states. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Start with a skeleton for the projectMiquel Sabaté Solà2025-03-121-0/+86
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>