Just for RGP
Here's the source and binary for a very simple HELLO WORLD app running on Pac-Man hardware. There's a certain amount of hardware bring up that you need to do to code for an arcade board. Probably the best way to do this is to reverse the boot process of a game running on that hardware (as I did with L System).
This is only tested in MAME as I don't have a Pac-Man board.
Assembled by the zasm assembler, although should pretty much port to any Z80 assembler without too much trouble. The resulting binary is a whopping 243 bytes in size!
This code DOES NOT wait for a vblank before blitting the text strings to vram. This is NOT the way you'd do it if you were writing a real game as, if you change the contents of vram/colour ram whilst the raster is half way through displaying the screen, you'll get flickering. You'd normally wait until the vblank routine had finished and then blit text strings to screen whilst the raster beam was turned off and flying back.
Starting homebrew coding on a vertical screen game is more challenging than a horizontal screen game due to the weird layout of vertical screens in vram, but once you've got a text blitting routine working then it's not so bad.
Have fun James!
https://www.ukvac.com/forum/data/uploads/1497/hello_world_pacman.zip
Here's the source and binary for a very simple HELLO WORLD app running on Pac-Man hardware. There's a certain amount of hardware bring up that you need to do to code for an arcade board. Probably the best way to do this is to reverse the boot process of a game running on that hardware (as I did with L System).
This is only tested in MAME as I don't have a Pac-Man board.
Assembled by the zasm assembler, although should pretty much port to any Z80 assembler without too much trouble. The resulting binary is a whopping 243 bytes in size!
This code DOES NOT wait for a vblank before blitting the text strings to vram. This is NOT the way you'd do it if you were writing a real game as, if you change the contents of vram/colour ram whilst the raster is half way through displaying the screen, you'll get flickering. You'd normally wait until the vblank routine had finished and then blit text strings to screen whilst the raster beam was turned off and flying back.
Starting homebrew coding on a vertical screen game is more challenging than a horizontal screen game due to the weird layout of vertical screens in vram, but once you've got a text blitting routine working then it's not so bad.
Have fun James!
https://www.ukvac.com/forum/data/uploads/1497/hello_world_pacman.zip