version 0.99 rc1: hardcore mode, enemy updates
[nemesis.git] / nemesis.z80
index 5d10f61da1cb80470ca5f8cf41f73e879388780d..63dd1449b62e2361e5ccd8896796ee028c4aa7d7 100644 (file)
@@ -1,13 +1,15 @@
 ;----------------------------------------------------------------------------
-;---------------------- NEMESIS ---------------------------------------------
+;-------------------------------- NEMESIS -----------------------------------
 ;----------------------------------------------- cool arcade-shoot-em-up-game
 
-;by SHIAR | shiar0@hotmail.com | icq#43840958 | www.shiar.org
+;------- by SHIAR | shiar0@hotmail.com | icq#43840958 | www.shiar.org -------
 
-;This source should only be used for learning practises, do not
-;alter it, and certainly never distribute an altered version!!
+;!!! This source should only be used for learning practises, do not !!!
+;!!! alter it, and certainly never  distribute an altered version!! !!!
 
-;TO DO:  levels 11,12,13 | bosses 10-13 | look over &&& markings
+;TO DO:  levels 11,12,13 | draw bosses 12 and 13 (41/42)
+;       store B<>W mode | ship info at ship selection screen
+;       store ship sprite pointers as word | look over &&& markings
 
 ;---------------------- nemesis.z80 start -----------------------------------
 
@@ -30,7 +32,7 @@ _shracc               = $4383         ;like _shlacc but just the opposite :P
 _dispahl       = $4a33         ;display value in ahl <100000 (cheap TI)
 _asapvar       = $d6fc         ;our own variable name (likely "nemesis")
 
-storepos       = _asm_exec_ram+7000    ;1024 bytes to store things
+storepos       = _asm_exec_ram+7000    ;1024 bytes needed to store things
 
 ;---------------------- in-game vars ----------------------------------------
 
@@ -61,18 +63,18 @@ your_prevpos        = starx2+(nrstars2*2)   ; +84   ;14*mm+2 ;previous positions
 
 
 enemies                = storepos+200          ;+200   ;info about each enemy
-enemysize      = 10                            ;infobytes per enemy
+enemysize      = 11                            ;infobytes per enemy
 nrenemies      = 16                            ;max. nr of enemies
 
 ybullets       = enemies+(nrenemies*enemysize) ;60 bytes = 20(state,damg,x,y)
-nrybuls                = 128                   ;+360\
-ebullets       = ybullets+(nrybuls*4)  ;+872   ;30 bytes = 10(state,x,y)
+nrybuls                = 128                   ;+376\
+ebullets       = ybullets+(nrybuls*4)  ;+888   ;30 bytes = 10(state,x,y)
 nrebuls                = 48
-lvlenemies     = ebullets+(nrebuls*3)  ;-1016
+lvlenemies     = ebullets+(nrebuls*3)  ;-1032
 
 ;enemies:
 ;      [HP64] [000000:HP left 00:(00=no enemy 01=exploding 1X=normal)]
-;      [ship type or explosion frame] [x] [y] [movetype] [movecounter]
+;      [ship sprite (DW!) or explosion frame] [x] [y] [movetype] [movecounter]
 ;      [firecounter] [firefreq] [firetype]
 
 ;---------------------- introduction ----------------------------------------
@@ -83,9 +85,9 @@ lvlenemies    = ebullets+(nrebuls*3)  ;-1016
        .dw Title               ;pointer to description (all shells)
        .dw Icon                ;pointer to YAS icon
 
-Title: .db "Nemesis v0.99.820 by SHIAR",0
+Title: .db "Nemesis v0.99.829 by SHIAR",0
 
-Icon:  .db 8,1                 ;icon for YAS: width = 1byte; height = 9bytes
+Icon:  .db 8,1                 ;icon for YAS: width = 1byte; height = 7bytes
        .db %11100000           ; ███
        .db %01111000           ;  ████
        .db %00111110           ;   █████
@@ -112,11 +114,6 @@ init:      cal BUSY_OFF            ;turns the run-indicator off, obviously
        xor a                   ;ld a,0
        res 2,(iy+13)           ;don't scroll the screen
        cal _flushallmenus      ;remove TI menus
- ld hl,dispbuffer-20
- ld de,dispbuffer-20+1
- ld bc,150*16
- ld (hl),$FF
- ldir
 
 FixKeys:                       ;fixes some key problems like left+down bug
        im  1
@@ -239,6 +236,18 @@ do_invert:                 ;invert screen (b<>w)
        pop hl
        ret
 
+mode_invert:
+       ld  hl,invertmode       ;change invert mode (will be stored)
+       ld  a,$98
+       xor (hl)                ;$2F (cpl) <-> $B7 (or a)
+       ld  (hl),a
+       ld  de,1
+       psh de                  ;size
+       psh hl                  ;dest (invertmode)
+       ld  hl,4+invertmode-_asm_exec_ram
+       psh hl                  ;src
+       jp  storesmtn
+
 ;----------------------------------------------------------------------------
 ;---------------------- game loop -------------------------------------------
 ;----------------------------------------------------------------------------
@@ -643,7 +652,10 @@ pause:
        cal getsomekeys         ;GET_KEY w/ halts and checks for enter
        ret z                   ;enter/second pressed: continue game
        cp  K_F1                ;F1 pressed?
-       cal z,do_invert         ;if so then change invert screen (AF saved)
+       jr  nz,notinvert
+       cal do_invert           ;if so then change invert screen (AF saved)
+       cal mode_invert         ;and screen mode (will be saved)
+notinvert:
        ld  hl,CONTRAST         ;contrast setting (0-31)
        ld  b,(hl)              ;load contrast into b
        cp  K_UP                ;+ key changes contrast up
@@ -907,15 +919,21 @@ explosion_stuff:          ;in:a=frame*2+(0 to 1); (hl)=xpos-- ix=sprite
        ld  c,a
        ld  b,0                 ;bc=a
        add ix,bc               ;go to correct sprite (each spr. is 8 bytes)
-       inc hl
+       inc hl                  ;@x
        ld  d,(hl)              ;load xpos
-       inc hl
+       inc hl                  ;@y
        ld  e,(hl)              ;and y
        jp  putsprite           ;and display it too
 
 ;----hit----
 
 damage_you:                    ;damages you B points
+       ld  a,(hardcore)        ;hardcore mode?
+       or  a
+       jr  z,damageok          ;0 = no  = don't modify
+;      sla b                   ;1 = yes = double tha damage (b shifted left)
+       .db $CB,$30     ;sll b  ;damage=2b|1 (CB3r = unsupported SLL r)
+damageok:
        ld  a,(your_shield)     ;shield left?
        or  a
        jr  z,dothadamage       ;no shield
@@ -954,15 +972,16 @@ place_multiples:
 
 inc_armor:
        ld  a,(your_armor)      ;load current armor
-       cp  25-6                ;may not become >=25
+       cp  50-6                ;may not become >=50
        jr  c,doincarmor        ;ok then just add 6
-       ld  a,24-6              ;set to maximum (6 will be added below)
+       ld  a,49-6              ;set to maximum (6 will be added below)
 doincarmor:
        add a,6                 ;add 6 to armor
        ld  (your_armor),a      ;change armor
        ret
 
 select:
+       ld  de,your_weapon      ;current weapon, required for most selections
        ld  hl,your_pickup      ;select pickups
        ld  a,(hl)              ;load pickups taken so far
        dec a                   ;is it 1?
@@ -978,7 +997,7 @@ select2:
        dec a                   ;is it 2?
        jr  nz,select3          ;no, carry on
        ld  (hl),a              ;reset (otherwise could be used to cheat)
-       ld  a,(your_weapon)
+       ld  a,(de)              ;(your_weapon)
        cp  maxweapon
        jr  nc,disp_icons       ;no beam with laser
        ld  a,(your_extramode)  ;indicates whether this is tailbeam/double
@@ -988,24 +1007,24 @@ select3:
        dec a                   ;is it 3?
        jr  nz,select4          ;no, carry on
        ld  (hl),a              ;reset pickups
-       ld  hl,your_weapon
-       ld  a,(hl)
-       inc a
+       ld  a,(de)              ;(your_weapon)
+       inc a                   ;next
        cp  maxweapon
        jr  c,selected3         ;weapon OK
        jr  z,disp_icons        ;weapon maxed out
        xor a                   ;laser was selected: set to first weapon
 selected3:
-       ld  (hl),a              ;set new weapon
+       ld  (de),a              ;set new weapon
         cal loadweapon         ;load it (damage and stuff)
