How is the password for the masterpiece action game 'Akumajo Densetsu' generated?



Konami's masterpiece action game '

Akumajo Dracula Series ' has been more than 30 years since its first appearance, but it is a series that has been deeply popular, with the anime version released on Netflix in 2017. Meat Fighter, who explains various game systems, explains the password generation algorithm of ' Akumajo Densetsu ' released for family computers in 1989 in one of the Akumajo Dracula series.

Castlevania III Password Algorithm
https://meatfighter.com/castlevania3-password/

Castlevania III is a stage-clear side-scrolling action game where you can save the progress of the game with a password that fits four types of icons in a 16-square frame, as shown in the image below.



Also, in the overseas version of '

Castlevania III: Dracula's Curse ', you can start the game in a special state by entering a special name in the name field. Special names and special effects are ' HELP ME : Start the game with 10 lives ' ' AKAMA : Start the game in hard mode' ' OKUDA : Start the game with the ability to operate Alucard ' ' URATA : Start the game while you can operate the cipher' ' FUJIMOTO : Start the game while you can operate the grant'. In addition, 'AKAMA', 'OKUDA', 'URATA', and 'FUJIMOTO' are the names of the developers of the legend of Akumajo.



There are four types of information saved by password: 'game progress', 'accompanying partner', 'difficulty', and 'name', and each information is converted to hexadecimal and saved.

'Game progress' is internally divided into 18 levels, and numbers from 00 to 11 are assigned to each level. The images below show the numbers corresponding to each progress.



There are four types of 'accompanied partners': '0: no partner', '1: Cypha', '2: Grant', and '3: Alucard'. Some partners may not be able to accompany you on some stages. The table below shows whether each player can accompany each progress of the game converted to hexadecimal numbers, except for the progress and partner combination that is marked with a cross indicating that it is possible to accompany. Is rejected by the system.



Information about 'difficulty' is represented by either '0: normal' or '1: hard'.

For the 'name' information, convert the character string used in the name to a numerical value using the image below, add 4 to the total value of the numerical value, divide by 8, and save the remainder as a hash value .



In addition, all three types of information other than 'name' are also converted to hash values. After that, the hash values of the four types of information are converted into

payload hashes along with the 'toggle mask index' that is randomly generated when the password is generated. The payload hash is composed of 8 digits as shown in the image below, the 1st to 3rd digits are the hash value of 'name', the 4th digit is the hash value of 'game progress', and the 5th digit is 'toggle'. The 'mask index', the 6th to 7th digits show the hash value of 'accompanying partner', and the 8th digit shows the hash value of 'difficulty'.



Finally, the 8-digit payload hash is encoded into the password according to one of the following three patterns: Since 'Akumajo Densetsu' generates a password including the hash value of the name, when decoding the password, it is necessary to enter the name used when generating the password.



In addition, Meat Fighter has released the code to encode and decode passwords, and on the following page you can see a list of possible passwords with several names including 5 special names.

Castlevania III Password Algorithm



The code for encoding and decoding passwords in Castlevania III: Dracula's Curse is also available on GitHub .

in Software,   Game, Posted by log1o_hf