Skip to content

Minor compiler warning and inconsistency in example 06-sound-adpcma #13

Description

@ratherlargerobot

Hello,

I noticed a small compiler warning in the 06-sound-adpcma example. Here it is:

ngdevkit/local/bin/m68k-neogeo-elf-gcc `pkg-config --cflags ngdevkit` -std=gnu99 -fomit-frame-pointer -g -c main.c -o main.o
main.c:37: warning: "REG_SOUND" redefined
   37 | #define REG_SOUND ((u8*)0x320000)
      |
In file included from ngdevkit/local/m68k-neogeo-elf/include/ngdevkit/neogeo.h:28,
                 from main.c:22:
ngdevkit/local/m68k-neogeo-elf/include/ngdevkit/registers.h:65: note: this is the location of the previous definition
   65 | #define REG_SOUND       ((volatile u8*)0x320000)
      |

It seems likely that this was defined locally to illustrate the core concept of writing to this memory address. However, perhaps the local redefinition should also be volatile? I'm just getting started with Neo Geo development, so this is just an educated guess.

By the way, thank you for putting this development kit together. It's very well designed, and easy for me to follow along and make sense of. The examples that compile everything from the original assets with Makefiles are an enormous help. You have truly provided everything people need to make a complete, functional Neo Geo game in one place. Bravo!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions