Documentation of ereader_helpers, 1

This commit is contained in:
PikalaxALT 2019-04-04 11:55:18 -04:00 committed by huderlem
parent b3a4509b9a
commit c46f271f67
9 changed files with 128 additions and 126 deletions

View File

@ -5,44 +5,49 @@
gUnknown_08625B6C:: @ 8625B6C
@ apparently e-reader trainer data? idk
.byte 0x6f, 0x57, 0x54, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x00, 0x2e, 0x14, 0x0c, 0x0e, 0x23, 0x10, 0x47, 0x0a, 0x1f, 0x06, 0x24, 0x0e, 0x48, 0x0a, 0x0f, 0x06
.byte 0x22, 0x27, 0x2c, 0x16, 0x07, 0x06, 0x01, 0x0c, 0x47, 0x0a, 0x06, 0x06, 0x24, 0x0e, 0x00, 0x1e, 0x19, 0x12, 0x05, 0x0c, 0x25, 0x16, 0x25, 0x10, 0x0d, 0x1c, 0x2a, 0x1c, 0x06, 0x0a, 0x06, 0x0c
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
.byte 0xff, 0xff, 0xff, 0x00, 0x70, 0x01, 0xdb, 0x00, 0xbc, 0x00, 0xf7, 0x00, 0xdc, 0x00, 0x19, 0x01, 0x00, 0x00, 0x37, 0xff, 0x64, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x8a
.byte 0x80, 0x00, 0x00, 0x00, 0x6f, 0x79, 0x69, 0xae, 0x71, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x26, 0x01, 0xb3, 0x00, 0x3e, 0x01, 0xbc, 0x00, 0xf7, 0x00, 0xca, 0x00, 0x00, 0x00, 0x00, 0xff
.byte 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x0a, 0x06, 0x00, 0x00, 0x00, 0x95, 0x58, 0x59, 0x52, 0x79, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7d, 0x01, 0xb7, 0x00
.byte 0xf6, 0x00, 0x39, 0x00, 0x59, 0x00, 0x85, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x9b, 0xff, 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x0a, 0x2f, 0x00, 0x00, 0x00, 0x8d, 0xae, 0x77, 0x7e
.byte 0x5d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x6a, 0x79, 0x6b, 0x64, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x1b, 0x01, 0x00, 0x00, 0x00, 0x54, 0x27, 0x2b, 0x0e, 0xff, 0xff, 0x3b, 0x0a
.byte 0x20, 0x06, 0x00, 0x0c, 0x13, 0x24, 0x2b, 0x0e, 0xff, 0xff, 0x3b, 0x0a, 0x05, 0x12, 0x00, 0x0c, 0x6b, 0x26, 0x2b, 0x0e, 0xff, 0xff, 0x3b, 0x0a, 0x0e, 0x12, 0x00, 0x0c, 0x2c, 0x24, 0x2b, 0x0e
.byte 0xff, 0xff, 0x3b, 0x0a, 0x17, 0x12, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x59, 0x01, 0xb7, 0x00, 0xca, 0x00, 0xb9, 0x00, 0x09, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x37, 0x00, 0x64, 0x00, 0xff, 0x64
.byte 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x0a, 0x8c, 0x00, 0x00, 0x00, 0x69, 0x58, 0x60, 0x5d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x31, 0x01, 0xb3, 0x00, 0x07, 0x01, 0x4c, 0x01
.byte 0x62, 0x00, 0x68, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x0a, 0x80, 0x00, 0x00, 0x00, 0x55, 0x55, 0x5d, 0x96, 0x72, 0xff, 0xff, 0xff
.byte 0xff, 0xff, 0xff, 0xff, 0x44, 0x01, 0x86, 0x00, 0x39, 0x00, 0x59, 0x00, 0x85, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x0a
.byte 0x00, 0x00, 0x00, 0x00, 0x65, 0x6f, 0x8e, 0x7e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x72, 0x52, 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x27, 0x01, 0x00, 0x00, 0x00
.byte 0x4a, 0x04, 0x0e, 0x02, 0x35, 0x16, 0x10, 0x10, 0xda, 0x26, 0x3e, 0x10, 0x4a, 0x04, 0x0e, 0x02, 0x47, 0x0a, 0xd9, 0x26, 0x21, 0x16, 0x3e, 0x10, 0x14, 0x1e, 0x07, 0x1e, 0x30, 0x06, 0x23, 0x16
.byte 0x24, 0x0e, 0x06, 0x0c, 0x18, 0x14, 0x2f, 0x14, 0x1a, 0x08, 0x27, 0x1c, 0x00, 0x0c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff
.byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x3c, 0x01, 0x8d, 0x00, 0x2f, 0x00, 0x22, 0x00, 0xf7, 0x00, 0xe7, 0x00
.byte 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x0a, 0x03, 0x00, 0x00, 0x00, 0x54, 0x68, 0x5a, 0x7b, 0x7b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
.byte 0x6b, 0x01, 0xc8, 0x00, 0xca, 0x00, 0x40, 0x01, 0x5c, 0x00, 0x49, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x8a, 0x06, 0x00, 0x00, 0x00
.byte 0x7b, 0x8f, 0x78, 0x51, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x24, 0x01, 0xb3, 0x00, 0x3e, 0x01, 0x4c, 0x01, 0xd5, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x64, 0xc8, 0x00, 0x00, 0xc8, 0x00
.byte 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x0a, 0x06, 0x00, 0x00, 0x00, 0x51, 0x8a, 0x6a, 0x7e, 0x64, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x9c, 0x54, 0xae, 0x79, 0xff, 0xff, 0xff, 0xff
.byte 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0a, 0x02, 0x06, 0x20, 0x06, 0x0a, 0x0a, 0x23, 0x10, 0x00, 0x0c, 0x28, 0x0c, 0x14, 0x18, 0x32, 0x14, 0x02, 0x16, 0x05, 0x10, 0xff, 0xff
.byte 0x0c, 0x1e, 0x0a, 0x0a, 0x34, 0x12, 0x11, 0x1e, 0x1a, 0x08, 0x05, 0x0c, 0x1e, 0x0a, 0x02, 0x06, 0x20, 0x06, 0x22, 0x0a, 0x15, 0x10, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
.byte 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x63, 0x01, 0xb3, 0x00
.byte 0xf2, 0x00, 0x35, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0xff, 0x9b, 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x58, 0x61, 0xae, 0x64
.byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x4b, 0x01, 0xc6, 0x00, 0x39, 0x00, 0xf2, 0x00, 0x26, 0x00, 0x59, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x10
.byte 0xa5, 0x94, 0x52, 0x0a, 0x96, 0x00, 0x00, 0x00, 0x5b, 0x72, 0x6a, 0x91, 0xae, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7a, 0x01, 0x8d, 0x00, 0x5e, 0x00, 0xf7, 0x00, 0x55, 0x00, 0x05, 0x01
.byte 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x0a, 0x96, 0x00, 0x00, 0x00, 0x8d, 0x85, 0x9e, 0xa0, 0x60, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
.byte 0x6f, 0x57, 0x54, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x00, 0x2e, 0x14, 0x0c, 0x0e, 0x23, 0x10, 0x47, 0x0a, 0x1f, 0x06, 0x24, 0x0e, 0x48, 0x0a, 0x0f, 0x06
.byte 0x22, 0x27, 0x2c, 0x16, 0x07, 0x06, 0x01, 0x0c, 0x47, 0x0a, 0x06, 0x06, 0x24, 0x0e, 0x00, 0x1e, 0x19, 0x12, 0x05, 0x0c, 0x25, 0x16, 0x25, 0x10, 0x0d, 0x1c, 0x2a, 0x1c, 0x06, 0x0a, 0x06, 0x0c
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
.byte 0xff, 0xff, 0xff, 0x00, 0x70, 0x01, 0xdb, 0x00, 0xbc, 0x00, 0xf7, 0x00, 0xdc, 0x00, 0x19, 0x01, 0x00, 0x00, 0x37, 0xff, 0x64, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x8a
.byte 0x80, 0x00, 0x00, 0x00, 0x6f, 0x79, 0x69, 0xae, 0x71, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x26, 0x01, 0xb3, 0x00, 0x3e, 0x01, 0xbc, 0x00, 0xf7, 0x00, 0xca, 0x00, 0x00, 0x00, 0x00, 0xff
.byte 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x0a, 0x06, 0x00, 0x00, 0x00, 0x95, 0x58, 0x59, 0x52, 0x79, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7d, 0x01, 0xb7, 0x00
.byte 0xf6, 0x00, 0x39, 0x00, 0x59, 0x00, 0x85, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x9b, 0xff, 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x0a, 0x2f, 0x00, 0x00, 0x00, 0x8d, 0xae, 0x77, 0x7e
.byte 0x5d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
.byte 0x6a, 0x79, 0x6b, 0x64, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x1b, 0x01, 0x00, 0x00, 0x00, 0x54, 0x27, 0x2b, 0x0e, 0xff, 0xff, 0x3b, 0x0a, 0x20, 0x06, 0x00, 0x0c, 0x13, 0x24, 0x2b, 0x0e
.byte 0xff, 0xff, 0x3b, 0x0a, 0x05, 0x12, 0x00, 0x0c, 0x6b, 0x26, 0x2b, 0x0e, 0xff, 0xff, 0x3b, 0x0a, 0x0e, 0x12, 0x00, 0x0c, 0x2c, 0x24, 0x2b, 0x0e, 0xff, 0xff, 0x3b, 0x0a, 0x17, 0x12, 0x00, 0x0c
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
.byte 0xff, 0xff, 0xff, 0x00, 0x59, 0x01, 0xb7, 0x00, 0xca, 0x00, 0xb9, 0x00, 0x09, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x37, 0x00, 0x64, 0x00, 0xff, 0x64, 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x0a
.byte 0x8c, 0x00, 0x00, 0x00, 0x69, 0x58, 0x60, 0x5d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x31, 0x01, 0xb3, 0x00, 0x07, 0x01, 0x4c, 0x01, 0x62, 0x00, 0x68, 0x00, 0x00, 0x00, 0xff, 0xff
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x0a, 0x80, 0x00, 0x00, 0x00, 0x55, 0x55, 0x5d, 0x96, 0x72, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x44, 0x01, 0x86, 0x00
.byte 0x39, 0x00, 0x59, 0x00, 0x85, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x65, 0x6f, 0x8e, 0x7e
.byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
.byte 0x72, 0x52, 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x27, 0x01, 0x00, 0x00, 0x00, 0x4a, 0x04, 0x0e, 0x02, 0x35, 0x16, 0x10, 0x10, 0xda, 0x26, 0x3e, 0x10, 0x4a, 0x04, 0x0e, 0x02
.byte 0x47, 0x0a, 0xd9, 0x26, 0x21, 0x16, 0x3e, 0x10, 0x14, 0x1e, 0x07, 0x1e, 0x30, 0x06, 0x23, 0x16, 0x24, 0x0e, 0x06, 0x0c, 0x18, 0x14, 0x2f, 0x14, 0x1a, 0x08, 0x27, 0x1c, 0x00, 0x0c, 0xff, 0xff
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
.byte 0xff, 0xff, 0xff, 0x00, 0x3c, 0x01, 0x8d, 0x00, 0x2f, 0x00, 0x22, 0x00, 0xf7, 0x00, 0xe7, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x0a
.byte 0x03, 0x00, 0x00, 0x00, 0x54, 0x68, 0x5a, 0x7b, 0x7b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x6b, 0x01, 0xc8, 0x00, 0xca, 0x00, 0x40, 0x01, 0x5c, 0x00, 0x49, 0x00, 0x00, 0x00, 0xff, 0x00
.byte 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x8a, 0x06, 0x00, 0x00, 0x00, 0x7b, 0x8f, 0x78, 0x51, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x24, 0x01, 0xb3, 0x00
.byte 0x3e, 0x01, 0x4c, 0x01, 0xd5, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x64, 0xc8, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x0a, 0x06, 0x00, 0x00, 0x00, 0x51, 0x8a, 0x6a, 0x7e
.byte 0x64, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
.byte 0x9c, 0x54, 0xae, 0x79, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0a, 0x02, 0x06, 0x20, 0x06, 0x0a, 0x0a, 0x23, 0x10, 0x00, 0x0c, 0x28, 0x0c, 0x14, 0x18
.byte 0x32, 0x14, 0x02, 0x16, 0x05, 0x10, 0xff, 0xff, 0x0c, 0x1e, 0x0a, 0x0a, 0x34, 0x12, 0x11, 0x1e, 0x1a, 0x08, 0x05, 0x0c, 0x1e, 0x0a, 0x02, 0x06, 0x20, 0x06, 0x22, 0x0a, 0x15, 0x10, 0x01, 0x0c
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
.byte 0xff, 0xff, 0xff, 0x00, 0x63, 0x01, 0xb3, 0x00, 0xf2, 0x00, 0x35, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0xff, 0x9b, 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x8a
.byte 0x00, 0x00, 0x00, 0x00, 0x58, 0x61, 0xae, 0x64, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x4b, 0x01, 0xc6, 0x00, 0x39, 0x00, 0xf2, 0x00, 0x26, 0x00, 0x59, 0x00, 0x00, 0x00, 0xff, 0x00
.byte 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x0a, 0x96, 0x00, 0x00, 0x00, 0x5b, 0x72, 0x6a, 0x91, 0xae, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7a, 0x01, 0x8d, 0x00
.byte 0x5e, 0x00, 0xf7, 0x00, 0x55, 0x00, 0x05, 0x01, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa5, 0x94, 0x52, 0x0a, 0x96, 0x00, 0x00, 0x00, 0x8d, 0x85, 0x9e, 0xa0
.byte 0x60, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff

