Publish VCC Plus OSS source distribution for 3.6.2 build 60
This commit is contained in:
commit
c652a5276d
1192 files changed
+272368
No files matched your search
@@ -0,0 +1,120 @@
|
||||
/*
|
||||
Copyright 2015 by Joseph Forgione
|
||||
This file is part of VCC (Virtual Color Computer).
|
||||
|
||||
VCC (Virtual Color Computer) is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
VCC (Virtual Color Computer) is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with VCC (Virtual Color Computer). If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "../../../src/devices/Ramdisk/memboard.h"
|
||||
#include "defines.h"
|
||||
#include "resource.h"
|
||||
#include <vcc/bus/cpak_cartridge_definitions.h>
|
||||
#include <Windows.h>
|
||||
|
||||
static HINSTANCE gModuleInstance;
|
||||
|
||||
|
||||
BOOL WINAPI DllMain(
|
||||
HINSTANCE hinstDLL, // handle to DLL module
|
||||
DWORD fdwReason, // reason for calling function
|
||||
LPVOID lpReserved ) // reserved
|
||||
{
|
||||
if (fdwReason == DLL_PROCESS_ATTACH) //Clean Up
|
||||
{
|
||||
gModuleInstance = hinstDLL;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
__declspec(dllexport) const char* PakGetName()
|
||||
{
|
||||
static char string_buffer[MAX_LOADSTRING];
|
||||
|
||||
LoadString(gModuleInstance, IDS_MODULE_NAME, string_buffer, MAX_LOADSTRING);
|
||||
|
||||
return string_buffer;
|
||||
}
|
||||
|
||||
__declspec(dllexport) const char* PakGetCatalogId()
|
||||
{
|
||||
static char string_buffer[MAX_LOADSTRING];
|
||||
|
||||
LoadString(gModuleInstance, IDS_CATNUMBER, string_buffer, MAX_LOADSTRING);
|
||||
|
||||
return string_buffer;
|
||||
}
|
||||
|
||||
__declspec(dllexport) const char* PakGetDescription()
|
||||
{
|
||||
static char string_buffer[MAX_LOADSTRING];
|
||||
|
||||
LoadString(gModuleInstance, IDS_DESCRIPTION, string_buffer, MAX_LOADSTRING);
|
||||
|
||||
return string_buffer;
|
||||
}
|
||||
|
||||
__declspec(dllexport) void PakInitialize(
|
||||
void* const /*callback_context*/,
|
||||
const char* const /*configuration_path*/,
|
||||
HWND hVccWnd,
|
||||
const cpak_callbacks* const /*context*/)
|
||||
{
|
||||
InitMemBoard();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
__declspec(dllexport) void PakWritePort(unsigned char Port,unsigned char Data)
|
||||
{
|
||||
switch (Port)
|
||||
{
|
||||
// Address of RAM disk to read/write
|
||||
case 0x40:
|
||||
case 0x41:
|
||||
case 0x42:
|
||||
WritePort(Port,Data);
|
||||
return;
|
||||
// Write to RAM disk
|
||||
case 0x43:
|
||||
WriteArray(Data);
|
||||
return;
|
||||
|
||||
default:
|
||||
return;
|
||||
} //End port switch
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
__declspec(dllexport) unsigned char PakReadPort(unsigned char Port)
|
||||
{
|
||||
switch (Port)
|
||||
{
|
||||
// Read from RAM disk
|
||||
case 0x43:
|
||||
return(ReadArray());
|
||||
|
||||
default:
|
||||
return 0;
|
||||
} //End port switch
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user