case 0x08: d = (PicoPicohw.pen_pos[1] >> 8); break;
case 0x0a: d = PicoPicohw.pen_pos[1] & 0xff; break;
case 0x0c: d = (1 << (PicoPicohw.page & 7)) - 1;
- if (PicoPicohw.is_kb_active) {
- // Apply 1 of 2 bitmasks, depending on which one preserves the highest set bit.
- if (PicoPicohw.page % 2 == 0)
- d &= 0x2a; // 0b00101010
- else
- d &= 0x15; // 0b00010101
+ if (PicoPicohw.page == 7) {
+ d = 0x2a; // 0b00101010
+ } else {
+ d = ((1 << (PicoPicohw.page & 7)) - 1);
}
break;
case 0x10: d = (PicoPicohw.fifo_bytes > 0x3f) ? 0 : (0x3f - PicoPicohw.fifo_bytes); break;
}\r
if (events & PEV_PICO_PNEXT) {\r
PicoPicohw.page++;\r
- if (PicoPicohw.page > 6)\r
- PicoPicohw.page = 6;\r
- emu_status_msg("Page %i", PicoPicohw.page);\r
+ if (PicoPicohw.page > 7)\r
+ PicoPicohw.page = 7;\r
+ if (PicoPicohw.page == 7) {\r
+ // Used in games that require the Keyboard Pico peripheral\r
+ emu_status_msg("Test Page");\r
+ }\r
+ else {\r
+ emu_status_msg("Page %i", PicoPicohw.page);\r
+ }\r
}\r
if (events & PEV_PICO_STORY) {\r
if (pico_inp_mode == 1) {\r
}
if (events & (1 << RETRO_DEVICE_ID_JOYPAD_R)) {
PicoPicohw.page++;
- if (PicoPicohw.page > 6)
- PicoPicohw.page = 6;
- emu_status_msg("Page %i", PicoPicohw.page);
+ if (PicoPicohw.page > 7)
+ PicoPicohw.page = 7;
+ if (PicoPicohw.page == 7) {
+ // Used in games that require the Keyboard Pico peripheral
+ emu_status_msg("Test Page");
+ }
+ else {
+ emu_status_msg("Page %i", PicoPicohw.page);
+ }
}
if (events & (1 << RETRO_DEVICE_ID_JOYPAD_X)) {
if (pico_inp_mode == 2) {