Program's UID

Página 1/2
| 2

Por aoineko

Paladin (887)

Imagen del aoineko

20-10-2022, 09:37

Hello,
Have there ever been proposals for a unique identifier standard for new MSX programs?
I'm talking about data that would be placed at a predefined place in the ROM of a cartridge (after the header for example) and that would allow to easily detect the presence of this cartridge from another program.
I plan to add this option in MSXgl so I might use an existing format if it has already been discussed and/or used.
For example, how did Konami detect the presence of another of their games in the 2nd cartridge port? With a UID or just a binary fingerprint?

Login sesión o register para postear comentarios

Por gdx

Enlighted (6103)

Imagen del gdx

20-10-2022, 10:48

To my knowledge, only Konami ROMs compatible with the Game Master have this. A few other Roms from extension like FM-PAC have an ID.

Por aoineko

Paladin (887)

Imagen del aoineko

20-10-2022, 22:21

I found this on TCRF site "https://tcrf.net/Yie_Ar_Kung-Fu_(MSX)":
« Yie Ar Kung-Fu features some string of text at the end of its ROM with the last two digits of its catalogue number in BCD (binary-coded decimal) format at the second-to-last byte, and the game's title in katakana written backwards. This is located at offset #3FF0.
This type of information would be included with most Konami MSX games until The Maze of Galious. »

