Files
archived-pcsx2/pcsx2/Sio.h
avihal@gmail.com c75334bc11 MCD manager: refinements and improvements:
1. automatic apply of create/delete/copy/rename without the annoying "do this and that" dialogs.
2. auto-eject/insert mcd after mcd changes (useful especially when replacing one enabled-and-used card with another).
3. double-click/enter a line at the list invokes rename/create
4. only disabled ports are gray (easier to look at - previously: also empty)
5. when creating a new card, enter (at the name selection box) is enough to continue
6. list now stretched properly with the page.
7. Automatic creation of mcd file when opening the manager and a card is enabled but doesn't exist (easier to manage, would've been created on boot anyway).
8. as a result, now properly handles initial post-install/setup state.
9. auto eject/insert of mcd now displays at the console (also for loadstate, if applicable)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4433 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-03-14 21:20:23 +00:00

71 lines
1.8 KiB
C

/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2010 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 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 PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// Let's enable this to free the IOP event handler of some considerable load.
// Games are highly unlikely to need timed IRQ's for PAD and MemoryCard handling anyway (rama).
#define SIO_INLINE_IRQS
struct _sio
{
u16 StatReg;
u16 ModeReg;
u16 CtrlReg;
u16 BaudReg;
u8 buf[256];
u32 bufcount;
u32 parp;
u32 mcdst,rdwr;
u8 adrH,adrL;
u32 padst;
u32 mtapst;
u32 packetsize;
u8 terminator;
u8 mode;
u8 mc_command;
u32 lastsector;
u32 sector;
u32 k;
u32 count;
// Active pad slot for each port. Not sure if these automatically reset after each read or not.
u8 activePadSlot[2];
// Active memcard slot for each port. Not sure if these automatically reset after each read or not.
u8 activeMemcardSlot[2];
int GetMemcardIndex() const
{
return (CtrlReg&0x2000) >> 13;
}
int GetMultitapPort() const
{
return (CtrlReg&0x2000) >> 13;
}
};
extern _sio sio;
extern void sioInit();
extern u8 sioRead8();
extern void sioWrite8(u8 value);
extern void sioWriteCtrl16(u16 value);
extern void sioInterrupt();
extern void InitializeSIO(u8 value);
extern void SetForceMcdEjectTimeoutNow();