diff --git a/src/oceanic_atom2.c b/src/oceanic_atom2.c index 88efbc3..f8699ea 100644 --- a/src/oceanic_atom2.c +++ b/src/oceanic_atom2.c @@ -365,7 +365,7 @@ static const oceanic_common_layout_t oceanic_proplusx_layout = { }; static const oceanic_common_layout_t aqualung_i770r_layout = { - 0x440000, /* memsize */ + 0x640000, /* memsize */ 0x40000, /* highmem */ 0x0000, /* cf_devinfo */ 0x0040, /* cf_pointers */ @@ -373,7 +373,7 @@ static const oceanic_common_layout_t aqualung_i770r_layout = { 0x10000, /* rb_logbook_end */ 16, /* rb_logbook_entry_size */ 0x40000, /* rb_profile_begin */ - 0x440000, /* rb_profile_end */ + 0x640000, /* rb_profile_end */ 0, /* pt_mode_global */ 1, /* pt_mode_logbook */ 0, /* pt_mode_serial */ diff --git a/src/oceanic_common.c b/src/oceanic_common.c index c33655b..f876d28 100644 --- a/src/oceanic_common.c +++ b/src/oceanic_common.c @@ -56,8 +56,9 @@ get_profile_first (const unsigned char data[], const oceanic_common_layout_t *la } unsigned int npages = (layout->memsize - layout->highmem) / pagesize; - - if (npages > 0x2000) { + if (npages > 0x4000) { + value &= 0x7FFF; + } else if (npages > 0x2000) { value &= 0x3FFF; } else if (npages > 0x1000) { value &= 0x1FFF; @@ -86,7 +87,9 @@ get_profile_last (const unsigned char data[], const oceanic_common_layout_t *lay unsigned int npages = (layout->memsize - layout->highmem) / pagesize; - if (npages > 0x2000) { + if (npages > 0x4000) { + value &= 0x7FFF; + } else if (npages > 0x2000) { value &= 0x3FFF; } else if (npages > 0x1000) { value &= 0x1FFF;