+       xor a
+       ld  (your_multiples),a  ;no multiples with beam
        jr  disp_icons          ;display n return
 select4:
        dec a                   ;is it 4?
        jr  nz,select5          ;no, carry on again
        ld  (hl),a              ;reset pickups
        ld  (your_extra),a      ;no extra beams (tailbeam/up-double)
-       ld  hl,your_weapon
-       ld  a,(hl)
+       ld  a,(de)              ;(your_weapon)
        cp  maxweapon           ;upgrade from bullet?
        jr  nc,upgradelaser     ;nope, just upgrade
        ld  a,maxweapon-1       ;yes, set laser #1
@@ -1013,13 +1032,16 @@ upgradelaser:
        inc a                   ;next laser
        cp  maxlaser
        jr  nc,disp_icons       ;laser maxed out
-       ld  (hl),a
+       ld  (de),a
        cal loadweapon
        jr  disp_icons          ;display + return
 select5:
        dec a                   ;is it 5?
        jr  nz,select6          ;no, carry on once more
        ld  (hl),a              ;reset pickups
+       ld  a,(de)              ;(your_weapon)
+       cp  maxweapon+1         ;laser or beams?
+       jr  c,disp_icons        ;if beams used then no multiples
        ld  hl,your_multiples
        ld  a,(hl)              ;multiples you already got
        and %1111               ;reset movebit so (your_multiples)=real value
@@ -1161,11 +1183,13 @@ armorbarclr:
        sbc hl,de
        dnz armorbarclr
 
-       ld  a,(your_armor)      ;load your armor (<25)
+       ld  a,(your_armor)      ;load your armor (<50)
+       srl a                   ;/2 (<25)
        ld  c,a                 ;psh a
-       srl a                   ;/2
-       srl a                   ;/4
-       srl a                   ;/8: don't display last 3 bits of a (later)
+       and %11111000           ;clear last three bits
+       rra                     ;so we can use rotate instead of shift right
+       rra                     ;which saves 3(-2) bytes and speed
+       rra                     ;/8: don't display last 3 bits of a (later)
        jr  z,noarmorbar        ;if a=0 then it would loop 256x so skip it
        ld  b,a                 ;loop b=a times
 armorbar:                      ;starting at ($39*16)+VIDEO_MEM
@@ -1356,19 +1380,17 @@ check_laserhits:                ;de = (x,y)
 laserhits:                     ;hits with normal enemies
        psh hl
        ld  a,(hl)              ;occ+hp00
-       and %00000010           ;normal/moving occ.=%1x
-       jr  z,nolashit          ;no hit when enemy_occ <> 2/3
-       inc hl                  ;enemy type
-       ld  a,(hl)
-       or  a                   ;enemy #0 = pickup
-       jr  z,nolashit          ;yes: don't destroy
+       and %11                 ;normal enemy occ = %11
+       cp  %11
+       jr  nz,nolashit         ;no hit when enemy_occ <> 11
 
+       inc hl                  ;@type
        cal find_sprite         ;ix=sprite to enemy (hl)
-       inc hl
+       inc hl                  ;@x
        ld  a,(hl)              ;check x
        sub d
        jr  c,nolashit          ;no hit when enemy is left of you
-       inc hl
+       inc hl                  ;@y
        ld  a,(hl)              ;check y
        sub e
        jr  z,enemy_lashit      ;a-e=0 = laser on top line of enemy = hit
@@ -1502,14 +1524,11 @@ hit_enemies:                    ;Hits with normal enemies
        psh hl
 
        ld  a,(hl)
-       and %00000010
-       jr  z,nohit             ;no hit when enemy_occ <> 2/3
+       and %11
+       cp  %11
+       jr  nz,nohit            ;no hit when enemy_occ <> %11
 
        inc hl                  ;enemy type
-       ld  a,(hl)
-       or  a                   ;enemy #0 = pickup
-       jr  z,nohit             ;yes: don't destroy
-
        cal find_sprite         ;set ix to the sprite of this enemy
 
        inc hl                  ;@x
@@ -1558,7 +1577,8 @@ enemy_hit:                        ;*in:a=damage;hl=enemy+y
        ld  b,a
 
        dec hl                  ;@x
-       dec hl                  ;@type
+       dec hl                  ;@sprite+1
+       dec hl                  ;@sprite
        dec hl                  ;@hp00 (occ)
        ld  a,(hl)              ;load hp00
        sub b                   ;decrease HP (if <0xx then c is set)
@@ -1579,7 +1599,7 @@ enemy_hit:                        ;*in:a=damage;hl=enemy+y
        ld  a,pickupfreq        ;reset enemies counter
 pickupdone:
        ld  (pickuptimer),a     ;save new enemiescounter value
