Magicard/Notes

From Wiki - GameHacking.org
Jump to: navigation, search

The following are notes for the Magicard:

Gamtec Magicard

(c) December 2010 - EkeEke
contact: eke_eke31@yahoo.fr


Overview

The Magicard is an unlicensed Mega Drive cheat cartridge that was manufactured by Gamtec, a taiwanese company that also developped a few unlicensed games for the Mega Drive.
It seems to be nothing more than a Game Genie clone, with very similar (copied ?) hardware architecture. Magicard software seems to have however less features and uses its own specific cheat code format.


Registers Mapping

$8000: Mode Register



D7: unknown (always set to 1)
D6: unknown (always set to 1)
D5: code#5 status (0: enabled, 1: disabled)
D4: code#4 status (0: enabled, 1: disabled)
D3: code#3 status (0: enabled, 1: disabled)
D2: code#2 status (0: enabled, 1: disabled)
D1: code#1 status (0: enabled, 1: disabled)
D0: mode bit (0:Magicard ROM, 1: cartridge ROM)

$8002-$801E: Patch Registers



$8002: code#1 patch data
$8004: code#1 patch address MSB
$8006: code#1 patch address LSB
$8008: code#2 patch data
$800A: code#2 patch address MSB
$800C: code#2 patch address LSB
$800E: code#3 patch data
$8010: code#3 patch address MSB
$8012: code#3 patch address LSB
$8014: code#4 patch data
$8016: code#4 patch address MSB
$8018: code#4 patch address LSB
$801A: code#5 patch data
$800C: code#5 patch address MSB
$801E: code#5 patch address LSB


Notes:



(1) Magicard software always seems to enable all codes on exit, even if none were entered.
(2) Registers seem to be write only (no reads are done by Maficard software)
(3) Registers can be accessed as byte (only MSB or LSB is updated)


Cheat Code Format

Characters :


There are 16 available characters. Each one can be encoded in a 4-bits value.

A=0000 (+0)
B=0001 (+1)
D=0010 (+2)
F=0011 (+3)
G=0100 (+4)
H=0101 (+5)
I=0110 (+6)
K=0111 (+7)
N=1000 (-8)
P=1001 (-7)
R=1010 (-6)
S=1011 (-5)
T=1100 (-4)
U=1101 (-3)
Y=1110 (-2)
Z=1111 (-1)


Gamtec Code


Each code is made of 10 selectable characters.
Each bits (one character = 4 bits) are represented below:

abcd efgh ijkl mnop qrst uvwx yzAB CDEF GHIJ KLMN
#1 #2 #3 #4 #5 #6 #7 #8 #9 #10


Patch Decoding


A patch is made of a 24 bits address & 16 bits patch data.
This makes a total of 5 bytes or 10 x 4-bits nibbles, address being first & data next.

4-bits nibbles are calculated using characters 4-bits value, with the following formula:

0110 0000 0000 0000 0000 0110 : 0000 0000 0000 0000
+ abcd efgh yzAB CDEF GHIJ KLMN : ijkl mnop qrst uvwx
+ ijkl ijkl ijkl ijkl ijkl ijkl : ijkl ijkl 0000 ijkl
- qrst qrst qrst qrst qrst qrst : qrst qrst ijkl qrst
& 1111 1111 1111 1111 1111 1111 : 1111 1111 1111 1111


Operations are done for each group of 4-bits nibble.

Example:

BDBDBDBDBD:

0110 0000 0000 0000 0000 0110 : 0000 0000 0000 0000
+ 0001 0010 0001 0010 0001 0010 : 0001 0010 0001 0010
+ 0001 0001 0001 0001 0001 0001 : 0001 0001 0000 0001
- 0001 0001 0001 0001 0001 0001 : 0001 0001 0001 0001
& 1111 1111 1111 1111 1111 1111 : 1111 1111 1111 1111

= 0111 0010 0001 0010 0001 1000 0001 0010 0000 0010
7 2 1 2 1 8  : 1 2 0 2

BDFGHIKNPR:

0110 0000 0000 0000 0000 0110 : 0000 0000 0000 0000
+ 0001 0010 0111 1000 1001 1010 : 0011 0100 0101 0110
+ 0011 0011 0011 0011 0011 0011 : 0011 0011 0000 0011
- 0101 0101 0101 0101 0101 0101 : 0101 0101 0011 0101
& 1111 1111 1111 1111 1111 1111 : 1111 1111 1111 1111

= 0101 0000 0101 0110 0111 1110 : 0001 0010 0010 0100
5 0 5 6 7 E  : 1 2 2 4

External Links