c $9385 called if the user chooses menu option 1 to examine spells C $9385 point HL at data block at $C2E3 - sound effect? C $9388 call play_sound_effect_in_HL C $938B clear the screen C $938E set ATTR-T to bright yellow on black C $9393 load A with value of "current player (0-7)" C $9396 add $29 (41 decimal to A) because wizard names start at message #41 C $9398 set print coordinates to (0,0) C $939B call MPRINT to display current wizard's name C $939E print "'S SPELLS" after the wizard's name C $93A3 set B to $14 (maximum number of spells is twenty?) and unknown4 to $40 (64 decimal) because '@' is the ASCII character before 'A' which is the first spell letter C $93AA set unknown3 to $0010 because that is the position in the screen row just before where the second column of spells is displayed C $93B0 copy value of HISPEL to unknown8 C $93B6 preserve BC - loop counter for spells? C $93B7 copy value of unknown8 into HL, i.e. .... C $93BA load A with the byte pointed to by HL C $93BB jump ahead to $9419 if A is zero C $93BE unknown3 := $10 - unknown3 because we are alternating between the two columns of spells? C $93C8 jump ahead to $93D3 if that last result was not zero because we are about to do the second column of spells? C $93CB add two to LSB of unknown3 because the spell name is two spaces after the spell letter? C $93D3 load HL with value of unknown8 (HISPEL?) C $93D6 copy byte pointed to by HL (...) into CURSP C $93DA call CHAN_C to ... C $93DD load A with current chaos/law value C $93E0 increment A then halve it and add $42 because brighter spells are easier to cast than darker spells C $93E5 set ATTR-T to the value in A C $93E8 increment unknown4 - current letter of the alphabet for current spell being named? C $93EF load BC with the value of unknown3 - coordinates for the current spell letter being displayed? C $93F3 preserve BC (display coords) C $93F4 call DH_P to display current spell letter C $93F7 restore BC (display coords) and increment x-coord C $93F9 jump ahead to $9403 if unknown5 is not zero C $93FF load A with $2D which is the '-' character for a NEUTRAL spell C $9401 jump ahead to $940C C $9403 jump ahead to $940A if sign flag sign is positive C $9406 load A with $2A which is the '*' character for a CHAOS spell C $9408 jump ahead to $940C C $940A load A with $5E which is the '↑' for a LAW spell C $940C preserve BC (display coords) C $940D call DH_P to display the NEUTRAL/LAW/CHAOS character after the spell letter C $9411 increment x-coordinate C $9412 load A with byte pointed to by unknown6 (which is the game message number for the current spell name?) C $9416 call MPRINT to display current spell name C $9419 add two to unknown8 C $9421 restore loop counter C $9422 loop back to $93B6 nineteen times C $9424 set print coords to (0,16) C $9427 set ATTR-T to bright yellow on black C $942C call MPRINT to display game message $58 - "PRESS '0' TO RETURN TO MAIN MENU" C $9431 call $BBCC to ... C $9434 call KEYBOARD in ROM return if '0' was pressed, otherwise jump ahead to $943C to see which spell letter they have chosen to examine C $943C point HL at unknown4 (which contains the letter of the last spell in the list?) C $943F decrement A and compare with unknown4 - if the user press a letter that was not displayed then jump back to $9434 to get another choice C $9444 also jump back to $9434 if the user typed a key whose ASCII code is less than that for 'A' ($3F is the ASCII code for '@') C $9449 load the code for the key pressed into B C $944A load value of HISPEL into HL C $944D load DE with $0002 C $9450 reset Carry flag (any other reason?) C $9451 HL -= (DE + carry flag) C $9453 add DE back onto HL C $9454 load A with the byte pointed to by HL, i.e. ... C $9455 jump back to $9453 if A is zero C $9458 loop back to $9453 ... times C $945A copy value of A into CURSP C $945D load A with value of unknown9 C $9460 jump ahead to $9469 if value in A is not zero C $9463 call $94A7 (to display details for current spell?) C $9466 jump back to start of this routine C $9469 set DE to the value of "current player (0-7)" C $946F point HL at sixteen byte table used by CAST_S C $9472 use "current player (0-7)" as an offset on HL C $9473 copy value of CURSP to byte pointed to by HL C $9477 return if the value of CURSP is not a CreatureCast spell C $947D clear bottom line of screen C $9480 set ATTR-T to bright white on black C $9485 call MPRINT to display "ILLUSION? (PRESS Y OR N)" at (0,22) C $948D randomly set SEED C $9490 call KEYBOARD routine in ROM C $9493 return if the user pressed 'N' in response to the question C $9496 jump back to $9490 if they didn't press 'Y' either! C $949A the user pressed 'Y' so point HL at second half of sixteen byte table used by CAST_S C $949D use "current player (0-7)" as an offset into that part of the table and set the byte pointed to by HL to $01 (as a flag to indicate an illusion?) C $94A6 return C $94A7 call CHAN_C to ... C $94AA jump ahead to $94E2 if CURSP is $01 or greater than or equal to $22 C $94B6 store value in A (CURSP) in last byte in "map area object code table" C $94BA copy HL into "position of cursor" C $94BD set last byte in "???fifth map area table???" to zero C $94C3 set ? to $03 C $94C8 copy value of "current chaos/law*" to unknown67 C $94CE Eh, wtf? C $94D1 set ? to zero C $94D6 load HL with value of "position of cursor*" C $94D9 set byte pointed to by HL to zero C $94DB point "position of cursor*" at "map area object code table" C $94E1 return C $94E2 clear the screen C $94E5 point HL at some sound data C $94E8 call play_sound_effect_in_HL C $94EB set ATTR-T to bright blue on cyan C $94F0 call ZRDR_P to ... C $94F3 set ATTR-T to bright yellow on black C $94F8 load A with byte pointed to by unknown6 - must be a game message... C $94FC call MPRINT to print the message at (8,5) C $9502 load A with unknown5 C $9505 jump back to $9453 if A is zero C $9508 jump back to $9529 if A has even parity C $950B set ATTR-T to bright magenta on black C $9510 call MPRINT to display "(CHAOS" at (8,7) C $9518 load A with unknown5 C $951B multiply A by -1 and add $30 to convert to the numerical value to display after "(CHAOS " C $951F call DH_P to display the CHAOS level of this spell C $9522 call DH_P to display ")" C $9527 jump ahead to $9543 C $9529 set ATTR-T to bright cyan on black C $952E call MPRINT to display "(LAW" at (8,7) C $9536 load A with unknown5 (CHAOS/LAW value of current spell, I think!) and add $30 to convert to a number C $953B call DH_P to display the LAW level of this spell C $953E call DH_P to display ")" C $9543 set ATTR-T to bright green on black C $9548 call MPRINT to display "CASTING CHANCE=" at (8,11) C $9550 set ATTR-P to bright yellow on black C $9555 load A with "current chaos/law" value, add one and jump to $9564 if it is not $0A C $955D otherwise call MPRINT to display "10" C $9562 jump ahead to $9569 C $9564 add $30 to A to get a numerical value and display it using DH_P C $9569 call DH_P to display "0" C $956E call DH_P to display "%" C $9573 set ATTR-T to bright green on black C $9578 call MPRINT to display "RANGE=" at (8,15) C $9580 set ATTR-T to bright yellow on black C $9585 load with something from the Spells table? C $958C halve the value in A and jump ahead to $959A if the result is at least $0A C $9593 otherwise we have a digit to display so add $30 to convert and display it using DH_P C $9598 jump ahead to $9594 C $959A call DH_P to print '20' C $95A4 set ATTR-T to bright cyan on blue C $95A9 call MPRINT to display "PRESS ANY KEY" at (0,22) C $95B1 randomly set SEED C $95B4 call $BBB0 to randomly set SEED again C $95B7 return