Castlevania Challenge Guide

Master the art of creating custom challenges for Castlevania! This comprehensive guide includes the complete RAM map and practical examples for building your own challenges.

🏰

Castlevania (NES) Challenge Creation Guide

Learn how to create custom challenges for Castlevania using the game's memory addresses. This RAM map shows you exactly where to find player stats, enemy data, and game state information.

Castlevania RAM Map

Address Size Description
$0018 01 System State
00 = Booting; 01 = Title Screen; 02 = Demo Mode; 03 = Start Game;
04 = Introduction; 05 = Gameplay; 06 = Respawning; 07 = Game Over;
08 = Door Transition; 09 = Autowalk; 0a = Entering Castle; 0b = Autoclimb;
0c = Scoring & Map; 0d = Continue; 0e = Falling; 0f = Ending
$0028 01 Current Stage
$002A 01 Lives (01 = last life, can be set to #ff but displays as 99 max)
$002C 01 Score Target (grants 1Up when equal to $07FE, then increments by 3)
$003F 01 Simon Real Y-Coordinate
$0040 02 Simon X-Coordinate Copy (for solid collisions)
$0042 02 Timer
$0044 01 Simon Display Health (adjusts every 4 frames to match $0045)
$0045 01 Simon Real Health
$005B 01 Wounded Timer (for iFrames)
$005F 01 Simon Height
$0064 01 Weapon Multiplier
$0070 01 Whip Level
$0071 01 Hearts
$0073 01 Whip Length
$0074 01 Whip Height
$0079 01 Subweapon Kills (until Multiplier drop)
$0143 01 Fall Distance (stuns if greater than 7 when landing)
$0144 01 Secrets Found (per stage)
$0145 01 Secret Timer (how long Simon stands still)
$0146 01 Blocks Broken
$015B 01 Subweapon
08 = Dagger; 09 = Boomerang; 0A = Rosary (cut);
0B = Holy Water; 0D = Axe; 0F = Stopwatch
$01A9 01 Boss Real Health
$01AA 01 Boss Display Health
$07FC 03 Score ($07FE used for 1UP checks)

Challenge Creation Examples

🏆 "Perfect Health Run"

Goal: Complete a stage without taking damage

-- Monitor Simon's health
local function checkPerfectHealth()
    local health = memory.readbyte(0x0045)
    if health < 16 then  -- 16 = full health
        return false  -- Challenge failed
    end
    return true
end

⚡ "Speed Run Challenge"

Goal: Complete stage in under 3 minutes

-- Track stage timer
local function checkSpeedRun()
    local timer = memory.readword(0x0042)
    local targetTime = 180  -- 3 minutes in seconds
    
    if timer > targetTime then
        return false  -- Too slow
    end
    return true
end

💎 "Secret Hunter"

Goal: Find all secrets in a stage

-- Count secrets found
local function checkSecrets()
    local secrets = memory.readbyte(0x0144)
    local stage = memory.readbyte(0x0028)
    
    -- Each stage has different secret counts
    local maxSecrets = getMaxSecretsForStage(stage)
    
    return secrets >= maxSecrets
end

🎯 "Boss Slayer"

Goal: Defeat boss without taking damage

-- Monitor boss health and player health
local function checkBossChallenge()
    local bossHealth = memory.readbyte(0x01A9)
    local playerHealth = memory.readbyte(0x0045)
    
    if bossHealth == 0 and playerHealth == 16 then
        return true  -- Boss defeated with full health
    end
    return false
end

💡 Challenge Creation Tips

🎮 Start Simple

Begin with basic health or timer challenges before attempting complex multi-condition challenges.

📊 Test Thoroughly

Always test your challenges multiple times to ensure they trigger correctly and don't have false positives.

🔍 Use Multiple Addresses

Combine different memory addresses to create more sophisticated challenges (health + timer + secrets).

⚙️ Handle Edge Cases

Consider what happens during transitions, deaths, and other game states when writing your scripts.