Go to file
august kline 7d0b66f418 build script! no more manually rebuilding cozette! 2024-09-26 21:02:03 -04:00
build build script! no more manually rebuilding cozette! 2024-09-26 21:02:03 -04:00
roms build script! no more manually rebuilding cozette! 2024-09-26 21:02:03 -04:00
src build script! no more manually rebuilding cozette! 2024-09-26 21:02:03 -04:00
.gitignore nix! flakes! 2024-04-10 18:10:25 -04:00
Cargo.lock Big refactor! Better handling of wasm/native targets, and cute demo :) 2024-09-07 22:24:51 -04:00
Cargo.toml build script! no more manually rebuilding cozette! 2024-09-26 21:02:03 -04:00
README.md Added interrupts, some restructuring & refactoring 2024-04-10 17:28:34 -04:00
build.rs build script! no more manually rebuilding cozette! 2024-09-26 21:02:03 -04:00
flake.lock nix! flakes! 2024-04-10 18:10:25 -04:00
flake.nix nix! flakes! 2024-04-10 18:10:25 -04:00
george.toml Big refactor! Better handling of wasm/native targets, and cute demo :) 2024-09-07 22:24:51 -04:00
run.sh build script! no more manually rebuilding cozette! 2024-09-26 21:02:03 -04:00

README.md

george-emu

a ramshackle emulator for george 😌

plenty of inspiration & guidance taken from emulator_6502 (don't use george-emu in a serious project! emulator_6502 is the crate you're looking for)

structure

see the george wiki for how george works, why she exists, who she is, etc.

the george emulator contains 3 main structs: Cpu, Mem, and MemMappedDevice. Cpu represents a 65c02 processor, with functions for interacting with memory and executing instructions. Mem is a collection of MemMappedDevice's, which each hold the data for some address space. Mem can add MemMappedDevice's, and read from and write to them. A MemMappedDevice can have multiple banks at the same address space, and can translate 'global' addresses to 'local' ones (e.g. 0xFFFF in the system's memory map corresponds to 0x1FFF in the ROM).

font generation

george uses a modified version of cozette for her main font. the modified version has 8 pixel wide characters for use with the character generator rom, and has a limit of 256 (0xFF) characters. the toolchain to generate a rom binary is still pretty clunky, and someday i might get around to streamlining it, but for now to make any changes:

  • open ./src/Cozette.sfd in fontforge
  • make your edits
    • to reorder glyphs, edit ./src/georgeencoding.txt and load it with "Encoding -> Load Encoding -> (select georgeencoding.txt, name it whatever) -> Reencode -> (name of encoding)"
    • ensure that there are exactly 256 characters in the font
  • generate a bdf font with "File -> Generate Fonts... -> (name of the font, select bdf in the options panel)"
  • open the generated bdf file in a text editor and change the line FONTBOUNDINGBOX 11 13 0 -3 to FONTBOUNDINGBOX 8 13 0 -3
  • now open the font in bdf view, and export a single-row png