Cite as
FoxCunning/Castlevania2
Original
https://github.com/FoxCunning/Castlevania2
Pinned
FoxCunning/Castlevania2 @ 2abe12c2cbaff80fc929d5adfdfd1d7a655f29ec
Accessed
2026-10-21
Licence
none stated
Credit
FoxCunning, building on Bisqwit's automatic disassembly (bisqwit.iki.fi/src/clever-disasm-example/cv2u.lst) and its labels. The atlas used its labels to find routines.
Notes
ca65 source, one file per 16 KB bank, for a hack ("Bloodlust"), so some routines differ from the original; the atlas cites the USA ROM's bytes (castlevania-ii-nes-rom) for behavior and this repo only for names. No ROM image in the repo; the build needs the player's CHR ROM.

Cited on

Claims (3)

Simon's Quest's password packs 10 bytes: 7 of state, the byte FoxCunning labels Simon's level, the day count in BCD, the laurel and garlic counts in 4 bits each (the encoder writes a count above 8 as 8), the bytes labeled body parts, misc items 1, and misc items 2, and the whip level; then the 16-bit sum of those 7 as a check value; then a scramble byte. Hearts are not kept: accepting a password zeroes the bytes FoxCunning labels hearts and experience, sets HP to 48 and lives to 3, and zeroes $30 and $50-$57 (labeled the map type, scene, sub-room, and scroll position), $82 (night), $84, and $85 (the time wait counter and the minute).globals.inc L48–51globals.inc L33–34globals.inc L52–63globals.inc L88–93globals.inc L102–103globals.inc L258globals.inc L97globals.inc L301–310Code
On entry Simon's Quest rejects a password with any of its 16 characters blank. Otherwise it subtracts the add from characters 1-14, XORs them, unpacks the 10 bytes, and accepts only when both bytes of the sum match the 7 state bytes again, the level is below 7, the body-parts and misc-items-2 bytes are below $80, misc items 1 is below $10, the whip level is below 5, both of the day's digits are 0-9, and laurels and garlics are each at most 8. A rejection writes MISS and ENTRY to the screen, plays sound $24, and after 128 frames brings back the ENTER YOUR PASSWORD prompt and returns to input, writing nothing to the entered characters on the way; an acceptance writes ENTRY COMPLETED.globals.inc L327bank_7.asm L1434–1436Code
In Simon's Quest an enemy placed while it's night starts with double the hit points its level data gives, except a few object types and in the mansions.bank_2.asm L531Code