Hey coders- Torpedo my Sea Wolf fantasy!

Trying to cram more code into the sea wolf test program, I also ultimately started removing unneeded letters. Trying to find every last way to free up a byte or 2 to improve the test rom was an interesting challenge that is so different than my normal software engineering work.
 
I completely rewrote the mine handling routines from the ground up to add the features I suggested above, and everything seems to be working -- and the game is a LOT more challenging.
Having 8 mines moving in at different speeds and directions at 3000 put might be a little aggressive -- perhaps making it increment at 2000 point intervals instead would make more sense.

I have 1 more change I want to make to the mines before I call it done... fortunately the new code is more efficient than the old, so the features didn't take much extra space.

Code:
3000   0FCE 01                          .db            $01                                                            ; Battleship
3001   0FCF                
3002   0FF7                             .org        $0ff7
3003   0FF7                             ;; $400 block checksums
3004   0FF7 79                          .db            $79                                            ; Patch byte for $c00 checksum

That's 40 bytes!

I get 16 will get used if I put the 2 extra mine explode 'words' back.
 
Ok... got my last change in.

Now the mines that go right to left have their tails flipped. By reusing some of the ship drawing code, this change actually saved a few bytes!

This means I'll have space to add in more mine hit 'words'.

(Note the new shape of the mines to prevent them from leaving trails when moving +/-2)

1731075350420.png
 
I'm going to drop the changed ROMs up on github for testing.

DIP Switch Changes:
DIP<2:1> = Misses allowed (16 / 14 / 12 / 10)
DIP<3> = Free Play
DIP<4> = ROM Test
DIP<5> = Erase high score (unchanged)
DIP<8:6> = Score for extended play (8000 / 7000 / 6000 / 5000 / 4000 / 3000 / 2000 / NONE)

I probably should come up with a different name for the game as well -- any suggestions?
 
Found and squished one more bug.

When you hit a mine, the original code set the flags bit to $00 instead of just clearing the active bit which stomped on my new FLIP bit, so when row 2/4 mines were respawned after being shot, the tails went the wrong way. It took 2 bytes to fix this, so now there's only 1 free byte in the ROM. :)

Code:
3030   0FF6             
3031   0FF7                             .org        $0ff7
 
so how do you change words for the mines? do you have letters already setup and then just point to them individually in the program or do you have and entire word premade that you point to that is then written on the screen. the idea of this seemed so easy at first thought but the constraints involved seems to bring a lot of other problems to complicate the project. I wonder if this effort has the same type of problems that they had with designing hardware and programming it for the apollo program where they had limited size to install a computer back in the days where a true computer filled a room. the memory of a computer was large arrays of ferrite core memory not microchips which limited due to weight and power requirements that the capsule could support. just think our cellphones have more power in them then the super computers that filled rooms in the day. our programming now is so wasteful compared to those programmers before who had to fight for every byte. which makes every byte you recover so sweet
 
so how do you change words for the mines? do you have letters already setup and then just point to them individually in the program or do you have and entire word premade that you point to that is then written on the screen. the idea of this seemed so easy at first thought but the constraints involved seems to bring a lot of other problems to complicate the project. I wonder if this effort has the same type of problems that they had with designing hardware and programming it for the apollo program where they had limited size to install a computer back in the days where a true computer filled a room. the memory of a computer was large arrays of ferrite core memory not microchips which limited due to weight and power requirements that the capsule could support. just think our cellphones have more power in them then the super computers that filled rooms in the day. our programming now is so wasteful compared to those programmers before who had to fight for every byte. which makes every byte you recover so sweet

There's a small 8-byte "data structure" for the mine explosion, that's used to call the string draw procedure twice.

First byte is a length, followed by the text.
The "A" is drawn a few lines higher, (first 2 byes) followed by the string with the 2 letters, the other 2 explosions characters, and $2F encodes 1 (non-drawn) blank space.

Code:
;; Addresses of mine hit data
TEMINE:
                .dw            TZAP                                                                            ; ZAP
                .dw            TWAM                                                                            ; WAM
                
                ;; Table from $0F40    (For ZAP)
TZAP:        
                .db            $01, $41, $04, $3D, $5A, $2F, $50, $3F        ; *ZAP*

                ;; Table from $0F42    (For WAM)
TWAM:
                .db            $01, $41, $04, $3D, $57, $2F, $4D, $3F        ; *WAM*

The original code had pointers to ZAP and WAM and used bit 1 of a "random number" to index into the table... which was a waste of code since the table entries are 8 bytes long, so using bit 3 elminates the need for the first indirection.

For the final code I added 2 more entries and used bits 3 and 4 to index.

The Apollo engineers could only wish they had something as advanced as an 8080 to work with.
 
Nice work!

I'd like to think that the programmers were original Batman fans but sadly didn't have enough space to fit all the interjections.

Zap & Wam may have been Zwapp! Whammm! :)

Now to get my Seawolf working 100% again, will tackle that project next to try this.

 
I gave it a whirl for a couple of games....awesome!

My previous high score in mame on the original roms was a paltry 5,100. I moved that up to 5,300 on my second try with the new romset :ROFLMAO:
 
I have installed Seawolf'24 into my machine and it is absolutely fantastic. A literal game-changer!

I am loving the opportunity to extend my previous best game and beat my (5 digit!) high score.

I never knew I needed the mines to go both directions but I love the added challenge of planning your shot accordingly. Brilliant addition!

Massive thanks to HudsonArcade for realizing my dream so brilliantly!

👏👏👏
 
3 digit mods pushed to a branch.
By changing some variables at the top of "seawolf.asm", it can be set up to generate the original code or the 3 digit scoring code.

I plan to add the code to not redraw/replace all of the mines on reload to this branch next (with the option to do the multiple speeds and directions).

The "miss" code has a lot more changes, so I'm not sure if that'll look too messy with all the code #IF'ed in and out.
 
Just had a nice game of SeaWolf'24. Set to 10 misses and I managed 32500.

Now to shoot for 40K!

I can't say enough about how terrific this new code is!

The version you're running has a bug in the dip switch settings to pick # of misses and one of the ROM checksums is bad.
That should be all fixed now (along with a flag in the code to clear or not-clear the high score at reset you want to clear it if running on original hardware, until I get off my ass and finish the redesigned motherboards with NVRAM).
 
Back
Top Bottom