<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://wiki.gametank.zone/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://wiki.gametank.zone/feed.php">
        <title>The GameTank Wiki - development:csdk:2.0:headers</title>
        <description></description>
        <link>https://wiki.gametank.zone/</link>
        <image rdf:resource="https://wiki.gametank.zone/lib/exe/fetch.php?media=wiki:logo.png" />
       <dc:date>2026-04-27T14:36:40+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:audio_coprocessor&amp;rev=1731054666&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:banking&amp;rev=1732268980&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:draw_direct&amp;rev=1732266462&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:draw_queue&amp;rev=1732140353&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:gametank&amp;rev=1731034648&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:gfx_sys&amp;rev=1731035500&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:input&amp;rev=1731034452&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:music&amp;rev=1732137258&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:persist&amp;rev=1732139179&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:random&amp;rev=1732138807&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:sprites&amp;rev=1732138626&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:text&amp;rev=1732138968&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://wiki.gametank.zone/lib/exe/fetch.php?media=wiki:logo.png">
        <title>The GameTank Wiki</title>
        <link>https://wiki.gametank.zone/</link>
        <url>https://wiki.gametank.zone/lib/exe/fetch.php?media=wiki:logo.png</url>
    </image>
    <item rdf:about="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:audio_coprocessor&amp;rev=1731054666&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-08T08:31:06+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>audio_coprocessor</title>
        <link>https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:audio_coprocessor&amp;rev=1731054666&amp;do=diff</link>
        <description>audio_coprocessor.h

audio_coprocessor.h provides functions for interacting with the Audio Coprocessor, usually abbreviated as “ACP”. It also allows for communication with the accompanying Audio Firmware given in “audio_fw.asm”.

The current audio firmware uses a Frequency Modulation technique to produce sound. Working with these parameters directly requires a bit of really involved theory to be covered which is outside the scope of this page. For the most part developers can use functions from …</description>
    </item>
    <item rdf:about="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:banking&amp;rev=1732268980&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-22T09:49:40+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>banking</title>
        <link>https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:banking&amp;rev=1732268980&amp;do=diff</link>
        <description>banking.h

Functions for switching the active ROM bank on the cartridge.

The 2MB cartridge for the GameTank has a split memory access where part of the flash is always accessible (the boot segment) and the rest is accessed through a movable window. All 16-bit pointers to data in different ROM banks will occupy the same overlapping address range, so the bank switching functions must be used to dictate which bank is actually being accessed.</description>
    </item>
    <item rdf:about="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:draw_direct&amp;rev=1732266462&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-22T09:07:42+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>draw_direct</title>
        <link>https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:draw_direct&amp;rev=1732266462&amp;do=diff</link>
        <description>draw_direct.h

draw_direct.h provides macros and functions to support setting up draw operations by direct manipulation of blitter registers. The functions and macros are largely convenience functions for setting up the control registers for common operations, like drawing sprites or colored boxes.</description>
    </item>
    <item rdf:about="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:draw_queue&amp;rev=1732140353&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-20T22:05:53+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>draw_queue</title>
        <link>https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:draw_queue&amp;rev=1732140353&amp;do=diff</link>
        <description>draw_queued.h

draw_queued.h provides a queued drawing API, so that draw operations can be set even while a previous draw is still running. The queue is interrupt-driven, meaning that the interrupt handler will check the queue and start the next draw operation if there is one in the list.</description>
    </item>
    <item rdf:about="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:gametank&amp;rev=1731034648&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-08T02:57:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>gametank</title>
        <link>https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:gametank&amp;rev=1731034648&amp;do=diff</link>
        <description>gametank.h

Header file with a lot of general system defines

Functions


void wait();


wait() waits for the next interrupt to be triggered, either IRQ or NMI. Will trigger even it SEI is blocking the IRQ handler.

Macros

PROFILER_START


PROFILER_START(x)</description>
    </item>
    <item rdf:about="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:gfx_sys&amp;rev=1731035500&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-08T03:11:40+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>gfx_sys</title>
        <link>https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:gfx_sys&amp;rev=1731035500&amp;do=diff</link>
        <description>gfx_sys.h

gfx_sys.h provides functions and macros related to low level graphics system functions

Defines

Sprite flips

	*  SPRITE_FLIP_NONE - Apply no sprite flip
	*  SPRITE_FLIP_X - Apply horizontal sprite flipping
	*  SPRITE_FLIP_Y - Apply vertical sprite flipping</description>
    </item>
    <item rdf:about="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:input&amp;rev=1731034452&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-08T02:54:12+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>input</title>
        <link>https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:input&amp;rev=1731034452&amp;do=diff</link>
        <description>input.h

Functions

update_inputs

This should be called once per frame, ideally right after a v-sync so that the timing is consistent. It updates the controller state variables for both players.


void update_inputs();


Input-related Variables


extern int player1_buttons, player1_old_buttons, player1_new_buttons;
extern int player2_buttons, player2_old_buttons, player2_new_buttons;</description>
    </item>
    <item rdf:about="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:music&amp;rev=1732137258&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-20T21:14:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>music</title>
        <link>https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:music&amp;rev=1732137258&amp;do=diff</link>
        <description>music.h

Functions

init_music


void init_music();


This should only need to be called once, after init_audio_coprocessor() and before doing any music or sound effects.

play_song


void play_song(const unsigned char* song, char bank_num, char loop);</description>
    </item>
    <item rdf:about="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:persist&amp;rev=1732139179&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-20T21:46:19+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>persist</title>
        <link>https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:persist&amp;rev=1732139179&amp;do=diff</link>
        <description>persist.h

Functions for saving data to the cartridge flash at runtime.

Functions

clear_save_sector()


void clear_save_sector();


The flash memory sector to be written must be cleared first to all 0xFF bytes, as the write operation can only change 1 bits to 0 bits.</description>
    </item>
    <item rdf:about="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:random&amp;rev=1732138807&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-20T21:40:07+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>random</title>
        <link>https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:random&amp;rev=1732138807&amp;do=diff</link>
        <description>random.h

LFSR pseudorandom number generator implementation

Functions

rnd


int rnd();


Return a random 16-bit number

rnd_range


int rnd_range(int low, int high);


Return a random 16-bit number from low (inclusive) to high (exclusive)</description>
    </item>
    <item rdf:about="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:sprites&amp;rev=1732138626&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-20T21:37:06+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sprites</title>
        <link>https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:sprites&amp;rev=1732138626&amp;do=diff</link>
        <description>sprites.h

Functions

allocate_sprite


SpriteSlot allocate_sprite(SpritePage* sprite);


Allocate space for an image in Sprite RAM and return a single-byte handle for that image.

Every BMP asset gets a _load_list struct generated. Images greater than 128 pixels in length or width will be broken into multiple parts, as each</description>
    </item>
    <item rdf:about="https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:text&amp;rev=1732138968&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-20T21:42:48+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>text</title>
        <link>https://wiki.gametank.zone/doku.php?id=development:csdk:2.0:headers:text&amp;rev=1732138968&amp;do=diff</link>
        <description>text.h

Text rendering feature

Functions

text_init


void text_init();


description

text_load_font


SpriteSlot text_load_font();


description

text_print_string


void text_print_string(char* text);


description

text_sprint_num


void text_sprint_num(char* s, unsigned char num);</description>
    </item>
</rdf:RDF>
