From 50fc64ac59dfb1df3adacda7b9d6321d2fe8e9c0 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Thu, 9 May 2013 22:32:04 +0200 Subject: [PATCH] Limit the memory capacity to 256K. The Mares Matrix, Puck Pro and Nemo Wide 2 have only 256K of memory, which is 4 times less compared to the Icon HD. However for some unknown reason, trying to download 1024K succeeds, and these devices just repeat the same data 4 times. That's why we never noticed the difference in memory capacity before. --- src/mares_iconhd.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/mares_iconhd.c b/src/mares_iconhd.c index f4997c5..af628ed 100644 --- a/src/mares_iconhd.c +++ b/src/mares_iconhd.c @@ -89,6 +89,12 @@ static const mares_iconhd_layout_t mares_iconhd_layout = { 0x100000, /* rb_profile_end */ }; +static const mares_iconhd_layout_t mares_matrix_layout = { + 0x40000, /* memsize */ + 0x0A000, /* rb_profile_begin */ + 0x40000, /* rb_profile_end */ +}; + static unsigned int mares_iconhd_get_model (mares_iconhd_device_t *device, unsigned int model) { @@ -253,12 +259,13 @@ mares_iconhd_device_open (dc_device_t **out, dc_context_t *context, const char * // Set the default values. device->port = NULL; - device->layout = &mares_iconhd_layout; memset (device->fingerprint, 0, sizeof (device->fingerprint)); memset (device->version, 0, sizeof (device->version)); if (model == NEMOWIDE2 || model == MATRIX || model == PUCKPRO) { + device->layout = &mares_matrix_layout; device->packetsize = 64; } else { + device->layout = &mares_iconhd_layout; device->packetsize = 0; }