Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ThanosSiopoudis committed Oct 25, 2022
2 parents 5275711 + c8f8198 commit 1f4391f
Show file tree
Hide file tree
Showing 10 changed files with 206 additions and 146 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:

steps:
- name: Checkout libogc2
uses: actions/checkout@v2
uses: actions/checkout@main

- name: Checkout libfat
uses: actions/checkout@v2
uses: actions/checkout@main
with:
repository: extremscorner/libfat
path: libfat
Expand All @@ -26,7 +26,7 @@ jobs:
working-directory: libfat

- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@main
with:
name: libogc2
path: /opt/devkitpro/libogc2
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# libogc2

[![libogc2 build](https://github.com/extremscorner/libogc2/actions/workflows/continuous-integration-workflow.yml/badge.svg)](https://github.com/extremscorner/libogc2/actions/workflows/continuous-integration-workflow.yml)

## Projects using libogc2

- [GCMM](https://github.com/suloku/gcmm) - GameCube memory card manager
- [iplboot](https://github.com/redolution/iplboot) - Minimal GameCube IPL
- [Swiss](https://github.com/emukidid/swiss-gc) - The swiss army knife of GameCube homebrew
- [Wii64/Cube64](https://github.com/emukidid/Wii64) - Nintendo 64 emulator
3 changes: 2 additions & 1 deletion gc/ogc/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,13 @@ void L2Enhance(void);

void LCEnable(void);
void LCDisable(void);
BOOL LCIsEnable(void);
void LCLoadBlocks(void *,void *,u32);
void LCStoreBlocks(void *,void *,u32);
u32 LCLoadData(void *,void *,u32);
u32 LCStoreData(void *,void *,u32);
u32 LCQueueLength(void);
u32 LCQueueWait(u32);
void LCQueueWait(u32);
void LCFlushQueue(void);
void LCAlloc(void *,u32);
void LCAllocNoInvalidate(void *,u32);
Expand Down
10 changes: 10 additions & 0 deletions gc/ogc/video.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,16 @@ void VIDEO_Flush(void);
*/
void VIDEO_SetBlack(bool black);

void VIDEO_Set3D(bool threeD);

/*!
* \fn u32 VIDEO_GetRetraceCount(void)
* \brief Get current retrace count
*
* \return retracecount
*/
u32 VIDEO_GetRetraceCount(void);


/*!
* \fn u32 VIDEO_GetNextField(void)
Expand Down
9 changes: 8 additions & 1 deletion gc/wiiuse/wpad.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ enum {
WPAD_BALANCE_BOARD,
WPAD_MAX_WIIMOTES,
};


#define WPAD_LED_NONE 0x00
#define WPAD_LED_1 0x01
#define WPAD_LED_2 0x02
#define WPAD_LED_3 0x04
#define WPAD_LED_4 0x08

#define WPAD_BUTTON_2 0x0001
#define WPAD_BUTTON_1 0x0002
#define WPAD_BUTTON_B 0x0004
Expand Down Expand Up @@ -168,6 +174,7 @@ typedef void (*WPADDataCallback)(s32 chan, const WPADData *data);
typedef void (*WPADShutdownCallback)(s32 chan);

s32 WPAD_Init(void);
s32 WPAD_ControlLed(s32 chan,s32 leds);
s32 WPAD_ControlSpeaker(s32 chan,s32 enable);
s32 WPAD_ReadEvent(s32 chan, WPADData *data);
s32 WPAD_DroppedEvents(s32 chan);
Expand Down
9 changes: 3 additions & 6 deletions libogc/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,12 @@ u32 LCStoreData(void *dstAddr,void *srcAddr,u32 nCount)

u32 LCQueueLength(void)
{
u32 hid2 = mfspr(920);
return _SHIFTR(hid2,4,4);
return _SHIFTR(mfspr(920),24,4);
}

u32 LCQueueWait(u32 len)
void LCQueueWait(u32 len)
{
len++;
while(_SHIFTR(mfspr(920),4,4)>=len);
return len;
while(_SHIFTR(mfspr(920),24,4)>len);
}

void LCFlushQueue(void)
Expand Down
Loading

0 comments on commit 1f4391f

Please sign in to comment.