Do you have more information about that?
Yie Ar Kung-Fu product ID is "RC 725"... there is 725 wrote at #3FF0?
(I suppose #3FF0 is the size of the ROM minus #0F)

Por theNestruo

Champion (413)

Imagen del theNestruo

20-10-2022, 22:59

Hi, aonikeo!

I coded this routine to look for byte sequences in other slots. It can be used as this:

; Checks for "Antarctic Adventure"
	ld	hl, .ANTARCTIC_ADVENTURE
	call	SEARCH_IN_ANY_SLOT
	jr	z, .ANTARCTIC_ADVENTURE_PRESENT ; z: present
; nz: not present

Some Konami "signatures" that Game Master checks (if I remember correctly):

; RC 701 "Antarctic Adventure" search string data
.ANTARCTIC_ADVENTURE:
	dw	$4010
	db	11, $F3, $ED, $56, $3E, $C3, $32, $9A, $FD, $21, $44, $40

; RC 713 "Magical Tree" search string data
.MAGICAL_TREE:
	dw	$4798
	db	6, "KONAMI"

; RC 731 "Konami's Ping Pong" search string data
.PING_PONG:
	dw	$4002
	db	2, $6c, $40

; Konami header "AB $07 xx" search string data
; - RC 732 "Konami's Soccer"
; - RC 736 "Konami's Boxing"
; - RC 737 "Yie-Ar Kung Fu 2"
.KONAMI_HEADER_AB:
	dw	$4010
	db	3, "AB", $07

; Konami header "CD $07 xx" search string data:
; - RC 734 "The Goonies"
; - RC 739 "Knightmare" onwards
.KONAMI_HEADER_CD:
	dw	$4010
	db	3, "CD", $07

As you can see, Konami started to include the RC code at address $4010 since about RC732 (Konami's Soccer); first with the "AB" prefix, then with "CD". A couple of examples:

; RC 743 "Penguin Adventure" search string data
.PENGUIN_ADVENTURE:
	dw	$4010
	db	4, "CD", $07, $43

; RC 759 "Parodius" search string data
.PARODIUS:
	dw	$4010
	db	4, "CD", $07, $59

Por aoineko

Paladin (887)

Imagen del aoineko

20-10-2022, 23:42

Thank theNestruo,
I looked at the contents of some ROMs and I had spotted some kind of code at 4010h on the most recent Konami games.
There are even "EF" on the Pennant Race baseball game series or KM3 Shalom.
I'll do some more research, but I think I'll use the same kind of code for MSXgl.

Por theNestruo

Champion (413)

Imagen del theNestruo

20-10-2022, 23:59

Another implementation: http://karoshi.auic.es/karoshi.auic.es/index.php/topic%2c126...
I'm pretty sure there is a list of the Konami signatures (the RC code at the beginning, the reversed name at the end...) somewhere, but I just can't find it.

CASIO also had two-cartridge combinations (Iga Ninpouten 2 searchs for Iga Ninpouten by checking... just ONE byte!). It is at the very beginning of the ROM so if you start to disassembly it you'll find it.

In the homebrew side, Namake's Bridgedrome and QBIQS (Z80ST), Gommy Medieval Defender (Retroworks) and Relevo's Snowboarding (Relevo) are some of the games that check for other cartridges.

Por gdx

Enlighted (6103)

Imagen del gdx

21-10-2022, 02:56

theNestruo wrote:

I coded this routine to look for byte sequences in other slots. It can be used as this:

I did a similar routine for my SG-1000 rom loader but it can be used for any rom. The database is in a separate file that must be done manually choosing the relevant bytes. Database size is not limited by the user memory free.

Por Guillian

Prophet (3516)

Imagen del Guillian

21-10-2022, 08:11

aoineko wrote:

I found this on TCRF site "https://tcrf.net/Yie_Ar_Kung-Fu_(MSX)":
« Yie Ar Kung-Fu features some string of text at the end of its ROM with the last two digits of its catalogue number in BCD (binary-coded decimal) format at the second-to-last byte, and the game's title in katakana written backwards. This is located at offset #3FF0.
This type of information would be included with most Konami MSX games until The Maze of Galious. »

Do you have more information about that?
Yie Ar Kung-Fu product ID is "RC 725"... there is 725 wrote at #3FF0?
(I suppose #3FF0 is the size of the ROM minus #0F)

On TCRF there is a link to the source of that information.
Also I wrote a post about it on MRC.

Konami searched for cartridges in other slots checking their RC number (when available) or a checksum of part of the ROM. In games with different releases, they had to ckeck several chesums. E.g.: Antarctic Adventure has at least 5 different releases.

Por aoineko

Paladin (887)

Imagen del aoineko

21-10-2022, 09:41

Thank you for all this very interesting information.

For Konami games (the most recent ones) that have their identifier at the beginning of the ROM ($4010), I noticed a variable space between the header "AB|CD|EF", $07, $xx and the beginning of the program that often starts after $41xx.
I wonder if this space contains information about the game (especially its name).

If the data format following this header has evolved over time, this could explain why there are several footprints ("AB", "CD" and "EF"). Each could correspond to a different format.

Por Guillian

Prophet (3516)

Imagen del Guillian

21-10-2022, 10:30

The ROM header is 16 bytes long:

7.3.1 Catridge header

MSX cartridges have a 16-bye common header and, when the system is reset, the 
cartridge is initialised by the information written in this header. For ROM 
cartridges of BASIC or assembly language programs, they can be automatically 
started by using the information written in the header. Figure 5.48 shows the 
cartridge header configuration.


   Figure 5.48	Program cartridge header

	-------------------   4000H or 8000H
+0000H	|	ID	  |
	|-----------------|
+0002H	|      INIT	  |
	|-----------------|
+0004H	|    STATEMENT	  |
	|-----------------|
+0006H	|     DEVICE	  |
	|-----------------|
+0008H	|      TEXT	  |
	|-----------------|
+000AH	|		  |
	|		  |
	|    Reserved	  |   Note:  Reserved area should
	|		  |	     be filled with 00H.
	|		  |
+0010H	-------------------

https://www.konamiman.com/msx/msx2th/th-5b.txt

Konami added its own header in +#10 to identify the game (its RC7xx) and the addresses to modify the lives, stage, score, status... used by Game Master 1 and 2. That header does not include the name of the game.

The space between the header and the start address has no special meaning. It depends on how the programmer decided to organize the code.

Por gdx

Enlighted (6103)

Imagen del gdx

21-10-2022, 12:41

Guillian wrote:

Konami added its own header in +#10 to identify the game (its RC7xx) and the addresses to modify the lives, stage, score, status... used by Game Master 1 and 2. That header does not include the name of the game.

I thinked the same thing but when I classify the games that have header at 4010h, it doesn't seem to correspond with any of the Game Master 2 functions. There are even headerless games that are supported by the Game Master 2.

Codes that have in Konami's games at 4010h

41 42 ("AB")

  • Konami's Boxing (Konami no Boxing)
  • Konami's Football
  • Konami's Soccer (Konami no Soccer)

43 00 44 00 ("C D ")

  • Vampire Killer (Akumajou Dracula)
  • Firebird (Hi no Tori - Hououhen)

43 44 ("CD")

  • F1 Spirit - The Way to Formula-1
  • Gambare Goemon - Karakuri Douchuu
  • Gryzor (Contra)
  • King Kong 2 - Yomigaeru Densetsu
  • King's Valley 2 - The Seal of El Giza [MSX1] (Ouke no Tani - El Giza no Fuuin)
  • King's Valley 2 - The Seal of El Giza [MSX2] (Ouke no Tani - El Giza no Fuuin)
  • Knightmare 2 - The Maze of Galious (Knightmare 2 - Galious no Meikyuu)
  • Knightmare - Majou Densetsu
  • Metal Gear
  • Metal Gear 2 Solid Snake
  • Metal Gear
  • Nemesis (Gradius)
  • Nemesis 2 (Gradius 2)
  • Nemesis 3 Eve of Destruction (Gofer no Yabou Episode II)
  • Ouke no Tani El Giza no Fuuin Edit Contest Yuushuu Sakuhinshuu
  • Parodius - Tako Saves Earth
  • Penguin Adventure (Yume Tairiku Adventure)
  • QBert
  • Quarth
  • Salamander
  • Space Manbow
  • The Goonies
  • The Treasure of Usas (USAS)
  • Twin Bee
  • Yie Ar Kung-Fu II - The Emperor Yie-Gah (Yie Ar Kung-Fu II Yie-Gah Koutei no Gyakushuu)

45 46 ("EF")

  • Gekitotsu Pennant Race - The Pro Yakyuu
  • Gekitotsu Pennant Race 2
  • Knightmare 3 Shalom

59 5A ("YZ")

  • Game Master 2

No header (program)

  • Antarctic Adventure
  • Antarctic Adventure (I Love Chiri - Kekkyoku Nankyoku Daidouken)
  • Athletic Land Beta (I Love Taiiku - Wanpaku Athletic)
  • Athletic Land (I Love Taiiku - Wanpaku Athletic)
  • Cabbage Patch Kids
  • Circus Charlie
  • Comic Bakery
  • Comic Bakery (I Love Shakai - Ponpoko Pain)
  • Frogger
  • Game Master
  • Game master (Konami no Game wo 10bai Tanoshimu Cartridge)
  • The tile magician (Hai no Majutsushi)
  • Hyper Olympic 1
  • Hyper Olympic 2
  • Hyper Sports 1
  • Hyper Sports 2
  • Hyper Sports 3
  • Konami's Baseball (Konami no Baseball)
  • Konami's Billiards
  • Konami's Golf (Konami no Golf)
  • Konami's Mahjong (Konami no Mahjong Doujou)
  • Konami's Ping-Pong (Konami no Ping-Pong)
  • Konami's Tennis (Konami no Tennis)
  • Konami-Hyper Rally
  • Magical Tree
  • Monkey Academy (I Love Sansuu - Monta-Kun no Ichi ni Sansuu)
  • Mopiranger
  • King's Valley (Ouke no Tani)
  • Pippols
  • Road Fighter
  • Sky Jaguar
  • Super Cobra
  • Time Pilot
  • Track & Field 1
  • Track & Field 2
  • Video Hustler
  • Yie Ar Kung-Fu
Página 1/2
| 2