View File

@ -3,13 +3,43 @@
struct Unk81D38FC
{
u8 unk0[0x270];
u8 unk0[12];
u8 unkC[0x148];
u8 unk154[0x11C];
int checksum;
};
bool8 sub_81D3920(u8 *buffer);
bool32 sub_81D3AB0(struct Unk81D38FC *arg0);
bool32 sub_81D3B34(void);
struct EReaderTrainerHillSet
{
u8 unk_0;
u8 unk_1;
u8 unk_2;
u8 unk_3;
int checksum;
struct Unk81D38FC unk_8[6];
u8 unk_ec0[40];
};
struct Unk81D3998Sub
{
u8 unk_000[4];
u8 unk_004[0x148];
u8 unk_14C[0x148];
u8 unk_294[0x124];
};
struct Unk81D3998
{
u8 unk_000;
u8 unk_001;
u8 unk_002;
int checksum;
struct Unk81D3998Sub unk_008[4];
};
bool8 EReader_IsReceivedDataValid(struct EReaderTrainerHillSet *buffer);
bool32 TryWriteTrainerHill(struct Unk81D38FC *arg0);
bool32 ReadTrainerHillAndValidate(void);
int sub_81D3D70(u8, u32, u32*, u32*);
void sub_81D3F9C(void);
void sub_81D3FAC(void);

