cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

bank2code.c (509B)


      1#pragma bank 2
      2
      3#include <gbdk/platform.h>
      4#include <stdint.h>
      5#include <stdio.h>
      6
      7static int local_bank2_proc(int param1, int param2) {
      8    printf("  sum: %d (bank=%d)\n", param1 + param2, (int)CURRENT_BANK);
      9    return (param1 + param2) << 1;
     10}
     11
     12BANKREF(some_bank2_proc0)
     13void some_bank2_proc0() __banked {
     14    printf("some_bank2_proc0\n");
     15}
     16
     17BANKREF(some_bank2_proc1)
     18int some_bank2_proc1(int param1, int param2) __banked {
     19    printf("some_bank2_proc1\n");
     20    return local_bank2_proc(param1, param2);
     21}