Skip to content

Instantly share code, notes, and snippets.

// Frame, VSync, VBL, VRAMH
scanLines:
.byte 0,1,7,0x00 // 00
.byte 0,1,7,0x00
.byte 0,0,7,0x00
.byte 0,0,7,0x00
.byte 0,0,7,0x00
.byte 0,0,7,0x00
.byte 0,0,7,0x00
mainloop:
// Wait for VBL to process commands
sbrs VBL,2 // Bit 2 of VBL register is our rendering window
rjmp mainloop
// Poll the FIFO to see if there's a command pending
in accum,PINB
sbrs accum,fifoReady
rjmp mainloop
/////////////////
// Plot a single character
//
// Parameter: The ASCII value to plot
//
renderPlotChar:
// Take control of VRAM
EnableVRAMWrite
/* Name: main.c
* Author: Quinn Dunki
* Copyright: ©2012 Quinn Dunki
* License: All Rights Reserved
*
* ATtiny13A code to program an SRAM chip or EEPROM
* For details, see http://www.quinndunki.com/blondihacks
*/
/* Name: rom.c
* Author: Quinn Dunki
* Copyright: ©2012 Quinn Dunki
* License: All Rights Reserved
*
* ROM image for Veronica
* For details, see http://www.quinndunki.com/blondihacks
*/
0xa9,0x01,0x8d,0xff,0xef,0xa9,0x00,0x8d,0xff,0xef,
0xa9,0x00,0x85,0x00,0xa9,0x02,0x85,0x01,0xa0,0x00,
0xa9,0x42,0x91,0x00,0xa9,0x00,0xb1,0x00,0xc9,0x42,
0xf0,0x0d,0xa9,0x03,0x8d,0xff,0xef,0xa9,0x58,0x8d,
0xff,0xef,0x4c,0x37,0xf0,0xa9,0x03,0x8d,0xff,0xef,
0xa9,0x4f,0x8d,0xff,0xef,0xe6,0x00,0xd0,0x02,0xe6,
0x01,0xa5,0x01,0xc9,0xdf,0xd0,0xcf,0xa5,0x00,0xc9,
0xff,0xd0,0xc9,0x4c,0x66,0xf0,0xa9,0x01,0x8d,0xff,
0xef,0xa9,0x24,0x8d,0xff,0xef,0x4c,0x66,0xf0,0xa9,
0x01,0x8d,0xff,0xef,0xa9,0x30,0x8d,0xff,0xef,0x4c,
# Makefile
#
#
DEVICE = attiny85
CLOCK = 8000000UL
PROGRAMMER = -c usbtiny
OBJECTS = main.o
ROMBASE = 0xf000
FUSES = -U lfuse:w:0xe2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m
; Name: VeronicaROM.s
; Author: Quinn Dunki
; Copyright: ©2012 Quinn Dunki
; License: All Rights Reserved
;
; 6052 code for Veronica's main system ROM
; For details, see http://www.quinndunki.com/blondihacks
;
; Zero Page:
; $00..$01: Subroutine parameter 1
; Name: romImage.s
; Author: Quinn Dunki
; Copyright: ©2012 Quinn Dunki
; License: All Rights Reserved
;
; 6052 code for Veronica's main system ROM
; For details, see http://www.quinndunki.com/blondihacks
;
; Zero Page:
; $00..$01: Subroutine parameter 1
// Pseudo-code. May not compile or work
for (;;)
{
// Check for host data
uint16_t byteCount = CDC_Device_BytesReceived(&EETool_CDC_Interface);
byteCount = MIN(byteCount,BUFF_SIZE-1);
if (byteCount>BUFF_SIZE)
{
FatalError();