Could you use these things to print like, boobs?
This commit is contained in:
parent
a8db3a6966
commit
0c3e18efb1
|
@ -31,6 +31,13 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.Gameboy
|
||||||
public Buttons Keys;
|
public Buttons Keys;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[UnmanagedFunctionPointer(CC)]
|
||||||
|
public delegate void PrinterCallback(IntPtr image,
|
||||||
|
byte height,
|
||||||
|
byte top_margin,
|
||||||
|
byte bottom_margin,
|
||||||
|
byte exposure);
|
||||||
|
|
||||||
[BizImport(CC)]
|
[BizImport(CC)]
|
||||||
public abstract bool Init(bool cgb, byte[] spc, int spclen);
|
public abstract bool Init(bool cgb, byte[] spc, int spclen);
|
||||||
|
|
||||||
|
@ -51,5 +58,8 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.Gameboy
|
||||||
|
|
||||||
[BizImport(CC)]
|
[BizImport(CC)]
|
||||||
public abstract bool HasSaveRam();
|
public abstract bool HasSaveRam();
|
||||||
|
|
||||||
|
[BizImport(CC)]
|
||||||
|
public abstract void SetPrinterCallback(PrinterCallback callback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -64,6 +64,24 @@ static void InputCallback(GB_gameboy_t *gb)
|
||||||
FrontendInputCallback();
|
FrontendInputCallback();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef void (*FrontendPrinterCallback_t)(uint32_t *image,
|
||||||
|
uint8_t height,
|
||||||
|
uint8_t top_margin,
|
||||||
|
uint8_t bottom_margin,
|
||||||
|
uint8_t exposure);
|
||||||
|
|
||||||
|
static FrontendPrinterCallback_t FrontendPrinterCallback;
|
||||||
|
|
||||||
|
static void PrinterCallback(GB_gameboy_t *gb,
|
||||||
|
uint32_t *image,
|
||||||
|
uint8_t height,
|
||||||
|
uint8_t top_margin,
|
||||||
|
uint8_t bottom_margin,
|
||||||
|
uint8_t exposure)
|
||||||
|
{
|
||||||
|
FrontendPrinterCallback(image, height, top_margin, bottom_margin, exposure);
|
||||||
|
}
|
||||||
|
|
||||||
static blip_t *leftblip;
|
static blip_t *leftblip;
|
||||||
static blip_t *rightblip;
|
static blip_t *rightblip;
|
||||||
const int SOUND_RATE_GB = 2097152;
|
const int SOUND_RATE_GB = 2097152;
|
||||||
|
@ -245,6 +263,22 @@ ECL_EXPORT bool HasSaveRam()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ECL_EXPORT void SetPrinterCallback(FrontendPrinterCallback_t callback)
|
||||||
|
{
|
||||||
|
FrontendPrinterCallback = callback;
|
||||||
|
|
||||||
|
if (callback)
|
||||||
|
{
|
||||||
|
GB_connect_printer(&GB, PrinterCallback);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GB_set_serial_transfer_start_callback(&GB, NULL);
|
||||||
|
GB_set_serial_transfer_end_callback(&GB, NULL);
|
||||||
|
GB.printer.callback = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue