過去ログ

                                Page     149
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   通常モードに戻る  ┃  INDEX  ┃  ≪前へ  │  次へ≫   
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 ▼Pokkun Moguraa  Feather 03/11/15(土) 23:11

 ───────────────────────────────────────
 ■題名 : Pokkun Moguraa
 ■名前 : Feather
 ■日付 : 03/11/15(土) 23:11
 -------------------------------------------------------------------------
   Info:
Patches VirtuaNES 0.86a for use with the thumbpad.

Note:
"Edit->Advanced->Untabify Selection" used

***NOT TESTED***
Patch:

[NES/PadEX/EXPAD_PokkunMoguraa.cpp]

//////////////////////////////////////////////////////////////////////////
// Pokkun Moguraa Thumbpad
//
// Original source: Unofficial Nester
//////////////////////////////////////////////////////////////////////////

void EXPAD_PokkunMoguraa::Reset()
{
 bits = 0;
}

void EXPAD_PokkunMoguraa::Strobe()
{
 nes->pad->pad1bit &= ~0xFF;
 if( DirectInput.m_Sw[DIK_T] ) nes->pad->pad1bit |= 0x08;
 if( DirectInput.m_Sw[DIK_G] ) nes->pad->pad1bit |= 0x04;
}

BYTE EXPAD_PokkunMoguraa::Read4017()
{
 return bits;
}

void EXPAD_PokkunMoguraa::Write4016( BYTE data )
{
 bits = 0x00;

 if( !(data & 0x04) ) {
  if( DirectInput.m_Sw[DIK_R] ) bits |= 0x10;
  if( DirectInput.m_Sw[DIK_E] ) bits |= 0x08;
  if( DirectInput.m_Sw[DIK_W] ) bits |= 0x04;
  if( DirectInput.m_Sw[DIK_Q] ) bits |= 0x02;
 }
 if( !(data & 0x02) ) {
  if( DirectInput.m_Sw[DIK_F] ) bits |= 0x10;
  if( DirectInput.m_Sw[DIK_D] ) bits |= 0x08;
  if( DirectInput.m_Sw[DIK_S] ) bits |= 0x04;
  if( DirectInput.m_Sw[DIK_A] ) bits |= 0x02;
 }
 if( !(data & 0x01) ) {
  if( DirectInput.m_Sw[DIK_V] ) bits |= 0x10;
  if( DirectInput.m_Sw[DIK_C] ) bits |= 0x08;
  if( DirectInput.m_Sw[DIK_X] ) bits |= 0x04;
  if( DirectInput.m_Sw[DIK_Z] ) bits |= 0x02;
 }
}

void EXPAD_PokkunMoguraa::SetSyncData( INT type, LONG data )
{
 bits = (BYTE)data;
}

LONG EXPAD_PokkunMoguraa::GetSyncData( INT type )
{
 return bits;
}

--------------------------------------------------------

[NES/PadEX/EXPAD_PokkunMoguraa.h]

//////////////////////////////////////////////////////////////////////////
// Pokkun Moguraa Thumbpad                       //
//////////////////////////////////////////////////////////////////////////
class EXPAD_PokkunMoguraa : public EXPAD
{
public:
 EXPAD_PokkunMoguraa( NES* parent ) : EXPAD( parent ) {}

 void Reset();
 void Strobe();

 BYTE Read4017();
 void Write4016( BYTE data );

 void SetSyncData( INT type, LONG data );
 LONG GetSyncData( INT type );

protected:
 BYTE bits;

private:
};

--------------------------------------------------------

[NES/PAD.cpp]

(line 173)
 if( crc == 0x3993b4eb ) {    // Pokkun Moguraa (J)
  SetExController( EXCONTROLLER_POKKUNMOGURAA );
 }

(line 244)
  case EXCONTROLLER_POKKUNMOGURAA:
   expad = new EXPAD_PokkunMoguraa( nes );
   break;
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━    通常モードに戻る  ┃  INDEX  ┃  ≪前へ  │  次へ≫    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━                                 Page 149