100 Days of Code Day 50
Today I did three exercism exercises on the Javascript track.
- Food Chain – Programmatically build up the ‘There was an old lady that swallowed a fly’ nursery rhyme.
- House – Pretty much the same as except it is the nursery rhyme ‘This is the house that Jack built’. (Strange I got those two in a row and that I’ll have 12 days of Christmas soon.)
- ISBN verifier – I got a working version where I parsed the numbers as I went. The community solutions were much better simply removing the dashes and using a regular expression to test for bad characters with some map and reduce added in. So in a rare move I did the same thing for my code and put in a second version.
On to the Gameboy Coding Adventure book. It looks like I bumped into new name changes in hardware.rgbinc (see table below). First example sets some values in the palette. You will need to use BGB’s VRAM viewer to see them. The sample does nothing otherwise.
The second one gave me trouble. I really just shows a tilemap in gameboy color mode. The problem was it didn’t say how to use the gameboy color image converter (I didn’t just want to use the provided ones, I want to be able to make my own). I run the app and get a help blurb. One of the files is in brackets, I assume it is optional. It wasn’t. I spent a good amount of time banging my head against the wall before just adding the same filename to the parameter list a second time.
The next problem was saying where the background tiles are located in memory. Until now we have been using LCDC_BLOCK21 (or LCDCF_BG8800). That was one of the hardware IDs I had to remap for the newer hardware include file. I didn’t realize we had now switched to LCDCF_BG8000 which meant I should switch to LCDC_BLOCK01. I got colors but no tiles. I finally figured it out , but that is enough for today.
| Old | New |
| BCPS_AUTOINC | BGPI_AUTOINC |
| rBCPS | rBGPI |
| rBCPD | rBGPD |
To get a different tilemap, I just need to change the input image. I had to give that a try.

