Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

Ads

#1 2022-05-12 16:51:01

T0biasCZe
New member
Registered: 2021-08-15
Posts: 4

Printlib2 - Gameboy Printer library

Modification of original Printlib by DragonEagle. It now works with gbdk 2020 and has some features added + fixed CRC bug

New features:
-PrintScreen - Takes the current screen, and sends it to the printer
-PrintScreen360 - Same as above, but for 360 tile mode (used by Drawing.h)

Download: https://github.com/T0biasCZe/printlib2
-Included is example for both prtsc and prtsc360

License: CC BY-SA 4.0

Credits:
-Reini1305 - Adding PrintScreen function
-DragonEagle - Original Printlib
-T0biasCZe(me) - Porting to gbdk-2020 and adding 360 tile mode printscreen

Games/Homebrew using Printlib2:
-GB snake by Reini1305

functions:
fullPrinterInit(uint8 timeout); - initializes the printer. the timeout is time in seconds for how long it will try to connect to the printer until it stops attempting. Returns 1 when succesfully connected and 0 when it was unable to connect
PrintScreen() - prints the screen
PrintScreen360() - prints the 360 tile screen
PrintTileData(p_data, linefeed, size) - used to send other images to the printer. The p_data is pointer to the tile. Tiles are sent 1 at a time, so to print 20*18 tiles, you must summon the function 360 times. the linefeed sets if you want to put 1 blank line before printing the image itself. the size is height of the print divided by half, eg to print 18 lines, put 9 there

Last edited by T0biasCZe (2022-05-14 10:26:18)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson