aboutsummaryrefslogtreecommitdiff
path: root/libmpio
diff options
context:
space:
mode:
Diffstat (limited to 'libmpio')
-rw-r--r--libmpio/defs.h6
-rw-r--r--libmpio/src/mpio.c18
2 files changed, 21 insertions, 3 deletions
diff --git a/libmpio/defs.h b/libmpio/defs.h
index 10033b3..819ca88 100644
--- a/libmpio/defs.h
+++ b/libmpio/defs.h
@@ -1,5 +1,5 @@
/*
- * $Id: defs.h,v 1.29 2003/07/24 16:17:30 germeier Exp $
+ * $Id: defs.h,v 1.30 2003/09/22 19:15:37 germeier Exp $
*
* libmpio - a library for accessing Digit@lways MPIO players
* Copyright (C) 2002, 2003 Markus Germeier
@@ -50,7 +50,9 @@ typedef enum { MPIO_MODEL_DME = 0x00,
MPIO_MODEL_FD100 = 0x06,
MPIO_MODEL_FL100 = 0x07,
MPIO_MODEL_FY100 = 0x08,
- MPIO_MODEL_UNKNOWN = 0x09 } mpio_model_t;
+ MPIO_MODEL_VP_01 = 0x09,
+ MPIO_MODEL_VP_02 = 0x0a,
+ MPIO_MODEL_UNKNOWN = 0x0b } mpio_model_t;
/* USB commands */
typedef enum { GET_VERSION = 0x01,
diff --git a/libmpio/src/mpio.c b/libmpio/src/mpio.c
index 99d747a..ce96087 100644
--- a/libmpio/src/mpio.c
+++ b/libmpio/src/mpio.c
@@ -1,5 +1,5 @@
/*
- * $Id: mpio.c,v 1.7 2003/07/24 16:17:30 germeier Exp $
+ * $Id: mpio.c,v 1.8 2003/09/22 19:15:37 germeier Exp $
*
* libmpio - a library for accessing Digit@lways MPIO players
* Copyright (C) 2002, 2003 Markus Germeier
@@ -63,6 +63,8 @@ static BYTE *mpio_model_name[] = {
"MPIO-FD100",
"MPIO-FL100",
"MPIO-FY100",
+ "VirginPulse VP-01",
+ "VirginPulse VP-02",
"unknown"
};
@@ -233,6 +235,7 @@ mpio_init_external(mpio_t *m)
e_offset++;
if ((mpio_id_valid(m->version[e_offset])) &&
+ (m->model != MPIO_MODEL_VP_02) &&
(m->model != MPIO_MODEL_FL100)) /* ignore external memory ATM until
we know how to support it! */
{
@@ -309,6 +312,8 @@ mpio_init(mpio_callback_init_t progress_callback)
if (new_mpio->version[i] == 0x00)
new_mpio->version[i]=' ';
snprintf(new_mpio->firmware.major, 3, "%s", new_mpio->version + 0x0c);
+ if (new_mpio->firmware.major[1] == '.') /* small and dirty hack */
+ new_mpio->firmware.major[1]=0x00;
snprintf(new_mpio->firmware.minor, 3, "%s", new_mpio->version + 0x0e);
snprintf(new_mpio->firmware.year, 5, "%s", new_mpio->version + 0x10);
snprintf(new_mpio->firmware.month, 3, "%s", new_mpio->version + 0x14);
@@ -358,6 +363,17 @@ mpio_init(mpio_callback_init_t progress_callback)
look at a FY100 firmware yet. -mager */
debug("FY100 found: Beware, this model is not tested and we don't know"
" if it does work!\n");
+ } else if (strncmp(new_mpio->version, "VP-01", 5) == 0) {
+ /* This is a FY100 clone! */
+ new_mpio->model = MPIO_MODEL_VP_01;
+ } else if (strncmp(new_mpio->version, "VP-02", 5) == 0) {
+ new_mpio->model = MPIO_MODEL_VP_02;
+ /* We assume that this is a FL100 clone -mager */
+ debug("VP-02 found: Beware, this model is not tested and we don't know"
+ " if it does work!\n");
+ debug("This model is assumed to be a FL100 clone, so:\n");
+ debug("External memory is ignored, because we don't know how"
+ " to support it at the moment (MultiMediaCards instead of SmartMedia)\n");
} else {
new_mpio->model = MPIO_MODEL_UNKNOWN;
}