View File

@ -33,6 +33,7 @@ struct SaveSectionOffsets
#define NUM_SECTORS_PER_SLOT 16
#define UNKNOWN_CHECK_VALUE 0x8012025
#define SPECIAL_SECTION_SENTINEL 0xB39D
// SetDamagedSectorBits states
enum
@ -88,8 +89,8 @@ bool8 CheckSaveFile(void);
u8 Save_LoadGameData(u8 a1);
u16 sub_815355C(void);
u8 sub_81534D0(u8);
u32 TryCopySpecialSaveSection(u8 sector, u8* dst);
u32 sub_8153634(u8 sector, u8* src);
u32 TryReadSpecialSaveSection(u8 sector, u8* dst);
u32 TryWriteSpecialSaveSection(u8 sector, u8* src);
void sub_8153688(u8 taskId);
// save_failed_screen.c

View File

@ -26,17 +26,17 @@ static void sub_81D414C(void);
static void sub_81D3F1C(u32, u32*, u32*);
static void sub_81D3F68(void);
extern struct Unknown030012C8 gUnknown_030012C8;
extern u16 gUnknown_030012E0;
extern u16 gUnknown_030012E2;
extern u16 gUnknown_030012E4;
extern u16 gUnknown_030012E6;
extern u32 gUnknown_030012E8;
extern u16 gUnknown_030012EC;
extern u16 gUnknown_030012EE;
extern u16 gUnknown_030012F0;
extern u16 gUnknown_030012F2;
extern u16 gUnknown_030012F4;
IWRAM_DATA struct Unknown030012C8 gUnknown_030012C8;
IWRAM_DATA u16 gUnknown_030012E0;
IWRAM_DATA u16 gUnknown_030012E2;
IWRAM_DATA u16 gUnknown_030012E4;
IWRAM_DATA u16 gUnknown_030012E6;
IWRAM_DATA u32 gUnknown_030012E8;
IWRAM_DATA u16 gUnknown_030012EC;
IWRAM_DATA u16 gUnknown_030012EE;
IWRAM_DATA u16 gUnknown_030012F0;
IWRAM_DATA u16 gUnknown_030012F2;
IWRAM_DATA u16 gUnknown_030012F4;
extern const u8 gUnknown_08625B6C[];
@ -45,7 +45,7 @@ static u8 sub_81D38D4(void)
return (gSaveBlock1Ptr->trainerHill.unused + 1) % 256;
}
static bool32 sub_81D38FC(struct Unk81D38FC *arg0)
static bool32 Struct_Unk81D38FC_ValidateChecksum(struct Unk81D38FC *arg0)
{
int checksum = CalcByteArraySum(arg0->unk0, 0x270);
if (checksum != arg0->checksum)
@ -54,43 +54,42 @@ static bool32 sub_81D38FC(struct Unk81D38FC *arg0)
return TRUE;
}
bool8 sub_81D3920(u8 *buffer)
bool8 EReader_IsReceivedDataValid(struct EReaderTrainerHillSet *buffer)
{
u32 i;
u32 checksum;
int var0 = buffer[0];
int var0 = buffer->unk_0;
if (var0 < 1 || var0 > 8)
return FALSE;
for (i = 0; i < var0; i++)
{
struct Unk81D38FC *var1 = (struct Unk81D38FC *)(&buffer[i * (sizeof(struct Unk81D38FC)) + 8]);
if (!sub_81D38FC(var1))
if (!Struct_Unk81D38FC_ValidateChecksum(&buffer->unk_8[i]))
return FALSE;
}
checksum = CalcByteArraySum(buffer + 8, var0 * 0x274);
if (checksum != ((int *)buffer)[1])
checksum = CalcByteArraySum((u8 *)buffer->unk_8, var0 * sizeof(struct Unk81D38FC));
if (checksum != buffer->checksum)
return FALSE;
return TRUE;
}
static bool32 sub_81D396C(u8 *buffer)
static bool32 TrainerHill_VerifyChecksum(struct EReaderTrainerHillSet *buffer)
{
u32 checksum;
int var0 = buffer[0];
int var0 = buffer->unk_0;
if (var0 < 1 || var0 > 8)
return FALSE;
checksum = CalcByteArraySum(buffer + 8, 0xEE0);
if (checksum != ((int *)buffer)[1])
checksum = CalcByteArraySum((u8 *)buffer->unk_8, sizeof(struct EReaderTrainerHillSet) - offsetof(struct EReaderTrainerHillSet, unk_8));
if (checksum != buffer->checksum)
return FALSE;
return TRUE;
}
static bool32 sub_81D3998(struct Unk81D38FC *arg0, u8 *buffer2)
static bool32 TryWriteTrainerHill_r(struct Unk81D38FC *arg0, u8 *buffer2)
{
int i;
const u8 *ereaderVals;
@ -131,44 +130,44 @@ static bool32 sub_81D3998(struct Unk81D38FC *arg0, u8 *buffer2)
}
((int *)buffer2)[1] = CalcByteArraySum(buffer2 + 8, 0xEE0);
if (sub_8153634(SECTOR_ID_TRAINER_HILL, buffer2) != 1)
if (TryWriteSpecialSaveSection(SECTOR_ID_TRAINER_HILL, (u8 *)buffer2) != 1)
return FALSE;
return TRUE;
}
bool32 sub_81D3AB0(struct Unk81D38FC *arg0)
bool32 TryWriteTrainerHill(struct Unk81D38FC *arg0)
{
u8 *var0 = AllocZeroed(0x1000);
bool32 result = sub_81D3998(arg0, var0);
bool32 result = TryWriteTrainerHill_r(arg0, var0);
Free(var0);
return result;
}
static bool32 sub_81D3AD8(u8 *arg0, u8 *arg1)
static bool32 TryReadTrainerHill_r(struct EReaderTrainerHillSet *arg0, u8 *arg1)
{
if (TryCopySpecialSaveSection(SECTOR_ID_TRAINER_HILL, arg1) != 1)
if (TryReadSpecialSaveSection(SECTOR_ID_TRAINER_HILL, arg1) != 1)
return FALSE;
memcpy(arg0, arg1, 0xEE8);
if (!sub_81D396C(arg0))
memcpy(arg0, arg1, sizeof(struct EReaderTrainerHillSet));
if (!TrainerHill_VerifyChecksum(arg0))
return FALSE;
return TRUE;
}
static bool32 sub_81D3B0C(u8 *arg0)
static bool32 TryReadTrainerHill(struct EReaderTrainerHillSet *arg0)
{
u8 *var0 = AllocZeroed(0x1000);
bool32 result = sub_81D3AD8(arg0, var0);
bool32 result = TryReadTrainerHill_r(arg0, var0);
Free(var0);
return result;
}
bool32 sub_81D3B34(void)
bool32 ReadTrainerHillAndValidate(void)
{
u8 *var0 = AllocZeroed(0x1000);
bool32 result = sub_81D3B0C(var0);
struct EReaderTrainerHillSet *var0 = AllocZeroed(0x1000);
bool32 result = TryReadTrainerHill(var0);
Free(var0);
return result;
}

