Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

dllkit.h File Reference


Detailed Description

Header file of the 6502 dll developement kit. Library for creating emu6502 plugins.

Definition in file dllkit.h.#include <windows.h>

Go to the source code of this file.

Data Structures

struct  INITDLLINFO
 Structure containing various informations returned by InitDll. More...

struct  INITDLLSTRUCT
 Initial informations passed to plugin when initializing. More...

struct  MESSAGEDLLSTRUCT
 Message structure passed to plugins, when registered message occured. More...


Defines

#define DLLEXPORT   __declspec(dllexport)
#define IOLO   0xD000
 Lower boundary of memory serving for device maping.

#define IOHI   0xD7FF
 Higher boundary of memory serving for device maping.

#define NMIID   0x020A
 Register in memory which serves to identify the source of last interrupt.

#define IRQID   0x020B
#define RESETID   0x020C
#define ISVBI   0x020D
#define ENDOFMSGLIST   0xBFFF
 Marks the end of the list of messages MSGLIST.


Typedefs

typedef UINT * MSGLIST
 List of messages.


Enumerations

enum  iomode { IOREAD, IOWRITE }
 Determines, if iofunc is called when reading or writing. More...


Functions

BOOL CreateMsgList (MSGLIST *MsgList, int MessageCount)
 Allocates MsgList.

void FreeMsgList (MSGLIST MsgList)
 Deallocates MsgList Calls free on MsgList.

void AddMessage (MSGLIST MsgList, UINT Message)
 Adds Message to the given MsgList.

DLLEXPORT void __cdecl IOFunc (UINT adr, unsigned char *data, iomode mode)
 IO function mapped into some adress in memory.

DLLEXPORT void __cdecl InitDll (INITDLLSTRUCT *ids, INITDLLINFO *idf)
 Inits dll data structures.

DLLEXPORT void __cdecl OnMessage (MESSAGEDLLSTRUCT *mds)
 Recieves registered messages from emu6502 application.


Define Documentation

#define ENDOFMSGLIST   0xBFFF
 

Marks the end of the list of messages MSGLIST.

Definition at line 36 of file dllkit.h.

#define IOHI   0xD7FF
 

Higher boundary of memory serving for device maping.

Definition at line 18 of file dllkit.h.

#define IOLO   0xD000
 

Lower boundary of memory serving for device maping.

Definition at line 16 of file dllkit.h.

#define NMIID   0x020A
 

Register in memory which serves to identify the source of last interrupt.

Definition at line 21 of file dllkit.h.


Typedef Documentation

typedef UINT* MSGLIST
 

List of messages.

Used for specifying messages to be catched or to be sent. Length of this list should be the number of messages to be held within + 1, and the list should end with ENDOFMSGLIST

Definition at line 33 of file dllkit.h.


Enumeration Type Documentation

enum iomode
 

Determines, if iofunc is called when reading or writing.

Definition at line 115 of file dllkit.h.


Function Documentation

void AddMessage MSGLIST    MsgList,
UINT    Message
 

Adds Message to the given MsgList.

Adds Message to the given MsgList. The message shouldn't be ENDOFMSGLIST.

Parameters:
MsgList  List of messages to which the Message should be added.
Message  Message which will be added to the MsgList

Definition at line 27 of file dllkit.c.

BOOL CreateMsgList MSGLIST   MsgList,
int    MessageCount
 

Allocates MsgList.

Allocates MsgList for holding MessageCount of messages. MsgList takes (MessageCount + 1) * sizeof(UINT) bytes and first item is set to ENDOFMSGLIST.

Parameters:
MsgList  A MSGLIST variable to be allocated.
MessageCount  Max. count of messages to be held within the list.
Returns :
TRUE if succesful, otherwise FALSE.

Definition at line 9 of file dllkit.c.

void FreeMsgList MSGLIST    MsgList
 

Deallocates MsgList Calls free on MsgList.

Parameters:
MsgList  A MSGLIST variable to be deallocated.

Definition at line 22 of file dllkit.c.

DLLEXPORT void __cdecl InitDll INITDLLSTRUCT   ids,
INITDLLINFO   idi
 

Inits dll data structures.

Todo:
free VideoMsgs

Definition at line 41 of file genericdll.c.

DLLEXPORT void __cdecl IOFunc UINT    adr,
unsigned char *    data,
iomode    mode
 

IO function mapped into some adress in memory.

Called directly when accesing adress to which is this function bound. Always write this function.

Parameters:
adr  Adress being accessed
data  Byte being read/written
mode  see iomode

Definition at line 102 of file genericdll.c.

DLLEXPORT void __cdecl OnMessage MESSAGEDLLSTRUCT   mds
 

Recieves registered messages from emu6502 application.

This function is called by emu6502 when some message event registered by InitDll occures. Implement this function even when you don't want to catch any messages.

Parameters:
mds  A MESSAGEDLLSTRUCT structure contaning informations about incoming message.
See also:
InitDll , MESSAGEDLLSTRUCT

Definition at line 68 of file genericdll.c.


Generated on Fri Sep 6 18:32:15 2002 for Emu6502 by doxygen1.2.17