Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
libretro-handy
Commits
dba810a8
Unverified
Commit
dba810a8
authored
Oct 19, 2020
by
Libretro-Admin
Committed by
GitHub
Oct 19, 2020
Browse files
Merge pull request #84 from fjtrujy/master
# PS2 Support and BGR555
parents
4e4fccb0
6582bf09
Pipeline
#4641
passed with stages
in 6 minutes and 8 seconds
Changes
7
Pipelines
9
Hide whitespace changes
Inline
Side-by-side
.github/workflows/compilation.yml
0 → 100644
View file @
dba810a8
name
:
CI
on
:
push
:
pull_request
:
repository_dispatch
:
types
:
[
run_build
]
jobs
:
build-ps2
:
runs-on
:
ubuntu-latest
container
:
ps2dev/ps2dev:latest
steps
:
-
uses
:
actions/checkout@v2
-
name
:
Install dependencies
run
:
|
apk add build-base git bash
-
name
:
Compile project
run
:
|
make platform=ps2 -j$(nproc) clean && make platform=ps2 -j$(nproc)
-
name
:
Get short SHA
id
:
slug
run
:
echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
-
name
:
Upload artifacts
if
:
${{ success() }}
uses
:
actions/upload-artifact@v2
with
:
name
:
handy_libretro_ps2-${{ steps.slug.outputs.sha8 }}
path
:
handy_libretro_ps2.a
.gitlab-ci.yml
View file @
dba810a8
...
...
@@ -11,6 +11,8 @@ include:
file
:
'
/vita-static.yml'
-
project
:
'
libretro-infrastructure/ci-templates'
file
:
'
/psp-static.yml'
-
project
:
'
libretro-infrastructure/ci-templates'
file
:
'
/ps2-static.yml'
-
project
:
'
libretro-infrastructure/ci-templates'
file
:
'
/linux-x64.yml'
-
project
:
'
libretro-infrastructure/ci-templates'
...
...
@@ -71,3 +73,8 @@ libretro-build-psp:
extends
:
-
.core-defs
-
.libretro-psp-static-retroarch-master
libretro-build-ps2
:
extends
:
-
.core-defs
-
.libretro-ps2-static-retroarch-master
Makefile
View file @
dba810a8
...
...
@@ -146,6 +146,17 @@ else ifeq ($(platform), sncps3)
STATIC_LINKING
:=
1
LIBS
:=
# PS2
else
ifeq
($(platform),ps2)
TARGET
:=
$(TARGET_NAME)
_libretro_
$(platform)
.a
CC
=
ee-gcc
$(EXE_EXT)
CXX
=
ee-g++
$(EXE_EXT)
AR
=
ee-ar
$(EXE_EXT)
FLAGS
+=
-G0
-DPS2
-DABGR1555
-DHAVE_NO_LANGEXTRA
INCFLAGS_PLATFORM
+=
-O3
STATIC_LINKING
:=
1
LIBS
:=
# PSP
else
ifeq
($(platform),psp1)
TARGET
:=
$(TARGET_NAME)
_libretro_
$(platform)
.a
...
...
blip/Blip_Buffer.cpp
View file @
dba810a8
...
...
@@ -23,6 +23,11 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
#include BLARGG_ENABLE_OPTIMIZER
#endif
#if defined(PS2)
#define __LONG_LONG_MAX__ 9223372036854775807LL
#define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1)
#endif
Blip_Buffer
::
Blip_Buffer
()
{
factor_
=
(
blip_u64
)
ULLONG_MAX
;
...
...
libretro/libretro.cpp
View file @
dba810a8
...
...
@@ -200,7 +200,11 @@ static void lynx_rotate()
switch
(
RETRO_PIX_DEPTH
)
{
case
15
:
lynx
->
DisplaySetAttributes
(
lynx_rot
,
MIKIE_PIXEL_FORMAT_16BPP_555
,
RETRO_LYNX_WIDTH
*
2
,
lynx_display_callback
,
(
ULONG
)
0
);
break
;
#if defined(ABGR1555)
case
16
:
lynx
->
DisplaySetAttributes
(
lynx_rot
,
MIKIE_PIXEL_FORMAT_16BPP_BGR555
,
RETRO_LYNX_WIDTH
*
2
,
lynx_display_callback
,
(
ULONG
)
0
);
break
;
#else
case
16
:
lynx
->
DisplaySetAttributes
(
lynx_rot
,
MIKIE_PIXEL_FORMAT_16BPP_565
,
RETRO_LYNX_WIDTH
*
2
,
lynx_display_callback
,
(
ULONG
)
0
);
break
;
#endif
case
24
:
lynx
->
DisplaySetAttributes
(
lynx_rot
,
MIKIE_PIXEL_FORMAT_32BPP
,
RETRO_LYNX_WIDTH
*
4
,
lynx_display_callback
,
(
ULONG
)
0
);
break
;
default:
lynx
->
DisplaySetAttributes
(
lynx_rot
,
MIKIE_PIXEL_FORMAT_32BPP
,
RETRO_LYNX_WIDTH
*
4
,
lynx_display_callback
,
(
ULONG
)
0
);
break
;
}
...
...
lynx/mikie.cpp
View file @
dba810a8
...
...
@@ -872,6 +872,13 @@ void CMikie::DisplaySetAttributes(ULONG Rotate,ULONG Format,ULONG Pitch,UBYTE* (
mColourMap
[
Spot
.
Index
]
|=
(
Spot
.
Colours
.
Blue
>>
2
)
&
0x03
;
}
break
;
case
MIKIE_PIXEL_FORMAT_16BPP_BGR555
:
for
(
Spot
.
Index
=
0
;
Spot
.
Index
<
4096
;
Spot
.
Index
++
)
{
mColourMap
[
Spot
.
Index
]
=
((
Spot
.
Colours
.
Blue
<<
11
)
&
0x7800
)
|
(
Spot
.
Colours
.
Blue
<<
7
)
&
0x0400
;
mColourMap
[
Spot
.
Index
]
|=
((
Spot
.
Colours
.
Green
<<
6
)
&
0x03c0
)
|
((
Spot
.
Colours
.
Green
<<
2
)
&
0x0020
);
mColourMap
[
Spot
.
Index
]
|=
((
Spot
.
Colours
.
Red
<<
1
)
&
0x001e
)
|
((
Spot
.
Colours
.
Red
>>
3
)
&
0x0001
);
}
break
;
case
MIKIE_PIXEL_FORMAT_16BPP_555
:
for
(
Spot
.
Index
=
0
;
Spot
.
Index
<
4096
;
Spot
.
Index
++
)
{
mColourMap
[
Spot
.
Index
]
=
((
Spot
.
Colours
.
Red
<<
11
)
&
0x7800
)
|
(
Spot
.
Colours
.
Red
<<
7
)
&
0x0400
;
...
...
@@ -987,7 +994,7 @@ ULONG CMikie::DisplayRenderLine(void)
bitmap_tmp
+=
sizeof
(
UBYTE
);
}
}
}
else
if
(
mDisplayFormat
==
MIKIE_PIXEL_FORMAT_16BPP_555
||
mDisplayFormat
==
MIKIE_PIXEL_FORMAT_16BPP_565
)
{
}
else
if
(
mDisplayFormat
==
MIKIE_PIXEL_FORMAT_16BPP_BGR555
||
mDisplayFormat
==
MIKIE_PIXEL_FORMAT_16BPP_555
||
mDisplayFormat
==
MIKIE_PIXEL_FORMAT_16BPP_565
)
{
for
(
loop
=
0
;
loop
<
SCREEN_WIDTH
/
2
;
loop
++
)
{
source
=
mpRamPointer
[
mLynxAddr
];
if
(
mDISPCTL_Flip
)
{
...
...
@@ -1077,7 +1084,7 @@ ULONG CMikie::DisplayRenderLine(void)
}
}
mpDisplayCurrent
-=
sizeof
(
UBYTE
);
}
else
if
(
mDisplayFormat
==
MIKIE_PIXEL_FORMAT_16BPP_555
||
mDisplayFormat
==
MIKIE_PIXEL_FORMAT_16BPP_565
)
{
}
else
if
(
mDisplayFormat
==
MIKIE_PIXEL_FORMAT_16BPP_BGR555
||
mDisplayFormat
==
MIKIE_PIXEL_FORMAT_16BPP_555
||
mDisplayFormat
==
MIKIE_PIXEL_FORMAT_16BPP_565
)
{
for
(
loop
=
0
;
loop
<
SCREEN_WIDTH
/
2
;
loop
++
)
{
source
=
mpRamPointer
[
mLynxAddr
];
if
(
mDISPCTL_Flip
)
{
...
...
@@ -1173,7 +1180,7 @@ ULONG CMikie::DisplayRenderLine(void)
}
}
mpDisplayCurrent
+=
sizeof
(
UBYTE
);
}
else
if
(
mDisplayFormat
==
MIKIE_PIXEL_FORMAT_16BPP_555
||
mDisplayFormat
==
MIKIE_PIXEL_FORMAT_16BPP_565
)
{
}
else
if
(
mDisplayFormat
==
MIKIE_PIXEL_FORMAT_16BPP_BGR555
||
mDisplayFormat
==
MIKIE_PIXEL_FORMAT_16BPP_555
||
mDisplayFormat
==
MIKIE_PIXEL_FORMAT_16BPP_565
)
{
for
(
loop
=
0
;
loop
<
SCREEN_WIDTH
/
2
;
loop
++
)
{
source
=
mpRamPointer
[
mLynxAddr
];
if
(
mDISPCTL_Flip
)
{
...
...
@@ -1290,6 +1297,7 @@ ULONG CMikie::DisplayEndOfFrame(void)
case
MIKIE_PIXEL_FORMAT_8BPP
:
mpDisplayCurrent
+=
1
*
(
HANDY_SCREEN_HEIGHT
-
1
);
break
;
case
MIKIE_PIXEL_FORMAT_16BPP_BGR555
:
case
MIKIE_PIXEL_FORMAT_16BPP_555
:
case
MIKIE_PIXEL_FORMAT_16BPP_565
:
mpDisplayCurrent
+=
2
*
(
HANDY_SCREEN_HEIGHT
-
1
);
...
...
lynx/mikie.h
View file @
dba810a8
...
...
@@ -174,6 +174,7 @@ enum
enum
{
MIKIE_PIXEL_FORMAT_8BPP
=
0
,
MIKIE_PIXEL_FORMAT_16BPP_BGR555
,
MIKIE_PIXEL_FORMAT_16BPP_555
,
MIKIE_PIXEL_FORMAT_16BPP_565
,
MIKIE_PIXEL_FORMAT_24BPP
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment