Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@ drum mania (1 old reader)

guitar freaks (2 old readers)

Sound voltex (1 new wavepass reader + 1 IoBoard )
Sound voltex (1 new wavepass reader + 1 IoBoard)

Beatstream (1 IoBoard + 1 new wavepass reader)

Nostalgia (1 IoBoard + 1 new wavepass reader)

How to use
----------

Flash the firmware on an arduino mega 2560, scratch the "reset-en" bridge on the pcb, change COM port to COM1
Flash the firmware on an arduino mega 2560, scratch the "reset-en" bridge on the pcb, change COM port to COM1 (COM2 for Beatstream/Nostalgia)

PN5180 support
--------------
Expand Down
2 changes: 1 addition & 1 deletion acrealio/IoBoard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
byte lightPin[] = {LT_START, LT_A, LT_B, LT_C, LT_D, LT_FXL, LT_FXR};

//contructor
IoBoard::IoBoard(char* rCode)
IoBoard::IoBoard(const char* rCode)
{
byte rType[] = {0x09, 0x06, 0x00, 0x00};
byte rVersion[] = {0x01, 0x01, 0x00};
Expand Down
2 changes: 1 addition & 1 deletion acrealio/IoBoard.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class IoBoard: public Node
{
public:
IoBoard(char* rCode); //contructor
IoBoard(const char* rCode); //contructor
void init();
short processRequest(byte* request, byte* sendBuff);
void update();
Expand Down
14 changes: 14 additions & 0 deletions acrealio/Reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,20 @@ short Reader::processRequest(byte* request, byte* answer)
answer[5] = 0x00;//no card
answer[6] = 0x00;
break;
case 3:
//hack: behaves like 0 (for Nostalgia) and 1 (for Beatstream) alternatively
static byte l_cmd61 = 0;
l_cmd61 = 1 - l_cmd61;
if (l_cmd61)
{
answer[4] = 1;
answer[5] = 0x01;
}
else
{
answer[4] = 0;
}
break;
default:
answer[4] = 0;
}
Expand Down
15 changes: 12 additions & 3 deletions acrealio/acrealio.ino
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Reader nod2;//second reader
Reader nod1;//first reader
LedBoard nod2("LEDB");//led board

#elif GAMETYPE == 4 // reader + ioboard
#elif GAMETYPE == 4 || GAMETYPE == 5 // reader + ioboard

Reader nod1;//first reader
IoBoard nod2("KFCA");//io board
Expand Down Expand Up @@ -88,7 +88,7 @@ PN5180Reader mod1;


//2P rfid module allocation
#if GAMETYPE == 2 || GAMETYPE == 5
#if GAMETYPE == 2 || GAMETYPE == 6
#if RFID_MODULE2 == 1
SL015M mod2;
#elif RFID_MODULE2 == 2
Expand Down Expand Up @@ -165,6 +165,15 @@ void setup()

nbnodes = 2;

#elif GAMETYPE == 5 // Beatstream/Nostalgia: KFCA ioboard + ICCC reader

//1p reader
nod1.setrCode("ICCC",3);
nodes[0] = &nod2; //KFCA first
nodes[1] = &nod1;

nbnodes = 2;

#else // 2readers + DDR ??? board

//1p reader
Expand Down Expand Up @@ -429,7 +438,7 @@ void sendAnswer(byte* answer)
//
long detRate()
{
long baudrates[] = {57600,38400,19200};//baudrates to try
long baudrates[] = {57600,38400,19200,115200};//baudrates to try
int i=0;
boolean allAA;

Expand Down
14 changes: 7 additions & 7 deletions acrealio/pinoutconfig.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef CONFIG_H
#define CONFIG_H

#define GAMETYPE 1 //0:pop'n with card dispenser 1: pop'n, drummania(1 reader) 2:iidx/ddr sd/gf(2readers) 3:jubeat (1reader+Ledboard) 4: sdvx (1reader+ioboard) 5: ddr hd (2readers + ??? board)
#define GAMETYPE 1 //0:pop'n with card dispenser 1: pop'n, drummania(1 reader) 2:iidx/ddr sd/gf(2readers) 3:jubeat (1reader+Ledboard) 4: sdvx (1reader+ioboard) 5: beatstream/nostalgia (ioboard+1reader) 6: ddr hd (2readers + ??? board)

#define RFID_BAUD 115200 //Baud rate for RFID Module

Expand All @@ -18,9 +18,9 @@
#define BT_B A3
#define BT_C A4
#define BT_D A5
#define BT_START 52
#define BT_TEST 50
#define BT_SVC 48
#define BT_START A6
#define BT_TEST A7
#define BT_SVC A8

//input pins for volume encoders (phase A and phase B for each)
#define VOLR_A 36
Expand Down Expand Up @@ -58,9 +58,9 @@
#define LED5_G 45
#define LED5_B 44

#define LED6_R A8
#define LED6_G A9
#define LED6_B A10
#define LED6_R A9
#define LED6_G A10
#define LED6_B A11
//pins for card reader 1 keypad (colls ABC, rows 1234)
/*
### Keypad 3x4 Matrix ###
Expand Down
2 changes: 1 addition & 1 deletion acrealio/src/PN5180/PN5180.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ bool PN5180::writeEEprom(uint8_t addr, uint8_t *buffer, uint8_t len) {
* not go beyond EEPROM address 254. If the condition is not fulfilled, an exception is
* raised.
*/
bool PN5180::readEEprom(uint8_t addr, uint8_t *buffer, int len) {
bool PN5180::readEEprom(uint8_t addr, uint8_t *buffer, uint8_t len) {
if ((addr > 254) || ((addr+len) > 254)) {
PN5180DEBUG(F("ERROR: Reading beyond addr 254!\n"));
return false;
Expand Down
6 changes: 3 additions & 3 deletions acrealio/src/PN5180/PN5180.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ enum PN5180TransceiveStat {
#define TX_RFOFF_IRQ_STAT (1<<8) // RF Field OFF in PCD IRQ
#define TX_RFON_IRQ_STAT (1<<9) // RF Field ON in PCD IRQ
#define RX_SOF_DET_IRQ_STAT (1<<14) // RF SOF Detection IRQ
#define GENERAL_ERROR_IRQ_STAT (1<<17) // General error IRQ
#define LPCD_IRQ_STAT (1<<19) // LPCD Detection IRQ
#define GENERAL_ERROR_IRQ_STAT ((uint32_t)1<<17) // General error IRQ
#define LPCD_IRQ_STAT ((uint32_t)1<<19) // LPCD Detection IRQ

class PN5180 {
private:
Expand Down Expand Up @@ -103,7 +103,7 @@ class PN5180 {
/* cmd 0x06 */
bool writeEEprom(uint8_t addr, uint8_t *buffer, uint8_t len);
/* cmd 0x07 */
bool readEEprom(uint8_t addr, uint8_t *buffer, int len);
bool readEEprom(uint8_t addr, uint8_t *buffer, uint8_t len);

/* cmd 0x09 */
bool sendData(uint8_t *data, int len, uint8_t validBits = 0);
Expand Down