# HappyJon Demo # # Produced using "68k Mac boot floppy example" template # # Boot block header based on first/first.S # from http://emile.sourceforge.net/ # # The ROM loads this many bytes from the start of the disk. ..equ stage1_size, 1024 # Define ScrnBase, location in memory containing the start of video memory ..equ ScrnBase, 0x0824 # Macro to define a Pascal string ..macro pString string pstring_begin_\@: .byte pstring_end_\@ - pstring_string_\@ - 1 pstring_string_\@: .string "\string" pstring_end_\@: .fill 16 - (pstring_end_\@ - pstring_begin_\@) , 1, 0 ..endm begin: ID: .short 0x4C4B /* boot blocks signature */ Entry: bra start /* entry point to bootcode */ Version: .short 0x4418 /* boot blocks version number */ PageFlags: .short 0x00 /* used internally */ SysName: pString "Face Demo " /* System filename */ ShellName: pString "Face Demo " /* Finder filename */ Dbg1Name: pString "Face Demo " /* debugger filename */ Dbg2Name: pString "Face Demo " /* debugger filename */ ScreenName: pString "Face Screen " /* name of startup screen */ HelloName: pString "Face " /* name of startup program */ ScrapName: pString "Scrap " /* name of system scrap file */ CntFCBs: .short 10 /* number of FCBs to allocate */ CntEvts: .short 20 /* number of event queue elements */ Heap128K: .long 0x00004300 /* system heap size on 128K Mac */ Heap256K: .long 0x00008000 /* used internally */ SysHeapSize: .long 0x00020000 /* system heap size on all machines */ start: /* movel #0x3FA700, %a0 */ /* Start of framebuffer on 4MB Plus */ movel (ScrnBase), %a0 /* clear screen */ movel #0x00000000, %d0 movel #5472, %d1 clear_loop: movel %d0, (%a0)+ subi #1, %d1 bne clear_loop /* Reset vars for image drawing: */ lea buffer, %a1 /* Image data */ movel (ScrnBase), %a0 addal #7388, %a0 /* Offset to place 64x64 image in center of display */ movew #127, %d1 fill_loop: movel (%a1)+, %d0 movel %d0, (%a0)+ /* mod buffer count to find offset and shift memory */ movel %d1, %d3 divuw #2, %d3 andil #0xFFFF0000, %d3 bne check_dec addal #56, %a0 /* Move to next line */ check_dec: subi #1, %d1 bne fill_loop /* One more time! */ movel (%a1)+, %d0 movel %d0, (%a0)+ /* Set up an animation / prog indicator: */ addal #56, %a0 /* Move to next line */ movel %a0, %a1 addal #4, %a1 movel #0xFF000000, %d0 movel #0x000000FF, %d2 end_loop: movel %d0, (%a0) movel %d2, (%a1) rorl #1, %d0 roll #1, %d2 movel #10000, %d1 delay_loop: nop subi #1, %d1 bne delay_loop bra end_loop end: buffer: dc.l 0b00000000000000000000000000100001 dc.l 0b11111100000000000000000000000000 dc.l 0b00000000000000000000000000000011 dc.l 0b11111100000000000000000000000000 dc.l 0b00000000000000000000000000111111 dc.l 0b11111110000000000000000000000000 dc.l 0b00000000000000000000000001110000 dc.l 0b01111110000000000000000000000000 dc.l 0b00000000000000000000000011110111 ... .