Jubeat (ユビート Yubīto?), stylized as jubeat, is a series of arcade music video games developed by Konami Computer Entertainment Japan, and is a part of Konami's Bemani line of music video games. The series uses an arrangement of 16 buttons in a 4x4 grid for gameplay, a grid also used for the displaying of cues and part of the user interface.
Dependencies: 4DGL-uLCD-SE SDFileSystem TextLCD mbed-rtos mbed wave_player
Fork of ECE4180_Lab4 by
VS1002.h@0:c3c8793d0091, 2016-03-16 (annotated)
- Committer:
- ToHellWithGeorgi
- Date:
- Wed Mar 16 13:38:50 2016 +0000
- Revision:
- 0:c3c8793d0091
ECE 4180 jubeat;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ToHellWithGeorgi | 0:c3c8793d0091 | 1 | #ifndef VS1002_H |
ToHellWithGeorgi | 0:c3c8793d0091 | 2 | #define VS1002_H |
ToHellWithGeorgi | 0:c3c8793d0091 | 3 | |
ToHellWithGeorgi | 0:c3c8793d0091 | 4 | #include "mbed.h" |
ToHellWithGeorgi | 0:c3c8793d0091 | 5 | #include "SDFileSystem.h" |
ToHellWithGeorgi | 0:c3c8793d0091 | 6 | #include "string" |
ToHellWithGeorgi | 0:c3c8793d0091 | 7 | #include "string.h" |
ToHellWithGeorgi | 0:c3c8793d0091 | 8 | #include "TextLCD.h" |
ToHellWithGeorgi | 0:c3c8793d0091 | 9 | |
ToHellWithGeorgi | 0:c3c8793d0091 | 10 | |
ToHellWithGeorgi | 0:c3c8793d0091 | 11 | //SCI_MODE register bits as of p.26 of the datasheet |
ToHellWithGeorgi | 0:c3c8793d0091 | 12 | #define SM_DIFF 0x0001 |
ToHellWithGeorgi | 0:c3c8793d0091 | 13 | #define SM_SETTOZERO 0x0002 |
ToHellWithGeorgi | 0:c3c8793d0091 | 14 | #define SM_RESET 0x0004 |
ToHellWithGeorgi | 0:c3c8793d0091 | 15 | #define SM_OUTOFWAV 0x0008 |
ToHellWithGeorgi | 0:c3c8793d0091 | 16 | #define SM_PDOWN 0x0010 |
ToHellWithGeorgi | 0:c3c8793d0091 | 17 | #define SM_TESTS 0x0020 |
ToHellWithGeorgi | 0:c3c8793d0091 | 18 | #define SM_STREAM 0x0040 |
ToHellWithGeorgi | 0:c3c8793d0091 | 19 | #define SM_PLUSV 0x0080 |
ToHellWithGeorgi | 0:c3c8793d0091 | 20 | #define SM_DACT 0x0100 |
ToHellWithGeorgi | 0:c3c8793d0091 | 21 | #define SM_SDIORD 0x0200 |
ToHellWithGeorgi | 0:c3c8793d0091 | 22 | #define SM_SDISHARE 0x0400 |
ToHellWithGeorgi | 0:c3c8793d0091 | 23 | #define SM_SDINEW 0x0800 |
ToHellWithGeorgi | 0:c3c8793d0091 | 24 | #define SM_ADPCM 0x1000 |
ToHellWithGeorgi | 0:c3c8793d0091 | 25 | #define SM_ADPCM_HP 0x2000 |
ToHellWithGeorgi | 0:c3c8793d0091 | 26 | |
ToHellWithGeorgi | 0:c3c8793d0091 | 27 | extern int new_song_number; |
ToHellWithGeorgi | 0:c3c8793d0091 | 28 | extern int volume_set; |
ToHellWithGeorgi | 0:c3c8793d0091 | 29 | extern bool pause; |
ToHellWithGeorgi | 0:c3c8793d0091 | 30 | extern bool mute; |
ToHellWithGeorgi | 0:c3c8793d0091 | 31 | extern char * song_name[6]; |
ToHellWithGeorgi | 0:c3c8793d0091 | 32 | |
ToHellWithGeorgi | 0:c3c8793d0091 | 33 | |
ToHellWithGeorgi | 0:c3c8793d0091 | 34 | class VS1002 { |
ToHellWithGeorgi | 0:c3c8793d0091 | 35 | |
ToHellWithGeorgi | 0:c3c8793d0091 | 36 | public: |
ToHellWithGeorgi | 0:c3c8793d0091 | 37 | |
ToHellWithGeorgi | 0:c3c8793d0091 | 38 | VS1002(PinName mmosi, PinName mmiso, PinName ssck, PinName ccs, const char *name, PinName mosi, PinName miso, PinName sck, PinName cs, PinName rst, PinName dreq, PinName dcs, PinName vol); |
ToHellWithGeorgi | 0:c3c8793d0091 | 39 | |
ToHellWithGeorgi | 0:c3c8793d0091 | 40 | void cs_low(void); |
ToHellWithGeorgi | 0:c3c8793d0091 | 41 | void cs_high(void); |
ToHellWithGeorgi | 0:c3c8793d0091 | 42 | void dcs_low(void); |
ToHellWithGeorgi | 0:c3c8793d0091 | 43 | void dcs_high(void); |
ToHellWithGeorgi | 0:c3c8793d0091 | 44 | void sci_en(void); |
ToHellWithGeorgi | 0:c3c8793d0091 | 45 | void sci_dis(void); |
ToHellWithGeorgi | 0:c3c8793d0091 | 46 | void sdi_en(void); |
ToHellWithGeorgi | 0:c3c8793d0091 | 47 | void sdi_dis(void); |
ToHellWithGeorgi | 0:c3c8793d0091 | 48 | |
ToHellWithGeorgi | 0:c3c8793d0091 | 49 | void sci_initialise(void); |
ToHellWithGeorgi | 0:c3c8793d0091 | 50 | void sdi_initialise(void); |
ToHellWithGeorgi | 0:c3c8793d0091 | 51 | void reset(void); |
ToHellWithGeorgi | 0:c3c8793d0091 | 52 | void power_down(void); |
ToHellWithGeorgi | 0:c3c8793d0091 | 53 | |
ToHellWithGeorgi | 0:c3c8793d0091 | 54 | void sci_write(unsigned char, unsigned short int); |
ToHellWithGeorgi | 0:c3c8793d0091 | 55 | void sdi_write(unsigned char); |
ToHellWithGeorgi | 0:c3c8793d0091 | 56 | unsigned short int read(unsigned short int); |
ToHellWithGeorgi | 0:c3c8793d0091 | 57 | void sine_test_activate(unsigned char); |
ToHellWithGeorgi | 0:c3c8793d0091 | 58 | void volume(signed int,signed int); |
ToHellWithGeorgi | 0:c3c8793d0091 | 59 | void sine_test_deactivate(void); |
ToHellWithGeorgi | 0:c3c8793d0091 | 60 | void play_song(int); |
ToHellWithGeorgi | 0:c3c8793d0091 | 61 | |
ToHellWithGeorgi | 0:c3c8793d0091 | 62 | int num_of_files; |
ToHellWithGeorgi | 0:c3c8793d0091 | 63 | |
ToHellWithGeorgi | 0:c3c8793d0091 | 64 | DigitalIn _DREQ; |
ToHellWithGeorgi | 0:c3c8793d0091 | 65 | DigitalOut _RST; |
ToHellWithGeorgi | 0:c3c8793d0091 | 66 | AnalogIn _VOL; |
ToHellWithGeorgi | 0:c3c8793d0091 | 67 | |
ToHellWithGeorgi | 0:c3c8793d0091 | 68 | protected: |
ToHellWithGeorgi | 0:c3c8793d0091 | 69 | |
ToHellWithGeorgi | 0:c3c8793d0091 | 70 | SPI _spi; |
ToHellWithGeorgi | 0:c3c8793d0091 | 71 | DigitalOut _CS; |
ToHellWithGeorgi | 0:c3c8793d0091 | 72 | DigitalOut _DCS; |
ToHellWithGeorgi | 0:c3c8793d0091 | 73 | SDFileSystem _sd; |
ToHellWithGeorgi | 0:c3c8793d0091 | 74 | |
ToHellWithGeorgi | 0:c3c8793d0091 | 75 | }; |
ToHellWithGeorgi | 0:c3c8793d0091 | 76 | #endif |