-       inc hl                  ;@type
+       inc hl                  ;@sprite (=explosionFrame)
        ld  (hl),0              ;explosionFrame 0 or enemy #0=pickup
        pop af
        cal z,place_enemy       ;place pickup (enemy#=0=a cuz ZF)
@@ -1665,11 +1685,14 @@ chk_noenemy:                    ;find an unused (no) enemy
        dec de                  ;goto hp64 (before occ)
        ldi                     ;set hp64
        ldi                     ;set hitpoints+occ of enemy class
-       ld  a,(hl)              ;save sprite-offset/2 (ldi decs bc so in a)
+       ld  a,(hl)
+       .db $DD,$6F ;ld hx,a
        ldi                     ;set sprite
+       ld  a,(hl)
+       .db $DD,$67 ;ld lx,a
+       ldi                     ;set sprite + 1
        ldi                     ;set x-position
 
-       ld  c,a                 ;c=sprite
        ld  a,(hl)              ;load placeInfo
        inc hl
        dec a                   ;is it 1?
@@ -1685,10 +1708,6 @@ lure_enemy:                      ;2nd possibility: luring enemy
        ld  a,(y)               ;place at same y-pos as YOUR ship
        jr  ypos_OK
 random_enemy:
-       ld  b,0                 ;bc = enemy sprite offset / 2
-       ld  ix,spr_enemy00      ;first enemy sprite
-       add ix,bc               ;add offset for current enemy
-       add ix,bc               ;twice (offset stored as offset/2)
        ld  a,64-8              ;=57=screen height (8 is scorebar)
        sub (ix+1)              ;minus sprite height=bottom
        ld  c,b                 ;range=0 to...
@@ -1708,12 +1727,18 @@ ypos_OK:                        ;random value successfully created
 
 ;--------------------------- enemy fires ------------------------------------
 
-Enemy_fires:                   ;de = x,y; c = type
+Enemy_fires:                   ;de = x,y; c = type; ix = enemy_sprite
        ld  hl,ebullets         ;first bullet to check
        ld  b,nrebuls
        dec d
-       dec d                   ;d = x-2
-       inc e                   ;e = y+1
+       dec d                   ;d = x of firing enemy minus 2
+
+       ld  a,(ix+1)            ;the height of the enemy firing this bullet
+       srl a                   ;halved
+       add a,e                 ;added to his y-position
+       ld  e,a                 ;into e
+       dec e                   ;minus one (bullet height)
+
 enemy_fires_again:             ;same but hl = first bullet possibly free
        xor a
 find_ebullet:
@@ -1731,6 +1756,33 @@ found_ebullet:
        jr  z,bulletaiming      ;type #6 = aiming = type#2..5
        dec a
        jr  z,bullettriple      ;type #7 = triple
+       dec a
+       jr  z,bulletdouble      ;type #8 = double
+       dec a
+       jr  z,bulletquad        ;type #9 = quad
+
+bulletdquad:
+       cal bulletquad          ;fire type #1 to 5
+       inc hl
+       ld  a,e
+       sub 5
+       ld  e,a                 ;offset 5 up
+       ld  c,1                 ;type #1 = normal
+       cal enemy_fires_again
+       inc hl
+       ld  a,e
+       add a,10
+       ld  e,a                 ;offset 10 down (5 total)
+       jr  enemy_fires_again
+
+bulletquad:
+       cal bullettriple        ;fire type #1, 4 and 5
+       inc hl                  ;next bullet
+       ld  c,2                 ;type #2 = down
+       cal enemy_fires_again
+       inc hl
+       ld  c,3                 ;type #3 = up
+       jr  enemy_fires_again
 
 bulletdouble:
        dec e                   ;one up
@@ -1753,21 +1805,22 @@ bullettriple:
 
 bulletaiming:
        ld  a,(y)
-       sub e
-       add a,10
-       jp  p,bulletnotup
-       ld  c,5                 ;yourY-bulY = negative (=bullet below you)
+       sub e                   ;a = yourY-bulY = pixels bullet is above you
        add a,10
-       jp  p,bulletnotup
-       ld  c,3                 ;yourY-bulY = even more negative (going up)
+       jp  p,bulletnotup       ;jump when 10 pixels below you or higher
+       ld  c,5                 ;go slightly down
+       add a,10                ;10 to 20 pixels below you
+       jp  p,bulletok          ;yes: all done.
+       ld  c,3                 ;otherwise move down even more
+       jr  bulletok
 bulletnotup:
-       sub 20
-       jr  c,bulletok
-       ld  c,4                 ;bullet going down (=jp m)
-       sub 10
-       jr  c,bulletok          ;even more going down
-       ld  c,2
-
+       ld  c,1                 ;normal bullet...
+       sub 20                  ;...when...
+       jp  m,bulletok          ;...10 pixels below you to 20 pixels above
+       ld  c,4                 ;bullet going slightly up...
+       sub 10                  ;...when...
+       jr  c,bulletok          ;...20 to 30 pixels above you
+       ld  c,2                 ;else (more than 30 pixels) move up more
 bulletok:
        ld  (hl),c              ;set bullet direction
        inc hl
@@ -1877,19 +1930,19 @@ handle_enemy:
        psh hl
 
        ld  a,(hl)
-       and %00000011
-       jr  z,next_enemy        ;occ "no enemy" 0
+       and %11
+       jr  z,next_enemy        ;occ "no enemy" 00
        dec a
-       jr  z,exploding_enemy   ;occ "exploding" 1
+       jr  z,exploding_enemy   ;occ "exploding" 01
 
 normal_enemy:
-       inc hl
-       ld  c,(hl)              ;c = enemy type = de
+       ld  c,a                 ;c = occ-1 = %10 (normal) or %01 (pickup)
+       inc hl                  ;@sprite
        cal find_sprite
 
-       inc hl
+       inc hl                  ;@x
        ld  d,(hl)              ;x
-       inc hl
+       inc hl                  ;@y
        ld  e,(hl)              ;y
 
        inc hl                  ;@movetype
@@ -1914,8 +1967,7 @@ enemyonscreenY:
        jr  c,remove_enemy      ;=off screen
 enemyonscreenX:
        ld  (hl),d              ;store new x
-       ld  a,c                 ;a = enemy type
-       or  a                   ;type 0? (pickup)
+       dec c                   ;is this a pickup? (c=%01 so ZF=1)
        jr  nz,check_enemyfire  ;no, a normal enemy; let em fire
        jr  firing_done         ;continue
 
@@ -1962,6 +2014,7 @@ keep_enemy:
        ld  (hl),a              ;next frame
        dec a                   ;1-16 -> 0-15
        ld  ix,spr_explosion    ;base sprite
+       inc hl                  ;@x
        cal explosion_stuff     ;display explosion
        jr  next_enemy
 
@@ -2108,7 +2161,7 @@ check_collision:
        psh bc                  ;counter
        psh hl                  ;pointer
        ld  a,(hl)
-       and %00000010           ;enemy status
+       and %10                 ;enemy status (%11=normal; %10=pickup)
        jr  z,check_next        ;2 or 3 = ok, otherwise: next enemy
        inc hl                  ;enemy#
 
@@ -2123,15 +2176,17 @@ collide_enemy:                  ;&&& include in Handle_enemy proc
        add a,(ix)              ;enemy width
        jp  m,check_next
 
-       inc hl
+       inc hl                  ;@y
        ld  a,(hl)              ;check y match
        sub d                   ;same as with x-check
        jr  nc,check_next       ;(=jp p)
        add a,6
        add a,(ix+1)            ;enemy height
        jp  m,check_next
-       dec hl
-       dec hl
+       dec hl                  ;@x
+       dec hl                  ;@sprite+1
+       dec hl                  ;@sprite
+       dec hl                  ;@occ
 
 take_pickup:
        psh hl                  ;we need hl
@@ -2139,9 +2194,9 @@ take_pickup:
        cal scoreInc
        pop hl                  ;we're done
 
-       ld  a,(hl)              ;load enemy type
-       or  a
-       jr  nz,collide          ;enemy when <>0
+       ld  a,(hl)              ;load enemy occ
+       rra                     ;if occ = %10 (can't be %00) then pickup
+       jr  c,collide           ;otherwise normal enemy so you collide
 
        psh hl
        ld  hl,your_pickup      ;your pickups
@@ -2155,13 +2210,11 @@ not_maxpickup:
        cal disp_icons          ;display altered pickupicons
        pop hl
 
-       dec hl                  ;to enemy occ
        xor a                   ;set to 0 = gone
        ld  (hl),a              ;remove
        jr  check_next          ;all done, next..
 
 collide:
-       dec hl
        ld  a,(hl)
        sub auch_ecollide
        ld  (hl),a
@@ -2308,24 +2361,27 @@ RandomY:                        ;HL = random Y 0..50 right side ((1..51)*16-1)
        pop bc
        ret
 
-scoreInc:
-       psh bc
-       ld  bc,(your_score)
-       add hl,bc
-       ld  (your_score),hl
-       pop bc
+scoreInc:                      ;increase score by HL
+       psh bc                  ;don't destroy bc (or any registers Xcept hl)
+       ld  bc,(your_score)     ;your current score in bc
+       psh af                  ;don't destroy a either
+       ld  a,(hardcore)        ;load hardcore mode settings in a
+       or  a                   ;is it zero?
+       jr  z,scoreincok        ;then skip the next instruction (score = ok)
+       add hl,hl               ;otherwise (hardcore) double the inc.score
+scoreincok:
+       pop af                  ;restore a register
+       add hl,bc               ;add bc to hl (or vice versa)
+       ld  (your_score),hl     ;save new increased score
+       pop bc                  ;all registers to what they were
        ret
 
 find_sprite:                   ;in:hl=enemy+type | out:ix=sprite to enemy
-       psh de
-       psh hl
-       ld  e,(hl)              ;e = enemy offset/2
-       ld  d,0                 ;de = e
-       ld  ix,spr_enemy00      ;first enemy sprite
-       add ix,de               ;add offset for current enemy
-       add ix,de               ;twice (offset stored as offset/2)
-       pop hl
-       pop de
+       ld  a,(hl)              ;sprite byte #1
+       .db $DD,$6F ;ld hx,a
+       inc hl                  ;@sprite+1
+       ld  a,(hl)              ;sprite byte #2
+       .db $DD,$67 ;ld lx,a    ;ld ix,(hl)
        ret
 
 BLACKLCD:
@@ -2359,16 +2415,17 @@ releasekeys:
 
 findenemyspecs:                        ;enemy #a specs in (hl); in:b=0; out:ac=?
        ld  hl,enemyspecs       ;enemy "0" specs
-       ld  c,a                 ;b=0; bc=c=a=type
-       add hl,bc               ;hl = enm#0 + type*1
        add a,a                 ;a=type*2
+       ld  c,a                 ;b=0; bc=c=a=type*2
+       add hl,bc               ;hl = enm#0 + type*2
        add a,a                 ;a=type*4 (max.type<64)
-       ld  c,a                 ;bc=type*8
-       add hl,bc               ;hl = enm#0 + type*5
-       add hl,bc               ;hl = enm#0 + type*9
+       ld  c,a                 ;bc=type*4
+       add hl,bc               ;hl = enm#0 + type*6
+       add hl,bc               ;hl = enm#0 + type*10
        ret                     ;hl = enemy specs
 
 ;--------------------------- game over / new game / death -------------------
+
 chartable:
        .db 0,".<>!",0,0,0,0  ;down,L,R,up
        .db 0,"xtoje0",0      ;enter..clear
@@ -2378,41 +2435,40 @@ chartable:
        .db $D9,"-pkfa6'"     ;on..alpha
        .db "54321*",0,$D0    ;F5..more
 
-save_hi:
-       ld  hl,_asapvar         ;find own variable
-       rst 20h                 ;cal _ABS_MOV10TOOP1
-       rst 10h                 ;cal _FINDSYM
+save_lvl:
+       ld  hl,storesave_end-storesave_start
+       psh hl                  ;size
+       ld  hl,storesave_start
+       psh hl                  ;dest
+       ld  hl,4+storesave_start-_asm_exec_ram
+       psh hl                  ;src
+       jr  storesmtn
 
-       xor a
-        ld  hl,4+storehi_start-_asm_exec_ram
-        add hl,de              ;hl=pointer to data in original prog
-        adc a,b
-        cal _SET_ABS_DEST_ADDR
-        xor a
-        ld  hl,storehi_start
-        cal _SET_ABS_SRC_ADDR
+save_hi:
         ld  hl,storehi_end-storehi_start
-        cal _SET_MM_NUM_BYTES
-        cal _mm_ldir           ;save done (cal \ ret)
-       jp  _RAM_PAGE_1
+       psh hl                  ;size
+        ld  hl,storehi_start
+       psh hl                  ;destination
+        ld  hl,4+storehi_start-_asm_exec_ram
+       psh hl                  ;source
 
-save_lvl:
+storesmtn:             ;stores data [stack=src; stack+1=dest; stack+2=size]
        ld  hl,_asapvar         ;find own variable
        rst 20h                 ;cal _ABS_MOV10TOOP1
        rst 10h                 ;cal _FINDSYM
 
-       xor a
-       ld  hl,4+storesave_start-_asm_exec_ram
-       add hl,de               ;hl=pointer to data in original prog
-       adc a,b
-       cal _SET_ABS_DEST_ADDR
-       xor a
-       ld  hl,storesave_start
-       cal _SET_ABS_SRC_ADDR
-       ld  hl,storesave_end-storesave_start
-       cal _SET_MM_NUM_BYTES
-       cal _mm_ldir            ;save done (cal \ ret)
-       jp  _RAM_PAGE_1
+       xor a                   ;bde=pointer to begin of real program
+       pop hl                  ;data offset
+       add hl,de               ;hl=pointer to data in real prog
+       adc a,b                 ;if hl overflow also increase a
+        cal _SET_ABS_DEST_ADDR ;destination = real program = ahl
+        xor a                  ;RAM page #0
+       pop hl                  ;data position in normal program ($D748+)
+        cal _SET_ABS_SRC_ADDR  ;set as source (ahl)
+       pop hl                  ;size
+        cal _SET_MM_NUM_BYTES  ;set
+        cal _mm_ldir           ;copy data to real program
+       jp  _RAM_PAGE_1         ;and finally: reset ram page
 
 game_over:                     ;stack=+0
        cal BLACKLCD            ;clear screen
@@ -2559,8 +2615,34 @@ New_game:                        ;stack must be +1 (so change the jp in cal :)
 dispshipsloop:
        psh bc                  ;counter
        psh de                  ;position
-       cal putwidesprite       ;display
+       ld  h,e
+       ld  l,40                ;x=40
+       ld  (_penCol),hl        ;small cursor position
+       psh ix                  ;ix destroyed by _vputmap
+       ld  hl,txt_difhardcore  ;hardcore ships text
+       ld  a,b                 ;ship displaying (4 to 1)
+       dec a                   ;minus 1 (3..0)
+       psh af
+       and %10                 ;gives 1,1,0,0 (for ships 0,0,1,1)
+       jr  z,dispdifficulty    ;0 indicates hardcore difficulty ship
+       ld  hl,txt_difnormal    ;normal difficulty ships text
+dispdifficulty:
+       cal _vputs              ;display difficulty
+       ld  a,95
+       ld  (_penCol),a         ;set x=95
+       pop af                  ;ship nr (backwards 3..0)
+       ld  hl,txt_updouble     ;updouble for ships 1
+       and %1                  ;gives 0,1,0,1 (for ships 0,1,0,1)
+       jr  nz,dispsbeam
+       ld  hl,txt_tailbeam     ;tailbeam for ships 0
+dispsbeam:
+       cal _vputs              ;display special beam type
+       pop ix
        pop de
+       psh de                  ;peek de
+       cal putwidesprite       ;display ship
+       pop de
+
        ld  bc,spr_ship01i-spr_ship01+2
        add ix,bc               ;go to next ship
        ld  a,12                ;below the previous one
@@ -2596,6 +2678,7 @@ selnotup:
 startthenewgame:
        ld  hl,spr_ship01-(spr_ship02-spr_ship01)
        ld  de,spr_ship02-spr_ship01
+       psh bc                  ;save b (ship#)
        inc b                   ;your ship #0-3++
        ld  a,b                 ;ship #1-4
 searchyourship:
@@ -2603,8 +2686,11 @@ searchyourship:
        dnz searchyourship
        ld  (your_ship),hl
        and 1                   ;gives: 1,0,1,0 for the ships
-       inc a                   ;1 or 2
+       inc a                   ;ships now give 1,2,1,2
        ld  (your_extramode),a  ;sets tail beam or up double (1 or 2)
+       pop af                  ;ship# 0..3
+       and %10                 ;ships give 0,0,1,1
+       ld  (hardcore),a        ;hardcore mode set for ships 3 and 4
        xor a                   ;ld a,0
        ld  (your_score),a      ;reset score
        ld  (your_score+1),a    ;reset score (0)
@@ -2622,8 +2708,8 @@ searchyourship:
 
 You_die:                       ;stack must be +1
        pop hl                  ;restore stack
-       ld  a,12
-       ld  (your_armor),a      ;12 HPs/shields
+       ld  a,24
+       ld  (your_armor),a      ;24 HPs/shields
        ld  a,(your_lives)      ;load lives left
        dec a                   ;decrease lives
        ld  (your_lives),a      ;if lives=0ffh GO
@@ -2667,8 +2753,11 @@ Next_level:                      ;stack must be +1
        cal scoreInc            ;update score
 
 samelevel:
-       ld  hl,(your_ship)
-       ld  (your_shipspr),hl
+       ld  hl,invertmode
+       ld  de,_invert          ;sets B<>W mode
+       ldi                     ;ld (_invert),(invertmode)
+       ld  de,your_shipspr     ;sets your ship's sprite
+       ldi                     ;ld (your_shipspr),(your_ship)
 
        ld  a,80
        ld  (nextevent),a       ;time to first enemy appearance
@@ -2961,8 +3050,8 @@ PutWhere =$-2
 ;------------------------------- sprites ------------------------------------
 ;----------------------------------------------------------------------------
 
-spr_ship01:
-       .db 7,7         ;ship alpha class
+spr_ship01:            ;(normal; up double)
+       .db 7,7         ;ship alpha class (vic viper)
        .db %11000000   ;██
        .db %11110000   ;████
        .db %01111110   ; ██████
@@ -2972,34 +3061,15 @@ spr_ship01:
        .db %11000000   ;██
 spr_ship01i:
        .db 8,7
-       .db %11000010   ;██    █
-       .db %11110001   ;████   █
-       .db %01111111   ; ███████
+       .db %11001010   ;██  █ █
+       .db %11110101   ;████ █ █
+       .db %01111110   ; ██████
        .db %11101001   ;███ █  █
-       .db %01111111   ; ███████
-       .db %11110001   ;████   █
-       .db %11000010   ;██    █
-
-spr_ship02:
-       .db 7,7         ;XC1701II ship
-       .db %11110000   ;████
-       .db %10001100   ;█   ██
-       .db %11110010   ;████  █
-       .db %01011110   ; █ ████
-       .db %11110010   ;████  █
-       .db %10001100   ;█   ██
-       .db %11110000   ;████
-spr_ship02i:
-       .db 7,7
-       .db %11110000   ;████
-       .db %10011100   ;█  ███
-       .db %11111110   ;███████
-       .db %01011110   ; █ ████
-       .db %11111110   ;███████
-       .db %10011100   ;█  ███
-       .db %11110000   ;████
+       .db %01111110   ; ██████
+       .db %11110101   ;████ █ █
+       .db %11001010   ;██  █ █
 
-spr_ship03:
+spr_ship02:            ;(normal; tail beam)
        .db 7,7         ;ship gamma class
        .db %11111000   ;█████
        .db %01100000   ; ██
@@ -3008,7 +3078,7 @@ spr_ship03:
        .db %11111100   ;██████
        .db %01100000   ; ██
        .db %11111000   ;█████
-spr_ship03i:
+spr_ship02i:
        .db 8,7
        .db %11111010   ;█████ █
        .db %01100001   ; ██    █
@@ -3018,8 +3088,8 @@ spr_ship03i:
        .db %01100001   ; ██    █
        .db %11111010   ;█████ █
 
-spr_ship04:
-       .db 7,7         ;ship delta class
+spr_ship03:            ;(hardcore; up double)
+       .db 7,7         ;ship delta class (lord british)
        .db %11000000   ; ██
        .db %11110000   ; ████
        .db %11111100   ; ██████
@@ -3027,34 +3097,34 @@ spr_ship04:
        .db %11111100   ; ██████
        .db %11110000   ; ████
        .db %11000000   ; ██
-spr_ship04i:
+spr_ship03i:
        .db 8,7
-       .db %11000010   ; ██    
-       .db %11110001   ; ████   █
+       .db %11111100   ; █████
+       .db %11110010   ; ████  █
        .db %11111101   ; ██████ █
        .db %01100011   ;  ██   ██
        .db %11111101   ; ██████ █
-       .db %11110001   ; ████   █
-       .db %11000010   ; ██    
+       .db %11110010   ; ████  █
+       .db %11111100   ; █████
 
-spr_ship05:
-       .db 7,7         ;ship beta class
-       .db %11100000   ;███
-       .db %11111000   ;█████
-       .db %01111100   ; ████
-       .db %01110010   ; ███  
-       .db %01111100   ; ████
-       .db %11111000   ;█████
-       .db %11100000   ;███
-spr_ship05i:
-       .db 8,7
-       .db %11100010   ;███   
-       .db %11111001   ;█████  
-       .db %01111101   ; █████ 
-       .db %01110011   ; ███  ██
-       .db %01111101   ; █████ 
-       .db %11111001   ;█████  
-       .db %11100010   ;███   
+spr_ship04:            ;(hardcore; tail beam)
+       .db 7,7         ;XC1701II ship
+       .db %11110000   ;████
+       .db %10001100   ;█   ██
+       .db %11110010   ;████  
+       .db %01011110   ; █ ███
+       .db %11110010   ;████  
+       .db %10001100   ;█   ██
+       .db %11110000   ;████
+spr_ship04i:
+       .db 7,7
+       .db %11110000   ;███
+       .db %10011100   ;█  ██
+       .db %11111110   ;██████
+       .db %01011110   ; █ ████
+       .db %11111110   ;██████
+       .db %10011100   ;█  ██
+       .db %11110000   ;███
 
 auch_bullet  = 1       ;damage to you when hit by an enemy bullet
 auch_ground  = 5       ;the same when you hit the ground/ceiling
@@ -3295,9 +3365,9 @@ weapondata:
        .db  1,1,%01110010,2,%10010010,2,%00110010,2    ;4 triple
        .db  3,2,%01110011,2,%10010011,2,%00110011,2    ;5
        .db  6,2,%01110011,2,%10010100,2,%00110011,2    ;6
-       .db  8,3,%01110100,2,%10010100,2,%00110100,2    ;7
-       .db 12,3,%01110110,2,%10010110,2,%00110110,2    ;8
-       .db 16,4,%01110110,2,%10010110,2,%00110110,2    ;9
+       .db  9,3,%01110100,2,%10010100,2,%00110100,2    ;7
+       .db 13,3,%01110110,2,%10010110,2,%00110110,2    ;8
+       .db 18,4,%01110110,2,%10010110,2,%00110110,2    ;9
 maxweapon  = 9
        .db  1,1,%11100100,3,%00000000,0,%00000000,0    ;1 single laser
        .db  2,3,%11100011,3,%00000000,0,%00000000,0    ;2 short
@@ -3460,11 +3530,16 @@ spr_dividerline:
 txt_email:     .db "www.shiar.org ",127 ;title screen
                .db " shiar0@hotmail.com",0
 _txt_email       = $3A01 ;$3A1E=just email
-txt_about:     .db "v0.99.820 ",127," by Shiar",0 ;right behind txt_email
+txt_about:     .db "v0.99.829 ",127," by Shiar",0 ;right behind txt_email
 _txt_about       = $3321
 txt_menu1:     .db "NEW GAME",0
 txt_menu2:     .db "CONTINUE",0
 
+txt_difhardcore:.db "Hardcore!",0
+txt_difnormal: .db "Normal",0
+txt_updouble:  .db "Up Double",0
+txt_tailbeam:  .db "Tail Beam",0
+
 txt_level:     .db "LEVEL ",0 ;new level screen
 txt_lives:     .db   "Lx0",0
 txt_savekey:   .db "Press [F1] to save",0
@@ -3488,21 +3563,24 @@ hiscore         .dw 0                   ;default hiscore
 hiname         .db "shiar.99",0        ;   "       "    name
 storehi_end:
 
+invertmode:     cpl                    ;saves B<>W mode setting        cpl
+
 storesave_start:                       ;--SAVED GAME--                 defs:
-level          .db 10                  ;level number                   1
-levelp         .dw level09             ;pointer to level data          lev00
+your_ship      .dw spr_ship01          ;your sprite (^invertmode^)     sprs1
+level          .db  1                  ;level number                   1
+levelp         .dw level00             ;pointer to level data          lev00
 pickuptimer    .db  4                  ;counts when to place a pickup  4
-your_ship      .dw spr_ship01          ;your sprite                    sprs1
 your_extramode .db  1                  ;you have tail or double        1
 your_score     .dw  0                  ;current score                  0
-your_pickup    .db  3                  ;pickups already picked up      0
+your_pickup    .db  0                  ;pickups already picked up      0
 your_occ       .db  0                  ;0=normal 1..16=exploding       0
 your_shield    .db  0                  ;invincibility left             0
-your_armor     .db 12                  ;HP left                        12
+your_armor     .db 24                  ;HP left                        12
 your_lives     .db  3                  ;lives left                     3
 your_weapon    .db  3                  ;current weapon upgrade         0
 your_multiples .db  0                  ;multiples present              0
 your_extra     .db  0                  ;extra beam present             0
+hardcore       .db  0                  ;hardcore mode if non-0         0
 storesave_end:
 
 time2invert:   .db 0                   ;time until b<>w switch (0 at startup)
@@ -3521,22 +3599,22 @@ levelstart:     ;[y-pos] [x-pos] [text,0] [SFX lines; 0=more text] [-1=end]
        .db 25,33,"Imperial ships have",0,0
        .db 31,9,"been sent to intercept you",0,31-25+6,-1
 
-       .db 9
+       .db 30
 level00:.db 5,2,4,2,1,1
        .db 28,73,13
        .db %00,0,0,1,1
 
-       .db 30 ;boss for level01
+       .db 31 ;boss for level01
 level01:.db 2,2,4 ;enemies
        .db 26,70,20
        .db %00,0,0,1,1
 
-       .db 31
+       .db 32
 level02:.db 3,2,3,4
        .db 20,60,60
        .db %00,0,0,1,1
 
-       .db 32
+       .db 33
 level03:.db 4,3,4,5,6
        .db 17,40,75
        .db %00,0,0,1,1
@@ -3552,34 +3630,34 @@ level03:.db 4,3,4,5,6
        .db 38,1,"lose them inthere.",0,38-24+6,-1
 
 ;---- approaching asteroid belt
-       .db 33
+       .db 34
 level04:.db 5,7,7,8,10,11
        .db 17,27,70
        .db %00,0,0,1,1
 
 ;---- light asteroid belt
-       .db 34
+       .db 35
 level05:.db 7,9,10,8,10,11,11,13
        .db 12,24,80
        .db %00,0,0,1,1
 
 ;---- inside asteroid belt
-       .db 35
+       .db 36
 level06:.db 10,9,10,11,11,13,12,12,13,14,14
        .db 7,18,180
        .db %00,0,0,1,1
 
-       .db 36
+       .db 37
 level07:.db 4,15,16,17,5
        .db 22,29,62
        .db %00,0,0,1,1 ;-1=%11111111=line
 
-       .db 37
+       .db 38
 level08:.db 5,15,16,17,18,18
        .db 20,38,57
        .db %00,0,0,1,1
 
-       .db 38
+       .db 39
 level09:.db 3,18,19,20
        .db 19,63,57
        .db %00,0,0,1,1
@@ -3589,65 +3667,68 @@ level09:.db 3,18,19,20
 
 endlevel = 10
 
-pickupfreq = 18
+pickupfreq = 10
 
 ;------------------------------ enemies -------------------------------------
 
 ;format:       [HP64] [000000:HP 00:occ] [sprite] [xpos] [appearance(ypos)]
 ;              [movetype] [time2fire] [firefreq] [firetype]
+;occ:          00=no enemy; 01=exploding (sprite=frame); 10=pickup; 11=enemy
 ;appearances:  1=random; 2=lure; 3=halflure
 ;movetypes:    1=updown; 2=1/4x; 3=1/2x; 4=3/4x; 5=3/2x; 6=2x; 7=ylure50%;
 ;              7=ylure; 8=ylure50%; 9=x; 10=x+y-lure 50%; 11=-1/2x; 12=-1x
 ;firetypes:    1=normal; 6=aiming; 7=triple; 8=double
 
-enemyspecs: ;sprites use 418/512 bytes
-       .db 0,%00000111,(spr_enemy00-spr_enemy00)/2,128,2,03, 0, 0,1 ;pickup
-;1-6=basic enemies     ,                           ,   , ,  ,  ,  ,
-       .db 0,%00000110,(spr_enemyE0-spr_enemy00)/2,128,1,00,12, 0,1 ;intro
-       .db 0,%00010010,(spr_enemyE1-spr_enemy00)/2,128,1,00,10, 0,1 ;weak
-       .db 0,%00110010,(spr_enemyE4-spr_enemy00)/2,128,1,03, 6,50,1 ;slow
-       .db 0,%00100110,(spr_enemyE2-spr_enemy00)/2,128,1,00, 1, 0,1
-       .db 0,%00101110,(spr_enemyE3-spr_enemy00)/2,128,3,00,19,39,8 ;heavy
-       .db 0,%00101010,(spr_enemyE5-spr_enemy00)/2,128,3,05, 1, 0,1 ;fast
-;7-9=backwards enemies ,                           ,   , ,  ,  ,  ,
-       .db 0,%00011110,(spr_enemyB1-spr_enemy00)/2,000,3,11,19,92,1
-       .db 0,%00101110,(spr_enemyB2-spr_enemy00)/2,000,1,12,11,45,1
-       .db 0,%00110110,(spr_enemyB3-spr_enemy00)/2,000,1,11,10,41,8 ;small
-;10-14=asteroid        ,                           ,   , ,  ,  ,  ,
-       .db 0,%00100110,(spr_enemyA1-spr_enemy00)/2,128,1,04, 0, 0,1
-       .db 0,%00111110,(spr_enemyA2-spr_enemy00)/2,128,1,00, 0, 0,1
-       .db 0,%01011010,(spr_enemyA3-spr_enemy00)/2,128,1,05, 0, 0,1
-       .db 1,%00001010,(spr_enemyA4-spr_enemy00)/2,128,1,03, 0, 0,1 ;slow+hard
-       .db 0,%00111110,(spr_enemyA4-spr_enemy00)/2,128,1,06, 0, 0,1
-;15-20=improved enemies,                           ,   , ,  ,  ,  ,
-       .db 0,%01001010,(spr_enemyG1-spr_enemy00)/2,128,3,00, 3,40,1
-       .db 0,%01011110,(spr_enemyG2-spr_enemy00)/2,128,3,00, 1,36,1
-       .db 0,%00110010,(spr_enemyG5-spr_enemy00)/2,128,1,01, 9,52,1 ;updown
-       .db 0,%01111010,(spr_enemyG3-spr_enemy00)/2,128,3,04, 7,99,7 ;3x
-       .db 0,%10110110,(spr_enemyG4-spr_enemy00)/2,128,2,01,17, 0,7 ;updown3x
-       .db 0,%10001011,(spr_enemyG6-spr_enemy00)/2,128,2,07,62,60,8 ;lure
-;21-29=unused,         ,                           ,   , ,  ,  ,  ,
-       .db 0,%00000011,(spr_enemy00-spr_enemy00)/2,128,2,03, 0, 0,1 ;21
-       .db 0,%00000011,(spr_enemy00-spr_enemy00)/2,128,2,03, 0, 0,1 ;22
-       .db 0,%00000011,(spr_enemy00-spr_enemy00)/2,128,2,03, 0, 0,1 ;23
-       .db 0,%00000011,(spr_enemy00-spr_enemy00)/2,128,2,03, 0, 0,1 ;24
-       .db 0,%00000011,(spr_enemy00-spr_enemy00)/2,128,2,03, 0, 0,1 ;25
-       .db 0,%00000011,(spr_enemy00-spr_enemy00)/2,128,2,03, 0, 0,1 ;26
-       .db 0,%00000011,(spr_enemy00-spr_enemy00)/2,128,2,03, 0, 0,1 ;27
-       .db 0,%00000011,(spr_enemy00-spr_enemy00)/2,128,2,03, 0, 0,1 ;28
-       .db 0,%00000011,(spr_enemy00-spr_enemy00)/2,128,2,03, 0, 0,1 ;29
-;30-33=first bosses    ,                           ,   , ,  ,  ,  ,
-       .db 1,%00101011,(spr_boss2  -spr_enemy00)/2,127,1,09,20,12,1 ;small
-       .db 1,%00110011,(spr_boss1  -spr_enemy00)/2,127,1,09,15,11,8 ;normal
-       .db 1,%01001011,(spr_boss1  -spr_enemy00)/2,127,3,10,10,11,1 ;moving
-       .db 0,%11111111,(spr_boss3  -spr_enemy00)/2,127,2,10, 1, 4,1 ;weak+rapidfire
-;34-35=asteroid bosses ,                           ,   , ,  ,  ,  ,
-       .db 2,%00001011,(spr_bossA1 -spr_enemy00)/2,127,1,10,36,14,6
-       .db 2,%00110011,(spr_bossA1 -spr_enemy00)/2,127,2,10,28,12,6
-;36-38=big bosses      ,                           ,   , ,  ,  ,  ,
-       .db 2,%00000011,(spr_bossB1 -spr_enemy00)/2,127,3,08,31, 8,7
-       .db 2,%00100111,(spr_bossB2 -spr_enemy00)/2,127,3,08,13, 7,7
-       .db 2,%00100111,(spr_bossB2 -spr_enemy00)/2,127,3,08,13, 7,7
+enemyspecs:  ;10 bytes/enemy | max.enemies <64 | sprites use <768 bytes
+       .db 0,%00000110,spr_enemy00&255,spr_enemy00/256,128,2,03, 0, 0,1 ;pickup
+;1-6=basic enemies     ,               ,               ,   , ,  ,  ,  ,
+       .db 0,%00000111,spr_enemyE0&255,spr_enemyE0/256,128,1,00,12, 0,1 ;intro
+       .db 0,%00010011,spr_enemyE1&255,spr_enemyE1/256,128,1,00,10, 0,1 ;weak
+       .db 0,%00110011,spr_enemyE4&255,spr_enemyE4/256,128,1,03, 6,50,1 ;slow
+       .db 0,%00100111,spr_enemyE2&255,spr_enemyE2/256,128,1,00, 1, 0,1
+       .db 0,%00101111,spr_enemyE3&255,spr_enemyE3/256,128,3,00,19,39,8 ;heavy
+       .db 0,%00101011,spr_enemyE5&255,spr_enemyE5/256,128,3,05, 1, 0,1 ;fast
+;7-9=backwards enemies ,               ,               ,   , ,  ,  ,  ,
+       .db 0,%00011111,spr_enemyB1&255,spr_enemyB1/256,000,3,11,19,92,1
+       .db 0,%00101111,spr_enemyB2&255,spr_enemyB2/256,000,1,12,11,45,1
+       .db 0,%00110111,spr_enemyB3&255,spr_enemyB3/256,000,1,11,10,41,8 ;small
+;10-14=asteroid        ,               ,               ,   , ,  ,  ,  ,
+       .db 0,%00100111,spr_enemyA1&255,spr_enemyA1/256,128,1,04, 0, 0,1
+       .db 0,%00111111,spr_enemyA2&255,spr_enemyA2/256,128,1,00, 0, 0,1
+       .db 0,%01011011,spr_enemyA3&255,spr_enemyA3/256,128,1,05, 0, 0,1
+       .db 1,%00001011,spr_enemyA4&255,spr_enemyA4/256,128,1,03, 0, 0,1 ;slow+hard
+       .db 0,%00111111,spr_enemyA4&255,spr_enemyA4/256,128,1,06, 0, 0,1
+;15-20=improved enemies,               ,               ,   , ,  ,  ,  ,
+       .db 0,%01001011,spr_enemyG1&255,spr_enemyG1/256,128,3,00, 3,40,1
+       .db 0,%01011111,spr_enemyG2&255,spr_enemyG2/256,128,3,00, 1,36,1
+       .db 0,%00110011,spr_enemyG5&255,spr_enemyG5/256,128,1,01, 9,52,1 ;updown
+       .db 0,%01111011,spr_enemyG3&255,spr_enemyG3/256,128,3,04, 7,99,7 ;3x
+       .db 0,%10110111,spr_enemyG4&255,spr_enemyG4/256,128,2,01,17, 0,7 ;updown3x
+       .db 0,%10001011,spr_enemyG6&255,spr_enemyG6/256,128,2,07,62,60,8 ;lure
+;21-29=unused,         ,               ,               ,   , ,  ,  ,  ,
+       .db 0,%00000011,spr_enemy00&255,spr_enemy00/256,128,2,03, 0, 0,1 ;21
+       .db 0,%00000011,spr_enemy00&255,spr_enemy00/256,128,2,03, 0, 0,1 ;22
+       .db 0,%00000011,spr_enemy00&255,spr_enemy00/256,128,2,03, 0, 0,1 ;23
+       .db 0,%00000011,spr_enemy00&255,spr_enemy00/256,128,2,03, 0, 0,1 ;24
+       .db 0,%00000011,spr_enemy00&255,spr_enemy00/256,128,2,03, 0, 0,1 ;25
+       .db 0,%00000011,spr_enemy00&255,spr_enemy00/256,128,2,03, 0, 0,1 ;26
+       .db 0,%00000011,spr_enemy00&255,spr_enemy00/256,128,2,03, 0, 0,1 ;27
+       .db 0,%00000011,spr_enemy00&255,spr_enemy00/256,128,2,03, 0, 0,1 ;28
+       .db 0,%00000011,spr_enemy00&255,spr_enemy00/256,128,2,03, 0, 0,1 ;29
+;30-34=first bosses    ,               ,               ,   , ,  ,  ,  ,
+       .db 1,%00100011,spr_boss01 &255,spr_boss01 /256,127,1,09,35,50,7 ;triple
+       .db 1,%00101011,spr_boss02 &255,spr_boss02 /256,127,1,09,20,12,1 ;small
+       .db 1,%00111111,spr_boss03 &255,spr_boss03 /256,127,1,09,15,11,8 ;normal
+       .db 1,%01001111,spr_boss04 &255,spr_boss04 /256,127,3,10,10,11,1 ;moving
+       .db 0,%11111111,spr_boss05 &255,spr_boss05 /256,127,2,10, 1, 4,1 ;weak+rapidfire
+;35-36=asteroid bosses ,               ,               ,   , ,  ,  ,  ,
+       .db 2,%00001011,spr_bossA1 &255,spr_bossA1 /256,127,1,10,36,14,6
+       .db 2,%00110011,spr_bossA1 &255,spr_bossA1 /256,127,2,10,28,12,6
+;37-40=big bosses      ,               ,                   ,   , ,  ,  ,  ,
+       .db 2,%00000011,spr_boss07 &255,spr_boss07 /256,127,3,08,31, 8,7
+       .db 2,%00100111,spr_boss06 &255,spr_boss06 /256,127,3,08,13, 7,7
+       .db 2,%00100111,spr_boss08 &255,spr_boss08 /256,127,1,08,18, 8,9  ;quad
+       .db 2,%10010011,spr_boss09 &255,spr_boss09 /256,127,1,08,21, 9,10 ;6x
 
 spr_enemy00:
        .db 10,8                        ;pickup
@@ -3677,7 +3758,6 @@ spr_enemyE0:
        .db %01101000                   ; ██ █
        .db %00100100                   ;  █  █
        .db %00011100                   ;   ███
-       .db 0
 spr_enemyE1:
        .db 6,7                         ;weak
        .db %00111100                   ;  ████
@@ -3687,7 +3767,6 @@ spr_enemyE1:
        .db %10111000                   ;█ ███
        .db %01000100                   ; █   █
        .db %00111100                   ;  ████
-       .db 0
 spr_enemyE2:
        .db 6,6                         ;weak
        .db %00111100                   ;  ████
@@ -3713,7 +3792,6 @@ spr_enemyE4:
        .db %10011000                   ;█  ██
        .db %01101000                   ; ██ █
        .db %00011100                   ;   ███
-       .db 0
 spr_enemyE5:
        .db 6,6                         ;speedy
        .db %00010100                   ;   █ █
@@ -3740,7 +3818,6 @@ spr_enemyB2:
        .db %01110100                   ; ███ █
        .db %01001000                   ; █  █
        .db %11110000                   ;████
-       .db 0
 spr_enemyB3:
        .db 5,7
        .db %11100000                   ;███
@@ -3750,7 +3827,6 @@ spr_enemyB3:
        .db %01111000                   ; ████
        .db %01010000                   ; █ █
        .db %11100000                   ;███
-       .db 0
 
 spr_enemyA1:
        .db 7,6                         ;asteroid one
@@ -3769,7 +3845,6 @@ spr_enemyA2:
        .db %11111111                   ;████████
        .db %10110110                   ;█ ██ ██
        .db %01100000                   ; ██
-       .db 0
 spr_enemyA3:
        .db 8,8                         ;asteroid three
        .db %00011110                   ;   ████
@@ -3836,7 +3911,6 @@ spr_enemyG6:
        .db %10011010                   ;█  ██ █
        .db %01110100                   ; ███ █
        .db %00001111                   ;    ████
-       .db 0
 
 spr_enemyS1:
        .db 6,6                         ;solid
@@ -3880,7 +3954,6 @@ spr_enemyN1:
        .db %00001110                   ;    ███
        .db %11110001                   ;████   █
        .db %00111110                   ;  █████
-       .db 0
 spr_enemyN2:
        .db 8,7                         ;
        .db %00111110                   ;  █████
@@ -3890,7 +3963,6 @@ spr_enemyN2:
        .db %11111111                   ;████ ███
        .db %00011101                   ;   ███ █
        .db %00111110                   ;  █████
-       .db 0
 spr_enemyN3:
        .db 8,7                         ;Nem3MSX jumper lvl#3
        .db %10111110                   ;█ █████
@@ -3900,7 +3972,6 @@ spr_enemyN3:
        .db %01111110                   ; ██████
        .db %01011101                   ; █ ███ █
        .db %10111110                   ;█ █████
-       .db 0
 spr_enemyN4:
        .db 8,8                         ;Stolen from XC1701II
        .db %01111110                   ; ██████
@@ -3922,31 +3993,34 @@ spr_enemyN5:
        .db %01010010                   ; █ █  █
        .db %01111100                   ;  ████
 
-spr_boss1:
-       .db 16,10                       ;.......:.......:
-       .db %00000001                   ;       ██████ ██
-       .db %00001110                   ;    ███   █ ███
-       .db %00110010                   ;  ██  █ ████
-       .db %01001101                   ; █  ██ ██
-       .db %11101011                   ;███ █ ██ █
-       .db %11101011                   ;███ █ ██ █
-       .db %01001101                   ; █  ██ ██
-       .db %00110010                   ;  ██  █ ████
-       .db %00001110                   ;    ███   █ ███
-       .db %00000001                   ;       ██████ ██
-       .db 10
-       .db %11111011
-       .db %00101110
-       .db %11110000
+spr_boss01:
+       .db 9,12                        ;.......:.2.....:
+       .db %00000111                   ;     ████
+       .db %00011100                   ;   ███
+       .db %00101010                   ;  █ █ █
+       .db %01011011                   ; █ ██ ██
+       .db %10100110                   ;█ █  ██ █
+       .db %11010101                   ;██ █ █ █
+       .db %11010101                   ;██ █ █ █
+       .db %10100110                   ;█ █  ██ █
+       .db %01011011                   ; █ ██ ██
+       .db %00101010                   ;  █ █ █
+       .db %00011100                   ;   ███
+       .db %00000111                   ;     ████
+       .db 12
        .db %10000000
-       .db %01000000
-       .db %01000000
+       .db %00000000
+       .db %00000000
+       .db %00000000
        .db %10000000
-       .db %11110000
-       .db %00101110
-       .db %11111011
-       .db 0
-spr_boss2:
+       .db %00000000
+       .db %00000000
+       .db %10000000
+       .db %00000000
+       .db %00000000
+       .db %00000000
+       .db %10000000
+spr_boss02:
        .db 12,12                       ;.......:....5..:
        .db %00011110                   ;   ████
        .db %01100001                   ; ██    ██
@@ -3972,7 +4046,55 @@ spr_boss2:
        .db %10100000
        .db %01100000
        .db %10000000
-spr_boss3:
+spr_boss03:
+       .db 16,10                       ;.......:.......:
+       .db %00000001                   ;       ██████ ██
+       .db %00001110                   ;    ███   █ ███
+       .db %00110010                   ;  ██  █ ████
+       .db %01001101                   ; █  ██ ██
+       .db %11101011                   ;███ █ ██ █
+       .db %11101011                   ;███ █ ██ █
+       .db %01001101                   ; █  ██ ██
+       .db %00110010                   ;  ██  █ ████
+       .db %00001110                   ;    ███   █ ███
+       .db %00000001                   ;       ██████ ██
+       .db 10
+       .db %11111011
+       .db %00101110
+       .db %11110000
+       .db %10000000
+       .db %01000000
+       .db %01000000
+       .db %10000000
+       .db %11110000
+       .db %00101110
+       .db %11111011
+spr_boss04:
+       .db 16,10                       ;.......:.......:
+       .db %00000000                   ;           █████
+       .db %00000000                   ;        ███    █
+       .db %00000111                   ;     ████ █████
+       .db %00111101                   ;  ████ █ █ ████
+       .db %01001010                   ; █  █ █ ██ ███ █
+       .db %10110110                   ;█ ██ ██ ███  █ █
+       .db %10110110                   ;█ ██ ██ ███  █ █
+       .db %01001010                   ; █  █ █ ██ ███ █
+       .db %00111101                   ;  ████ █ █ ████
+       .db %00000111                   ;     ████ █████
+       .db 12                          ;        ███    █
+       .db %00011111                   ;           █████
+       .db %11100001
+       .db %10111110
+       .db %01011110
+       .db %11011101
+       .db %11100101
+       .db %11100101
+       .db %11011101
+       .db %01011110
+       .db %10111110
+       .db %11100001
+       .db %00011111
+spr_boss05:
        .db 16,10                       ;.......:.......:
        .db %11111110                   ;███████
        .db %00000011                   ;      ███   ████
@@ -3995,7 +4117,7 @@ spr_boss3:
        .db %11100001
        .db %10001111
 spr_bossA1:
-       .db 16,11                       ;AsteroidBoss one
+       .db 12,11                       ;AsteroidBoss one
        .db %00011110                   ;   ████
        .db %01110011                   ; ███  ███
        .db %01111111                   ; ███████ █
@@ -4017,9 +4139,41 @@ spr_bossA1:
        .db %11110000
        .db %11110000
        .db %11000000
-       .db 0
-spr_bossB1:
-       .db 16,18                       ;BigBoss one    :
+spr_boss06:
+       .db 16,15                       ;.......:.......:
+       .db %00001111                   ;    █████
+       .db %00111110                   ;  █████ █████
+       .db %01111101                   ; █████ █ ███████
+       .db %00000011                   ;      ██
+       .db %00000100                   ;     █  █
+       .db %00000011                   ;      █████
+       .db %00011110                   ;   ████ ██ ████
+       .db %11110011                   ;████  ██ █ █
+       .db %00011110                   ;   ████ ██ ████
+       .db %00000011                   ;      █████
+       .db %00000100                   ;     █  █
+       .db %00000011                   ;      ██
+       .db %01111101                   ; █████ █ ███████
+       .db %00111110                   ;  █████ █████
+       .db %00001111                   ;    █████
+       .db 15                          ;modelled after a Nemesis][MSX boss
+       .db %10000000
+       .db %11111000
+       .db %01111111
+       .db %00000000
+       .db %10000000
+       .db %11100000
+       .db %11011110
+       .db %01010000
+       .db %11011110
+       .db %11100000
+       .db %10000000
+       .db %00000000
+       .db %01111111
+       .db %11111000
+       .db %10000000
+spr_boss07:
+       .db 16,18                       ;.......:.......:
        .db %00000000                   ;         █ █
        .db %00000111                   ;     ███ ███
        .db %00000011                   ;      ████ █
@@ -4058,40 +4212,78 @@ spr_bossB1:
        .db %11010000
        .db %01110000
        .db %01010000
-spr_bossB2:
-       .db 16,15                       ;BigBoss two    :
-       .db %00001111                   ;    █████
-       .db %00111110                   ;  █████ █████
-       .db %01111101                   ; █████ █ ███████
-       .db %00000011                   ;      ██
-       .db %00000100                   ;     █  █
-       .db %00000011                   ;      █████
-       .db %00011110                   ;   ████ ██ ████
-       .db %11110011                   ;████  ██ █ █
-       .db %00011110                   ;   ████ ██ ████
-       .db %00000011                   ;      █████
-       .db %00000100                   ;     █  █
-       .db %00000011                   ;      ██
-       .db %01111101                   ; █████ █ ███████
-       .db %00111110                   ;  █████ █████
-       .db %00001111                   ;    █████
-       .db 15                          ;modelled after a Nemesis][MSX boss
+spr_boss08:
+       .db 14,14                       ;.......:......7:
+       .db %01100111                   ; ██  ████  ██
+       .db %11001011                   ;██  █ ██ █  ██
+       .db %10110000                   ;█ ██      ██ █
+       .db %10101111                   ;█ █ ██████ █ █
+       .db %01010000                   ; █ ██    ██ █
+       .db %01010011                   ; █ █  ██   █ █
+       .db %10100111                   ;█ █  ████ ██ █
+       .db %10100111                   ;█ █  ████ ██ █
+       .db %01010011                   ; █ █  ██   █ █
+       .db %01010000                   ; █ ██    ██ █
+       .db %10101111                   ;█ █ ██████ █ █
+       .db %10110000                   ;█ ██      ██ █
+       .db %11001001                   ;██  █ ██ █  ██
+       .db %01100111                   ; ██  ████  ██
+       .db 14
+       .db %10011000
+       .db %01001100
+       .db %00110100
+       .db %11010100
+       .db %00101000
+       .db %00010100
+       .db %10110100
+       .db %10110100
+       .db %00010100
+       .db %00101000
+       .db %11010100
+       .db %00110100
+       .db %01001100
+       .db %10011000
+spr_boss09:
+       .db 16,19                       ;.......:.......:
+       .db %01111011                   ; ████ ███
+       .db %10000110                   ;█    ██ █████
+       .db %00000011                   ;      ███ █
+       .db %00111011                   ;  ███ ██   ███
+       .db %00000111                   ;     ███ ███
+       .db %00001100                   ;    ██  ███ █
+       .db %00110111                   ;  ██ █████ █ ██
+       .db %01111011                   ; ████ ██  █ ██ █
+       .db %11100100                   ;███  █  ██ ██  █
+       .db %00000001                   ;    ██████ ██  █
+       .db %11100100                   ;███  █  ██ ██  █
+       .db %01111011                   ; ████ ██  █ ██ █
+       .db %00110111                   ;  ██ █████ █ ██
+       .db %00001100                   ;    ██  ███ █
+       .db %00000111                   ;     ███ ██
+       .db %00111011                   ;  ███ ██   ███
+       .db %00000011                   ;      ███ █
+       .db %10000110                   ;█    ██ █████
+       .db %01111011                   ; ████ ███
+       .db 19
        .db %10000000
        .db %11111000
-       .db %01111111
-       .db %00000000
-       .db %10000000
-       .db %11100000
-       .db %11011110
-       .db %01010000
-       .db %11011110
-       .db %11100000
-       .db %10000000
-       .db %00000000
-       .db %01111111
+       .db %10100000
+       .db %00011100
+       .db %01110000
+       .db %11101000
+       .db %11010110
+       .db %00101101
+       .db %11011001
+       .db %11011001
+       .db %11011001
+       .db %00101101
+       .db %11010110
+       .db %11101000
+       .db %01100000
+       .db %00011100
+       .db %10100000
        .db %11111000
        .db %10000000
-       .db 0
 
 ;----------------------------------------------------------------------------
 ;----------------------------- logo ------------------------------------------
@@ -4201,7 +4393,7 @@ logo_nemesis:
 ;      # after pause weapon will not be fired
 ;      # teacher key fixed (waits for GRAPH to be release before&after)
 ;
-; 0.99.820 -- 20.VIII.00 -- size 6500
+; 0.99.829 -- 29.VIII.00 -- size 6861
 ;
 ;      + you can have upto FOUR multiples! (~20 pixels apart)
 ;      * some optimizations: keycall, menu handling, port nops removed,
@@ -4234,6 +4426,21 @@ logo_nemesis:
 ;      * maximum different enemies increased from 28 to 63
 ;      * pickup sprite altered, small changes to some enemies
 ;      + new moves implemented: 75% speed and lure-while-moving
+;      # fixed the enemy aiming bullets procedure
+;      * enemies fire their bullets centered too! (even the large bosses)
+;      * you may NOT have any multiples together with beams, just lasers
+;      + added new enemy guns: quad- and 6x-fire!!
+;      * sprite table length increased to 768 bytes (stored DIV3)
+;      + ships 3/4 select hardcore mode: score and damage are doubled
+;      + first icon not only increases armor, but also activates shield for
+;         some time (shield halves damage and absorbs bullets in normal mode)
+;      + ship selection screen also shows ship specs (hardcore/tailbeam/etc)
+;      * shield looks different for each ship
+;      * hiscore/savegame procedure optimized (several bytes smaller)
+;      + B<>W mode setting will be stored
+;      * enemy sprite pointers stored as words (thus increasing sprite table
+;         length from 768B to 65kB, and increasing sprite calculation speed)
+;      * hardcore mode does _more_ than doubled damage (bulletsdamage +1)
 ;
 ;       + added        - removed       * changed       # bug fixed