w(we: push af and $f cp 9+1 p jr c,.G>o&A @@EE add "0" ld b,a di lcd_WaitVRAM ld a,b ld [hl+],a eiff s nٙgcnܙ3>GB PRTR EMU V1.0603M ld a,[hl] push af xor a ld [hl],a ld [rIF],a ld a,$30 ld [rP122O2QWh:E2+!6!4!4>!4xxg !4ogx"}|og+}||  "   *   *    A "    A *  1!>>@A>PE>!}|!d>i͑͘) N> !͝!@!+|  7h7h# 8'0GA x"!~w>0>Mw!ͫ! >GCB>@* ! ]T !! "<  @D @@>hi@* ^=~BBBBBB~~~~~l|88||88|8|8|8||8|<<><~~<ffffff{>c8ll8x~~~<~~<<~~< 0``0$ff$<~~<000000llllllll0|x 00f8l8vv``0```0`00`f<x00000x xflxlf``````~8ll8ff|``xxff|lfxxx000000x0l88lx00x 0`x`````x`0 xx8l00x |v``|ffxx |vxx8l```v| `lvff0p000x x`flxlp00000xxxff|`v| vf`|x 0|004vx0ll8l| 0d00000000v8lP(xx(xx xx(v v(| (||(|xx8D@@@f<~~ff|``00000x |v p000x xx v2L2L8 DD8DDDz@||||||l(| 8DD8llL|<@0@<{{gbpe.asmB %.X....X. DB %........ DB %........ DB %XXXXXXX. DB %........ DB o XXX@{{gbpe.asm.... DB %XXXXXXX. DB %........ DB %........ DB %...X.... DB %...X..r X{h{{ Dgbpe.asm... DB %...X.... DB %XXXXXXX. DB %........ DB %........ DB %.X.....u D({8{uw{{X.. gbpe.asm %...X.... DB %.X...... DB %XXXXXXX. DB %........ DB %........ DB x {{${{{ gbpe.asm DB $CE,$ED,$66,$66,$CC,$0D,$00,$0B,$03,$73,$00,$83,$00,$0C,$00,$0D DB $00,$08,$11,$1F,$88,$89,$0{,$CȔ{ؔ{ %{{ {7,$6gbpe.asm,$CC,$DD,$DC,$99,$9F,$BB,$B9,$33,$3E @{{ DB %...X.... DB %...X.... DB %...X..~! {{ &{{ {.X..gbpe.asmB %...X.... DB %...X.... DB %...X.... DB %...X.... DB %...X.... DB %...X{h{{....gbpe.asm %........ DB %...X.... DB %........ DB %XXXXXXX. DB %........ DB ).. ({8{ ({h{ { gbpe.asm DB %.XX...X. DB %X..XXX.. DB %........ DB %.XX...X. DB %X..XXX.. , {{{ %gbpe.asm DB %..XX.... DB %.X..X... DB %.X..X... DB %..XX.... DB %........ 3 %{{{ %.gbpe.asm DB %........ DB %........ DB %........ DB %........ DB %..XX.... ; %.h{x{{ %..gbpe.asm DB %........ DB %........ DB %........ DB %........ DB %........ A%..({8{{%...gbpe.asm DB %........ DB %........ DB %........ DB %.......X DB %......X. FXXX{{{..X.gbpe.asm DB %...X.X.. DB %...XX... DB %....X... DB %........ DB %........ DK...{{{X.XXgbpe.asmDB %..X..X.. DB %..X..X.. DB %........ DB %........ DB %........ DBSXX.x{X{ 8gwH{ {DB    { %{ ,{؟{{( {ԟ{)rROMB0GB{Ě{( { B>)rROMB1HB{rOBP1{0B= IF (\2 == 0) xor a ELSE ld a,\2 ENDC ld [\1],a ( {( {( {-{8{ {( {( {n xor a ld [rSCX],a ld [rSCY],a ld a,LCDCF_ON|LCDCF_BG8000|LCDCF_BG9800|LCDCF_BGON|LCDCF_OBJ16|LCDCF_OBJOFF ld [rLCDC],a nop nop nop ret Copy20x18: ld b,18 Copy20xB: ld c,20 Copy202: ld a,[hl+] ld [de],a inc de dec c jr nz,Copy202 push hl ld hl,12 add hl,de ld16 de,hl pop hl dec b jr nz,Copy20xB ret SetAPATileMap1: ld hl,_SCRN0 jr _initscrn SetAPATileMap2: ld hl,_SCRN1 _initscrn: xor a ld bc,12 ld e,18 .loop1: ld d,20 .loop2: ld [hl+],a inc a dec d jr nz,.loop2 add hl,bc dec e jr nz,.loop1 ret DisplayOff: ldh a,[rLCDC] rlca ret nc WaitForVBLK: ldh a,[rLY] cp $91 jr nz,WaitForVBLK ldh a,[rLCDC] and $7f ldh [rLCDC],a ret SetCGB_BGP: ld a,$80 ld [rBCPS],a ld bc,$4069 .loop: ld a,[hl+] ld [c],a dec b jr nz,.loop ret DefaultCGBPalettes: RGBSet 255,255,255 RGBSet 191,191,191 RGBSet 127,127,127 RGBSet 0,0,0 PicTileSet: chr_IBMPC1 1,8 PicMap: db " Ŀ " db " GB Printer " db " Emulator v1.0 " db " " db " by Jeff Frohwein " db " " db " Connect another " db " GB to the link port" db " and start printing " db " on the other unit. " db " " db " This Screen will " db " display the picture" db " once picture xfer " db " is complete. " db " " db " " db " " @B{(STATF_MODE10y|`y|py|w(w push af and $f cp 9+1 B{gbpe.asm. DB %........ DB %........ DB %........ DB %........ DB %XXXXXXXX /DB x$w{gbpe.asmB %XXXXXXXX DB %XXXXXXXX DB %........ DB %........ DB %........ DB 7...cwgbpe.asm.... DB %........ DB %........ DB %........ DB %........ DB %........R 0vwgbpe.asmgbpe.asm ENDC ;IBMPC_INC %X..X..X. DB %.XXXXX.. DB %...X.... DB %........ fB ȏw{gbpe.asm %........T %..XXXX..  @{{ %.X...... DB %..XX... [SerSend],a jr SerialDone2 SerialNAck: ld hl,SerState inc [hl] xor a ld [SerSend],a jr SerialDone2 StoreCommand: if VIEWPIC else ld16r hl,SerPtr ld a,b ld [hl+],a ld16r SerPtr,hl endc jr SerialDoneInc SaveLowLength: ld a,b ld [PacketLen],a jr SerialDoneInc SaveHighLength: ld a,b ld [PacketLen+1],a ld h,a ld a,[PacketLen] or h jr nz,SerialDoneInc ld hl,SerState inc [hl] jr SerialDoneInc2 SaveData: if VIEWPIC ld16r hl,SerPtr ld a,b ld [hl+],a ld16r SerPtr,hl endc ld16r hl,PacketLen dec hl ld16r PacketLen,hl ld a,h or l jr nz,SerialDone jr SerialDoneInc INCLUDE "memory1.asm" Start: di ld sp,$ffff ld hl,DefaultCGBPalettes call SetCGB_BGP xor a ld [SerState],a ld [SerSend],a ld [rSB],a ld a,$80 ld [rSC],a ld a,$40 ld [rSTAT],a ld a,80 ld [rLYC],a ld a,8 ld [rIE],a ld hl,SerBuf ld16r SerPtr,hl ei ld hl,SerBuf ld bc,100 ld a,$69 call mem_Set call DisplayPicture call WaitForBytes LoopForever: jr LoopForever WaitForBytes: .wait: ld a,[rSC] bit 7,a jr nz,.wait call Delay if VIEWPIC call DisplayOff ld a,8+2 ld [rIE],a ld hl,SerBuf ld de,$8000 ld bc,360*16 call mem_Copy call SetAPATileMap1 ld hl,rLCDC set 7,[hl] else ld de,SerBuf ld hl,$9840 ld c,32 .loop ld a,[de] inc de call DisplayHexByte dec c jr nz,.loop endc ret Delay: ld b,16 .loop2: ld hl,0 .loop: dec hl ld a,h or l jr nz,.loop dec b jr nz,.loop2 ret DisplayHexByte: swap a call DisplayNibble swap a call DisplayNibble inc hl ret DisplayNibble: push af and $f cp 9+1 jr c,.small add "a"-"0"-10 .small: add "0" ld b,a di lcd_WaitVRAM ld a,b ld [hl+],a ei pop af ret Toggle: di ld hl,rIE ld a,[hl] push af xor a ld [hl],a ld [rIF],a ld a,$30 ld [rP1],a ld a,1 ld [rKEY1],a stop pop af ld [hl],a ei ret DisplayPicture: call DisplayOff ld hl,PicTileSet ld de,$8000 ld bc,$1000 call mem_CopyMono ld hl,PicMap ld de,$9800 call Copy20x18 ld a,$e4 ld [rBGP],a QXqw8{8? Org $100...)StartwB %........ DB %...X.... DB %........ DB %XXXXXXX. DB %........ DB %...X.... DB %........ DB %........ DB %.XX...X. DB VAwhvwB )qwwhvw{8? Org $200XXX)SerialDoneInc %........ DB %........ DB %..XX....