View File

@ -402,7 +402,7 @@ static void sub_81D5084(u8 taskId)
}
break;
case 15:
data->unkE = sub_81D3920(gDecompressionBuffer);
data->unkE = EReader_IsReceivedDataValid((struct EReaderTrainerHillSet *)gDecompressionBuffer);
sub_800ABF4(data->unkE);
data->unk8 = 16;
break;
@ -416,7 +416,7 @@ static void sub_81D5084(u8 taskId)
}
break;
case 17:
if (sub_81D3AB0((struct Unk81D38FC *)&gDecompressionBuffer))
if (TryWriteTrainerHill((struct Unk81D38FC *)&gDecompressionBuffer))
{
AddTextPrinterToWindow1(gUnknown_085EE0FA);
sub_81D505C(&data->unk0);

View File

@ -322,7 +322,7 @@ static bool32 RecordedBattleToSave(struct RecordedBattleSave *battleSave, struct
saveSection->checksum = CalcByteArraySum((void*)(saveSection), sizeof(*saveSection) - 4);
if (sub_8153634(31, (void*)(saveSection)) != 1)
if (TryWriteSpecialSaveSection(SECTOR_ID_RECORDED_BATTLE, (void*)(saveSection)) != 1)
return FALSE;
else
return TRUE;
@ -491,7 +491,7 @@ bool32 MoveRecordedBattleToSaveData(void)
static bool32 TryCopyRecordedBattleSaveData(struct RecordedBattleSave *dst, struct SaveSection *saveBuffer)
{
if (TryCopySpecialSaveSection(SECTOR_ID_RECORDED_BATTLE, (void*)(saveBuffer)) != 1)
if (TryReadSpecialSaveSection(SECTOR_ID_RECORDED_BATTLE, (void*)(saveBuffer)) != 1)
return FALSE;
memcpy(dst, saveBuffer, sizeof(struct RecordedBattleSave));

View File

@ -849,7 +849,7 @@ u16 sub_815355C(void)
return 0;
}
u32 TryCopySpecialSaveSection(u8 sector, u8* dst)
u32 TryReadSpecialSaveSection(u8 sector, u8* dst)
{
s32 i;
s32 size;
@ -858,7 +858,7 @@ u32 TryCopySpecialSaveSection(u8 sector, u8* dst)
if (sector != SECTOR_ID_TRAINER_HILL && sector != SECTOR_ID_RECORDED_BATTLE)
return 0xFF;
ReadFlash(sector, 0, (u8 *)&gSaveDataBuffer, sizeof(struct SaveSection));
if (*(u32*)(&gSaveDataBuffer.data[0]) != 0xB39D)
if (*(u32*)(&gSaveDataBuffer.data[0]) != SPECIAL_SECTION_SENTINEL)
return 0xFF;
// copies whole save section except u32 counter
i = 0;
@ -869,18 +869,18 @@ u32 TryCopySpecialSaveSection(u8 sector, u8* dst)
return 1;
}
u32 sub_8153634(u8 sector, u8* src)
u32 TryWriteSpecialSaveSection(u8 sector, u8* src)
{
s32 i;
s32 size;
u8* savData;
void* savDataBuffer;
if (sector != 30 && sector != 31)
if (sector != SECTOR_ID_TRAINER_HILL && sector != SECTOR_ID_RECORDED_BATTLE)
return 0xFF;
savDataBuffer = &gSaveDataBuffer;
*(u32*)(savDataBuffer) = 0xB39D;
*(u32*)(savDataBuffer) = SPECIAL_SECTION_SENTINEL;
// copies whole save section except u32 counter
i = 0;

View File

@ -428,7 +428,7 @@ void CopyTrainerHillTrainerText(u8 which, u16 trainerId)
static void TrainerHillStartChallenge(void)
{
nullsub_2();
if (!sub_81D3B34())
if (!ReadTrainerHillAndValidate())
gSaveBlock1Ptr->trainerHill.field_3D6E_0f = 1;
else
gSaveBlock1Ptr->trainerHill.field_3D6E_0f = 0;

View File

@ -57,40 +57,7 @@ gUnknown_030012C0: @ 30012C0
gUnknown_030012C4: @ 30012C4
.space 0x4
@ ereader_helpers
gUnknown_030012C8: @ 30012C8
.space 0x18
gUnknown_030012E0: @ 30012E0
.space 0x2
gUnknown_030012E2: @ 30012E2
.space 0x2
gUnknown_030012E4: @ 30012E4
.space 0x2
gUnknown_030012E6: @ 30012E6
.space 0x2
gUnknown_030012E8: @ 30012E8
.space 0x4
gUnknown_030012EC: @ 30012EC
.space 0x2
gUnknown_030012EE: @ 30012EE
.space 0x2
gUnknown_030012F0: @ 30012F0
.space 0x2
gUnknown_030012F2: @ 30012F2
.space 0x2
gUnknown_030012F4: @ 30012F4
.space 0x4
.include "src/ereader_helpers.o"
.include "src/faraway_island.o"
.include "asm/m4a_1.o"
.include "src/agb_flash.o"