git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

gbdk-lib/examples/cross-platform/banks_autobank/src/srcfile_3.c

      1 #include <gbdk/platform.h>
      2 #include <stdint.h>
      3 #include <stdio.h>
      4 
      5 // These two entries are needed to enable auto-banking in the source file
      6 #pragma bank 255
      7 
      8 BANKREF(some_const_var_3)
      9 const uint8_t some_const_var_3 = 3;
     10 
     11 
     12 BANKREF(func_3)
     13 void func_3(void) BANKED
     14 {
     15     printf("Func3 in ROM bank %u\n", CURRENT_BANK);
     16 }
     17 
     18 // A big constant array to take up space
     19 static const unsigned char local_const_3[] = {
     20 
     21     // 256
     22     1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
     23     1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
     24     1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
     25     1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
     26 };

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.