summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar MetalliC <0vetal0@gmail.com>2017-12-12 18:25:05 +0200
committerGravatarGravatar MetalliC <0vetal0@gmail.com>2017-12-12 18:25:05 +0200
commit4637ec82dceb40ef454751fe02c2188aa06ccf29 (patch) (github)
treec8a4eb36fca78cc7b94d7bdcf3fa5de520234c75
parent21490be86e8193cce1599e5c6d026ba8955802f7 (diff)
downloadmame-4637ec82dceb40ef454751fe02c2188aa06ccf29.zip
mame-4637ec82dceb40ef454751fe02c2188aa06ccf29.tar.bz2
pgm2 gpu registers notes (nw)
-rw-r--r--src/mame/drivers/pgm2.cpp19
-rw-r--r--src/mame/machine/pgm2_memcard.cpp10
2 files changed, 27 insertions, 2 deletions
diff --git a/src/mame/drivers/pgm2.cpp b/src/mame/drivers/pgm2.cpp
index 785b6953a2c..2d4756ce59e 100644
--- a/src/mame/drivers/pgm2.cpp
+++ b/src/mame/drivers/pgm2.cpp
@@ -68,6 +68,25 @@
Oriental Legend 2 (Oversea) - V21
Oriental Legend 2 (China) - A8
+ GPU registers, located at 301200xx, 16bit access.
+ 00 - bg scroll x
+ 02 - bg scroll y
+ 04 - zoom something, 0F-7F, default 1F
+ 06 - zoom something, 0F-7F, default 1F
+ 08 - fg? scroll x
+ 0a - fg? scroll y
+ 0e - sprite related, set to 1 at sprite hw init
+ 10 - sprite related, orleg2 - 0x13, kov2nl - 0x14
+ 14 - sprite enable ? set to 0 before spriteram update, to 1 after
+ 16 - enable access to vrams/palettes/etc ? (bitmask)
+ 18 - vblank ack
+ 1a - ? 0 at init
+ 1c - sprite related, orleg2 - 5, kov2nl - 7
+ 1e - sprite related, set to 2 at sprite hw init
+ 32 - shared RAM bank
+ 34, 36 - sprite related, set to 0 at sprite hw init, some unused xor feature ?
+ 38, 3a - sprite mask xor key
+
*/
#include "includes/pgm2.h"
diff --git a/src/mame/machine/pgm2_memcard.cpp b/src/mame/machine/pgm2_memcard.cpp
index 243cfe80855..e8fee19f474 100644
--- a/src/mame/machine/pgm2_memcard.cpp
+++ b/src/mame/machine/pgm2_memcard.cpp
@@ -96,11 +96,17 @@ void pgm2_memcard_device::auth(uint8_t p1, uint8_t p2, uint8_t p3)
{
if (m_security_data[0] & 7)
{
- if (m_security_data[1] == p1 && m_security_data[2] == p2 && m_security_data[3] == p3)
+ if (m_security_data[1] == p1 && m_security_data[2] == p2 && m_security_data[3] == p3) {
authenticated = true;
+ m_security_data[0] = 7;
+ }
else {
+ authenticated = false;
m_security_data[0] >>= 1; // hacky
- logerror("Wrong IC Card password !!!");
+ if (m_security_data[0] & 7)
+ popmessage("Wrong IC Card password !!!\n");
+ else
+ popmessage("Wrong IC Card password, card was locked!!!\n");
}
}
}