Skip to content

Commit

Permalink
feat: add Fish'N'Chips option and font set to emulator
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscodelahoz committed Nov 3, 2024
1 parent 5803b95 commit f6a51dc
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ <h3 class="configuration-subtitle">Font settings</h3>
<option value="chip8">Chip8</option>
<option value="schip">SCHIP</option>
<option value="octo">Octo</option>
<option value="fish">Fish'N'Chips</option>
</select>
</label>
</section>
Expand Down
36 changes: 36 additions & 0 deletions src/scripts/constants/fonts.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,40 @@ export const fontSets = {
0xFF, 0xFF, 0xC0, 0xC0, 0xFF, 0xFF, 0xC0, 0xC0, 0xFF, 0xFF, // E
0xFF, 0xFF, 0xC0, 0xC0, 0xFF, 0xFF, 0xC0, 0xC0, 0xC0, 0xC0 // F
],
fish: [
0x60, 0xA0, 0xA0, 0xA0, 0xC0, // 0
0x40, 0xC0, 0x40, 0x40, 0xE0, // 1
0xC0, 0x20, 0x40, 0x80, 0xE0, // 2
0xC0, 0x20, 0x40, 0x20, 0xC0, // 3
0x20, 0xA0, 0xE0, 0x20, 0x20, // 4
0xE0, 0x80, 0xC0, 0x20, 0xC0, // 5
0x40, 0x80, 0xC0, 0xA0, 0x40, // 6
0xE0, 0x20, 0x60, 0x40, 0x40, // 7
0x40, 0xA0, 0x40, 0xA0, 0x40, // 8
0x40, 0xA0, 0x60, 0x20, 0x40, // 9
0x40, 0xA0, 0xE0, 0xA0, 0xA0, // A
0xC0, 0xA0, 0xC0, 0xA0, 0xC0, // B
0x60, 0x80, 0x80, 0x80, 0x60, // C
0xC0, 0xA0, 0xA0, 0xA0, 0xC0, // D
0xE0, 0x80, 0xC0, 0x80, 0xE0, // E
0xE0, 0x80, 0xC0, 0x80, 0x80, // F

// high-res mode font sprites (0-F)
0x7C, 0xC6, 0xCE, 0xDE, 0xD6, 0xF6, 0xE6, 0xC6, 0x7C, 0x00, // 0
0x10, 0x30, 0xF0, 0x30, 0x30, 0x30, 0x30, 0x30, 0xFC, 0x00, // 1
0x78, 0xCC, 0xCC, 0x0C, 0x18, 0x30, 0x60, 0xCC, 0xFC, 0x00, // 2
0x78, 0xCC, 0x0C, 0x0C, 0x38, 0x0C, 0x0C, 0xCC, 0x78, 0x00, // 3
0x0C, 0x1C, 0x3C, 0x6C, 0xCC, 0xFE, 0x0C, 0x0C, 0x1E, 0x00, // 4
0xFC, 0xC0, 0xC0, 0xC0, 0xF8, 0x0C, 0x0C, 0xCC, 0x78, 0x00, // 5
0x38, 0x60, 0xC0, 0xC0, 0xF8, 0xCC, 0xCC, 0xCC, 0x78, 0x00, // 6
0xFE, 0xC6, 0xC6, 0x06, 0x0C, 0x18, 0x30, 0x30, 0x30, 0x00, // 7
0x78, 0xCC, 0xCC, 0xEC, 0x78, 0xDC, 0xCC, 0xCC, 0x78, 0x00, // 8
0x7C, 0xC6, 0xC6, 0xC6, 0x7C, 0x18, 0x18, 0x30, 0x70, 0x00, // 9
0x30, 0x78, 0xCC, 0xCC, 0xCC, 0xFC, 0xCC, 0xCC, 0xCC, 0x00, // A
0xFC, 0x66, 0x66, 0x66, 0x7C, 0x66, 0x66, 0x66, 0xFC, 0x00, // B
0x3C, 0x66, 0xC6, 0xC0, 0xC0, 0xC0, 0xC6, 0x66, 0x3C, 0x00, // C
0xF8, 0x6C, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6C, 0xF8, 0x00, // D
0xFE, 0x62, 0x60, 0x64, 0x7C, 0x64, 0x60, 0x62, 0xFE, 0x00, // E
0xFE, 0x66, 0x62, 0x64, 0x7C, 0x64, 0x60, 0x60, 0xF0, 0x00, // F
],
};

0 comments on commit f6a51dc

Please sign in to comment.