Coder Social home page Coder Social logo

gbsounddemo's People

Contributors

bbbbbr avatar gegel85 avatar qguv avatar zal0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gbsounddemo's Issues

Replace UINT16 by UINT8 for variables that have small values

There are lots of variables in this struct (most of them) that could be made 8-bit variables:

GBSoundDemo/sound.c

Lines 175 to 293 in 38082e2

struct SoundReg {
struct {
//NR10 0xFF10
UINT16 sweepShifts ;//: 3;
UINT16 sweepMode ;//: 1;
UINT16 sweepTime ;//: 3;
UINT16 unused_1 ;//: 1;
//NR11 0xFF11
UINT16 soundLength ;//: 6;
UINT16 patternDuty ;//: 2;
//NR12 0xFF12
UINT16 envNbSweep ;//: 3;
UINT16 envMode ;//: 1;
UINT16 envInitialValue ;//: 4;
//NR13 0xFF13
UINT16 frequencyLow;
//NR14 0xFF14
UINT16 frequencyHigh ;//: 3;
UINT16 unused_2 ;//: 3;
UINT16 counter_ConsSel ;//: 1;
UINT16 restart ;//: 1;
} mode1;
struct {
//NR20 0xFF15
UINT16 unused_1;
//NR21 0xFF16
UINT16 soundLength ;//: 6;
UINT16 patternDuty ;//: 2;
//NR22 0xFF17
UINT16 envNbStep ;//: 3;
UINT16 envMode ;//: 1;
UINT16 envInitialValue ;//: 4;
//NR23 0xFF18
UINT16 frequencyLow;
//NR24 0xFF19
UINT16 frequencyHigh ;//: 3;
UINT16 unused_2 ;//: 3;
UINT16 counter_ConsSel ;//: 1;
UINT16 restart ;//: 1;
} mode2;
struct {
//NR30 0xFF1A
UINT16 unused_1 ;//: 7;
UINT16 on_Off ;//: 1;
//NR31 0xFF1B
UINT16 soundLength;
//NR32 0xFF1C
UINT16 unused_2 ;//: 5;
UINT16 selOutputLevel ;//: 2;
UINT16 unused_3 ;//: 1;
//NR33 0xFF1D
UINT16 frequencyLow;
//NR34 0xFF1E
UINT16 frequencyHigh ;//: 3;
UINT16 unused_4 ;//: 3;
UINT16 counter_ConsSel ;//: 1;
UINT16 restart ;//: 1;
} mode3;
struct {
//NR40 0xFF1F
UINT16 unused_1;
//NR41 0xFF20
UINT16 soundLength ;//: 6;
UINT16 unused_2 ;//: 2;
//NR42 0xFF21
UINT16 envNbStep ;//: 3;
UINT16 envMode ;//: 1;
UINT16 envInitialValue ;//: 4;
//NR43 0xFF22
UINT16 polyCounterDiv ;//: 3;
UINT16 polyCounterStep ;//: 1;
UINT16 polyCounterFreq ;//: 4;
//NR44 0xFF23
UINT16 unused_3 ;//: 6;
UINT16 counter_ConsSel ;//: 1;
UINT16 restart ;//: 1;
} mode4;
struct {
// NR50 0xFF24
UINT16 SO1_OutputLevel ;//: 3;
UINT16 Vin_SO1 ;//: 1;
UINT16 SO2_OutputLevel ;//: 3;
UINT16 Vin_SO2 ;//: 1;
// NR51 0xFF25
UINT16 Sound1_To_SO1 ;//: 1;
UINT16 Sound2_To_SO1 ;//: 1;
UINT16 Sound3_To_SO1 ;//: 1;
UINT16 Sound4_To_SO1 ;//: 1;
UINT16 Sound1_To_SO2 ;//: 1;
UINT16 Sound2_To_SO2 ;//: 1;
UINT16 Sound3_To_SO2 ;//: 1;
UINT16 Sound4_To_SO2 ;//: 1;
// NR52 0xFF26
UINT16 Sound1_On_Off ;//: 1;
UINT16 Sound2_On_Off ;//: 1;
UINT16 Sound3_On_Off ;//: 1;
UINT16 Sound4_On_Off ;//: 1;
UINT16 unused_1 ;//: 3;
UINT16 global_On_Off ;//: 1;
} control;
};

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.