Use C-comment style

This commit is contained in:
retro-wertz
2017-10-15 03:13:11 +08:00
parent ebca2248d0
commit 52c8155dee
33 changed files with 441 additions and 408 deletions

View File

@@ -2,7 +2,7 @@
#if defined(_WIN32) && !defined(_XBOX) && !defined(__LIBRETRO__)
HANDLE SerialPort = NULL; // Handle of SerialPort itself.
HANDLE SerialPort = NULL; /* Handle of SerialPort itself. */
BOOL SerialOpen(int port, int baud) {
HANDLE Comport;
@@ -15,24 +15,24 @@ BOOL SerialOpen(int port, int baud) {
else
sprintf(str, "COM%d", port);
// Open the serial port
/* Open the serial port */
if ((Comport = CreateFile(str, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE)
return FALSE;
// Configure Serial port (Setup Comm)
/* Configure Serial port (Setup Comm) */
// Buffer sizes
/* Buffer sizes */
if (!SetupComm(Comport, 128, 128))
return FALSE;
// Setup DCB using current values
/* Setup DCB using current values */
if (!GetCommState(Comport, &myDCB))
return FALSE;
myDCB.fInX = FALSE; // Turn off xon/xoff handler
myDCB.fInX = FALSE; /* Turn off xon/xoff handler */
myDCB.fOutX = FALSE;
myDCB.fOutxDsrFlow = FALSE;
myDCB.fOutxCtsFlow = FALSE; // no hardware flow control.
myDCB.fOutxCtsFlow = FALSE; /* no hardware flow control. */
myDCB.BaudRate = baud;
myDCB.DCBlength = sizeof(DCB);
myDCB.fBinary = 1;
@@ -52,12 +52,12 @@ BOOL SerialOpen(int port, int baud) {
if (!SetCommState(Comport, &myDCB))
return FALSE;
// Set timeouts
/* Set timeouts */
CTout.ReadIntervalTimeout = 0xffffffff;
CTout.ReadTotalTimeoutMultiplier = 0;
CTout.ReadTotalTimeoutConstant = 0;
CTout.WriteTotalTimeoutMultiplier = 0;
CTout.WriteTotalTimeoutConstant = 5000; // don't hang if CTS is locked, for example
CTout.WriteTotalTimeoutConstant = 5000; /* don't hang if CTS is locked, for example */
SetCommTimeouts(Comport, &CTout);
EscapeCommFunction(Comport, SETDTR);

View File

@@ -32,14 +32,14 @@ static uint8 cpu410x[16], ppu201x[16], apu40xx[64];
/* IRQ Registers */
static uint8 IRQCount, IRQa, IRQReload;
#define IRQLatch cpu410x[0x1] // accc cccc, a = 0, AD12 switching, a = 1, HSYNC switching
#define IRQLatch cpu410x[0x1] /* accc cccc, a = 0, AD12 switching, a = 1, HSYNC switching */
/* MMC3 Registers */
static uint8 inv_hack = 0; /* some OneBus Systems have swapped PRG reg commans in MMC3 inplementation,
* trying to autodetect unusual behavior, due not to add a new mapper.
*/
#define mmc3cmd cpu410x[0x5] // pcv- ----, p - program swap, c - video swap, v - internal VRAM enable
#define mirror cpu410x[0x6] // ---- ---m, m = 0 - H, m = 1 - V
#define mmc3cmd cpu410x[0x5] /* pcv- ----, p - program swap, c - video swap, v - internal VRAM enable */
#define mirror cpu410x[0x6] /* ---- ---m, m = 0 - H, m = 1 - V */
/* APU Registers */
static uint8 pcm_enable = 0, pcm_irq = 0;