picodrive.git
7 years agoMerge branch 'libretro' into libretro-reset libretro-reset github/libretro-reset
notaz [Sat, 14 Oct 2017 18:31:28 +0000 (21:31 +0300)]
Merge branch 'libretro' into libretro-reset

This effectively resets libretro git to upstream and syncs both repos.
Everything in platform/libretro should be retained as I imported that in
my git verbatim, but some core changes may be lost and will have to be
redone. I've checked that picodrive_libretro.so builds and works on x86,
and Android also builds for all archs. I've even bothered to try it
under msvc where it's building for me too.

With this you also get the benefits from significant accuracy improvement
work from 1.92.

7 years agoget rid of custom memcpy funcs
notaz [Sat, 14 Oct 2017 18:10:25 +0000 (21:10 +0300)]
get rid of custom memcpy funcs

not used for anything important, just a maintenance burden

7 years agofix clang build
notaz [Fri, 13 Oct 2017 23:13:40 +0000 (02:13 +0300)]
fix clang build

yet another workaround for it...

7 years agolet it build on msvc
notaz [Sat, 14 Oct 2017 18:28:24 +0000 (21:28 +0300)]
let it build on msvc

supposedly for the original XBox?

7 years agodrop draw_amips from libretro too
notaz [Fri, 13 Oct 2017 20:53:15 +0000 (23:53 +0300)]
drop draw_amips from libretro too

There's no proof it's any faster, it's only a maintenance burden.
See also 4aedc593008ca6e9230b700cec6483c3ecd73bef .

7 years agodrop some unnecessary inlines
notaz [Fri, 13 Oct 2017 20:49:13 +0000 (23:49 +0300)]
drop some unnecessary inlines

apparently somebody compiles with msvc?

7 years agoandroid: make armeabi buildable
notaz [Fri, 13 Oct 2017 20:38:09 +0000 (23:38 +0300)]
android: make armeabi buildable

7 years agolibretro: satisfy vita's dynarec needs in a cleaner way
notaz [Fri, 13 Oct 2017 20:36:51 +0000 (23:36 +0300)]
libretro: satisfy vita's dynarec needs in a cleaner way

7 years agolibretro: update for core changes
notaz [Fri, 13 Oct 2017 20:36:36 +0000 (23:36 +0300)]
libretro: update for core changes

also drops the broken "fps override" feature

7 years agolibretro: drop sram clear
notaz [Fri, 13 Oct 2017 20:31:22 +0000 (23:31 +0300)]
libretro: drop sram clear

It's done by the core. If the core is missing something, core itself
needs to be fixed.

7 years agosome portability cleanups
notaz [Fri, 13 Oct 2017 20:30:44 +0000 (23:30 +0300)]
some portability cleanups

7 years agore-import all libretro code from it's fork
notaz [Thu, 12 Oct 2017 21:39:51 +0000 (00:39 +0300)]
re-import all libretro code from it's fork

Verbatim copy from https://github.com/libretro/picodrive/ commit
9ae88ef15ff00cacc3877c7ecc13b0092bab50b8 , so look there for the history
of libretro specific changes. Unfortunately there is too much noise and
divergence to merge this in a proper way.

7 years agoFix remaining bugs and fix indentation
iLag [Sun, 26 Mar 2017 03:28:08 +0000 (20:28 -0700)]
Fix remaining bugs and fix indentation

7 years agoRestore support for short GG cheats.
iLag [Sun, 26 Mar 2017 02:35:36 +0000 (19:35 -0700)]
Restore support for short GG cheats.

7 years agoAdd support for Master System cheats.
iLag [Sun, 26 Mar 2017 02:29:00 +0000 (19:29 -0700)]
Add support for Master System cheats.

notaz: drop wrong code (PicoWrite8_z80 are 68k functions, not for sms)

7 years agoAdd support for single-line cheats and PAR codes.
iLag [Wed, 22 Mar 2017 21:19:35 +0000 (14:19 -0700)]
Add support for single-line cheats and PAR codes.

notaz: include required header

7 years agoFix the lprintf method (libretro side)
David [Tue, 24 Nov 2015 12:49:31 +0000 (13:49 +0100)]
Fix the lprintf method (libretro side)

The lprintf method used the format string instead of the buffer build
from va_list

7 years agobuild: some clean ups
notaz [Thu, 12 Oct 2017 21:40:45 +0000 (00:40 +0300)]
build: some clean ups

7 years agobuild: drop function-sections
notaz [Thu, 12 Oct 2017 21:40:30 +0000 (00:40 +0300)]
build: drop function-sections

this has provoked people to do some horrible ifdeffery in libretro fork,
while the benefit is minimal, if any.

7 years agorelease 1.92 v1.92
notaz [Wed, 4 Oct 2017 20:01:56 +0000 (23:01 +0300)]
release 1.92

7 years agofix cell scroll drawing
notaz [Sun, 8 Oct 2017 19:33:04 +0000 (22:33 +0300)]
fix cell scroll drawing

7 years agofame: fix roxr
notaz [Mon, 9 Oct 2017 23:00:28 +0000 (02:00 +0300)]
fame: fix roxr

also take interrupts on exit, like other cores do

7 years agorework sr
notaz [Mon, 9 Oct 2017 22:13:48 +0000 (01:13 +0300)]
rework sr

note to self:

h32 0x10A .. 0x127 0x1D2 .. 0x1FF 0x000 .. 0x109
pclk      30      |      46      |      266      = 342
hbset       0x126        ...       0x009
pclk   29  |      1   +  46    +  10    |  256
mclk   290 |           570              |  2560  = 3420
68kclk 41.4            81.4               365.7 ~= 488.5

h40 0x14A .. 0x16C 0x1C9 .. 0x1FF 0x000 .. 0x149
pclk      35      |      55      |      330      = 420
hbset       0x166        ...       0x00A
pclk   28  |      7   +  55    +  11    |  319
mclk  28*8 | 7*8   4*8+314+10+(18+11)*8 | 319*8  = 3420
68kclk  32             92                 364.5 ~= 488.5

7 years agosome irq hacks
notaz [Fri, 6 Oct 2017 21:08:05 +0000 (00:08 +0300)]
some irq hacks

notes to self (derived from Nemesis):

H32: 0x10A .. 0x127 0x1D2 .. 0x1FF 0x000 0x001
pclk       30             46          1 |0x109
mclk                 770                | 2650   = 3420
68kclk              110                   378.5 ~= 488.5

H40: 0x14A .. 0x16C 0x1C9 .. 0x1FF 0x000 0x001
pclk       35             55          1
mclk     35*8       4*8+314+10+19*8     |0x149*8
                  788                   | 2632   = 3420
68kclk           112.5                    376   ~= 488.5

7 years agoupdate libpicofe
notaz [Thu, 5 Oct 2017 22:26:12 +0000 (01:26 +0300)]
update libpicofe

7 years agofix t574 reset
notaz [Thu, 5 Oct 2017 22:31:11 +0000 (01:31 +0300)]
fix t574 reset

7 years agosplit memories away from Pico
notaz [Wed, 4 Oct 2017 23:06:21 +0000 (02:06 +0300)]
split memories away from Pico

saves ~3k of code on ARM because Pico no longer crosses ldr limit

7 years agodrop legacy save support
notaz [Thu, 5 Oct 2017 22:34:24 +0000 (01:34 +0300)]
drop legacy save support

the format has been changed like 10 years ago

7 years agodrop unmaintained mips code
notaz [Wed, 4 Oct 2017 20:48:57 +0000 (23:48 +0300)]
drop unmaintained mips code

can always be brought back if anyone has proof it's faster

7 years agovdp timing hacks
notaz [Tue, 3 Oct 2017 23:58:48 +0000 (02:58 +0300)]
vdp timing hacks

7 years agoadjust z80 timing a bit
notaz [Tue, 3 Oct 2017 23:23:27 +0000 (02:23 +0300)]
adjust z80 timing a bit

7 years agofix various logging issues
notaz [Tue, 3 Oct 2017 20:02:47 +0000 (23:02 +0300)]
fix various logging issues

7 years agomenu: add reset hotkey
notaz [Tue, 3 Oct 2017 20:00:39 +0000 (23:00 +0300)]
menu: add reset hotkey

7 years agosome more risky timing changes
notaz [Mon, 2 Oct 2017 20:38:12 +0000 (23:38 +0300)]
some more risky timing changes

But should be closer to the real thing.
Let's see what this will break...

7 years agofix underalloc
notaz [Sat, 30 Sep 2017 23:42:24 +0000 (02:42 +0300)]
fix underalloc

7 years agosome poor timing improvement attempts
notaz [Sat, 30 Sep 2017 22:29:08 +0000 (01:29 +0300)]
some poor timing improvement attempts

7 years agoslightly better z80 vdp reads
notaz [Sat, 30 Sep 2017 21:59:44 +0000 (00:59 +0300)]
slightly better z80 vdp reads

7 years agoimprove fast forward for cd
notaz [Sat, 30 Sep 2017 21:03:54 +0000 (00:03 +0300)]
improve fast forward for cd

still broken, but a little bit better

7 years agohandle frequent psg updates
notaz [Sat, 30 Sep 2017 19:55:57 +0000 (22:55 +0300)]
handle frequent psg updates

7 years agosn76496: simplify writes
notaz [Sat, 30 Sep 2017 15:14:20 +0000 (18:14 +0300)]
sn76496: simplify writes

7 years agoclean up dac code a bit
notaz [Fri, 29 Sep 2017 23:23:13 +0000 (02:23 +0300)]
clean up dac code a bit

7 years agostate: setup banks before CPUs on load
notaz [Fri, 29 Sep 2017 21:17:04 +0000 (00:17 +0300)]
state: setup banks before CPUs on load

7 years agosimple ym2612 fixes
notaz [Fri, 6 Oct 2017 22:36:22 +0000 (01:36 +0300)]
simple ym2612 fixes

7 years agofix ym2612 asm, rework EG
notaz [Fri, 29 Sep 2017 21:19:55 +0000 (00:19 +0300)]
fix ym2612 asm, rework EG

this should be split, but I'm lazy
EG saves ~900 bytes

7 years agosome support for vdp debug reg
notaz [Thu, 28 Sep 2017 00:16:21 +0000 (03:16 +0300)]
some support for vdp debug reg

7 years agosimplify tile drawing
notaz [Thu, 28 Sep 2017 00:19:36 +0000 (03:19 +0300)]
simplify tile drawing

cuts away 1126 bytes of code on x86

7 years agoscroll size improvement
notaz [Tue, 26 Sep 2017 23:59:50 +0000 (02:59 +0300)]
scroll size improvement

7 years agosome support for 128k mode
notaz [Tue, 26 Sep 2017 21:20:52 +0000 (00:20 +0300)]
some support for 128k mode

7 years agoallow limited z80 vdp access
notaz [Mon, 25 Sep 2017 23:59:31 +0000 (02:59 +0300)]
allow limited z80 vdp access

lame and totally wrong timing

7 years agorecognize the MED ssf2 header
notaz [Mon, 25 Sep 2017 20:41:34 +0000 (23:41 +0300)]
recognize the MED ssf2 header

7 years agorelax the bank check
notaz [Mon, 25 Sep 2017 20:37:54 +0000 (23:37 +0300)]
relax the bank check

there is 512K padding on load

7 years agofame: always update the fetch map
notaz [Mon, 25 Sep 2017 20:34:34 +0000 (23:34 +0300)]
fame: always update the fetch map

should just get rid of that thing, it's annoying

7 years agodon't miss the sprite check
notaz [Mon, 25 Sep 2017 00:00:20 +0000 (03:00 +0300)]
don't miss the sprite check

DrawAllSprites depends on HighLnSpr, so prepare in DrawAllSprites was a
bad idea as lots of things may have changed

7 years agosome dma improvements
notaz [Sat, 23 Sep 2017 22:27:31 +0000 (01:27 +0300)]
some dma improvements

no idea if anything needs this, shouldn't hurt either

7 years agomake dma honour banking
notaz [Thu, 21 Sep 2017 23:16:15 +0000 (02:16 +0300)]
make dma honour banking

I was sure I had it done before, turns out not.

7 years agointegrate SPI EEPROM
notaz [Thu, 21 Sep 2017 23:00:50 +0000 (02:00 +0300)]
integrate SPI EEPROM

7 years agoimport SPI EEPROM from Genesis-Plus-GX
notaz [Thu, 21 Sep 2017 21:46:42 +0000 (00:46 +0300)]
import SPI EEPROM from Genesis-Plus-GX

Author: EkeEke

7 years agoupdate libpicofe
notaz [Wed, 20 Sep 2017 20:46:28 +0000 (23:46 +0300)]
update libpicofe

7 years agomemory: allow SRAM word writes
notaz [Wed, 20 Sep 2017 20:43:38 +0000 (23:43 +0300)]
memory: allow SRAM word writes

Was allowing both low and high byte writes by byte, but not word,
which was stupid.

7 years agoworkaround idledet breaking op test
notaz [Wed, 20 Sep 2017 20:39:20 +0000 (23:39 +0300)]
workaround idledet breaking op test

7 years ago68k cores: fix bcd instructions
notaz [Wed, 20 Sep 2017 20:37:58 +0000 (23:37 +0300)]
68k cores: fix bcd instructions

passing flamewing's test now

7 years agofamec: adjust divu timing
notaz [Tue, 12 Sep 2017 22:58:44 +0000 (01:58 +0300)]
famec: adjust divu timing

it's wrong, but I need it to be consistent with other cores now

7 years agofamec: fix CHK
notaz [Tue, 12 Sep 2017 22:57:37 +0000 (01:57 +0300)]
famec: fix CHK

7 years agofamec: improve trace a bit
notaz [Tue, 12 Sep 2017 22:55:25 +0000 (01:55 +0300)]
famec: improve trace a bit

or break it (nobody uses it anyway), just want m68k_opcode_sizes to pass

7 years agomusashi: don't generate unneeded handlers
notaz [Tue, 12 Sep 2017 22:46:30 +0000 (01:46 +0300)]
musashi: don't generate unneeded handlers

at least move16 was incorrectly hooked up

7 years agomusashi: run same amount of cycles as other cores
notaz [Mon, 11 Sep 2017 22:26:49 +0000 (01:26 +0300)]
musashi: run same amount of cycles as other cores

for consistency

7 years agomusashi: fix build on newer gcc
notaz [Mon, 11 Sep 2017 22:25:26 +0000 (01:25 +0300)]
musashi: fix build on newer gcc

7 years agoMerge pull request #58 from psyke83/master
Twinaphex [Tue, 5 Sep 2017 19:50:12 +0000 (21:50 +0200)]
Merge pull request #58 from psyke83/master

libretro: fix unexpected reloc type 0x03 error on Raspberry Pi 3

7 years agolibretro: fix unexpected reloc type 0x03 error on Raspberry Pi 3
Conn O'Griofa [Tue, 5 Sep 2017 14:40:44 +0000 (15:40 +0100)]
libretro: fix unexpected reloc type 0x03 error on Raspberry Pi 3

Issue is caused by commit 66dda842eae01f47f5389b931ec9567fb0bbb6a1 in
cpu/cyclone submodule.

7 years ago32x: skip unnecessary bios work in cd mode
notaz [Fri, 18 Aug 2017 21:38:03 +0000 (00:38 +0300)]
32x: skip unnecessary bios work in cd mode

7 years agoAdd this to pico.h
twinaphex [Fri, 18 Aug 2017 05:13:20 +0000 (07:13 +0200)]
Add this to pico.h

7 years agoAttempt two to fix PSP
twinaphex [Fri, 18 Aug 2017 05:07:29 +0000 (07:07 +0200)]
Attempt two to fix PSP

7 years agoShould hopefully fix PSP
twinaphex [Fri, 18 Aug 2017 04:33:04 +0000 (06:33 +0200)]
Should hopefully fix PSP

7 years agoUpdate jni/Android.mk
twinaphex [Fri, 18 Aug 2017 03:19:05 +0000 (05:19 +0200)]
Update jni/Android.mk

7 years agoget rid of the silly unzip_stream
notaz [Sun, 16 Apr 2017 21:30:30 +0000 (00:30 +0300)]
get rid of the silly unzip_stream

... and just use zlib's inflate. Needed for the next commit.

7 years agouse system's zlib
notaz [Sun, 16 Apr 2017 21:34:00 +0000 (00:34 +0300)]
use system's zlib

except for libretro
github issue #45

7 years agofix broken error path
notaz [Sun, 16 Apr 2017 21:36:30 +0000 (00:36 +0300)]
fix broken error path

7 years agofix some warnings
notaz [Sun, 16 Apr 2017 21:36:57 +0000 (00:36 +0300)]
fix some warnings

warning: array subscript is above array bounds [-Warray-bounds]

7 years agosh2: handle some branch exceptions
notaz [Fri, 18 Aug 2017 00:44:25 +0000 (03:44 +0300)]
sh2: handle some branch exceptions

7 years agodrz80: drop fast_sp for compatibility
notaz [Thu, 10 Aug 2017 23:12:57 +0000 (02:12 +0300)]
drz80: drop fast_sp for compatibility

no measurable improvement in most cases anyway

7 years agoandroid: solve "text segment is not shareable"
notaz [Mon, 7 Aug 2017 23:25:37 +0000 (02:25 +0300)]
android: solve "text segment is not shareable"

Some asm is disabled and some performance is lost by this.

7 years agoget some gp2x stuff out of the way for others
notaz [Sun, 6 Aug 2017 20:22:53 +0000 (23:22 +0300)]
get some gp2x stuff out of the way for others

7 years agoremove dead code
notaz [Sun, 6 Aug 2017 20:02:28 +0000 (23:02 +0300)]
remove dead code

7 years agoeliminate texrels, part 3
notaz [Sun, 6 Aug 2017 19:25:26 +0000 (22:25 +0300)]
eliminate texrels, part 3

7 years agoconfigure: allow to override SDL_CONFIG
notaz [Sun, 6 Aug 2017 18:21:35 +0000 (21:21 +0300)]
configure: allow to override SDL_CONFIG

7 years agosome fps counter cosmetics
notaz [Sun, 6 Aug 2017 16:23:36 +0000 (19:23 +0300)]
some fps counter cosmetics

7 years agoeliminate texrels (wip2)
notaz [Sun, 6 Aug 2017 16:23:20 +0000 (19:23 +0300)]
eliminate texrels (wip2)

7 years agoeliminate texrels (wip)
notaz [Sat, 5 Aug 2017 23:03:35 +0000 (02:03 +0300)]
eliminate texrels (wip)

7 years agoremove some dead code
notaz [Sat, 5 Aug 2017 23:05:09 +0000 (02:05 +0300)]
remove some dead code

7 years agoUpdate jni/Android.mk
twinaphex [Fri, 18 Aug 2017 02:56:32 +0000 (04:56 +0200)]
Update jni/Android.mk

7 years agosh2: handle some branch exceptions
notaz [Fri, 18 Aug 2017 00:44:25 +0000 (03:44 +0300)]
sh2: handle some branch exceptions

7 years agoUpdate submodules
twinaphex [Thu, 17 Aug 2017 23:20:25 +0000 (01:20 +0200)]
Update submodules

7 years agofix android build
notaz [Thu, 3 Aug 2017 22:08:17 +0000 (01:08 +0300)]
fix android build

7 years agofix a name clash with newer zlib
notaz [Thu, 3 Aug 2017 21:36:13 +0000 (00:36 +0300)]
fix a name clash with newer zlib

7 years agodrz80: drop fast_sp for compatibility
notaz [Thu, 10 Aug 2017 23:12:57 +0000 (02:12 +0300)]
drz80: drop fast_sp for compatibility

no measurable improvement in most cases anyway

7 years agoandroid: solve "text segment is not shareable"
notaz [Mon, 7 Aug 2017 23:25:37 +0000 (02:25 +0300)]
android: solve "text segment is not shareable"

Some asm is disabled and some performance is lost by this.

7 years agoget some gp2x stuff out of the way for others
notaz [Sun, 6 Aug 2017 20:22:53 +0000 (23:22 +0300)]
get some gp2x stuff out of the way for others

7 years agoremove dead code
notaz [Sun, 6 Aug 2017 20:02:28 +0000 (23:02 +0300)]
remove dead code

7 years agoeliminate texrels, part 3
notaz [Sun, 6 Aug 2017 19:25:26 +0000 (22:25 +0300)]
eliminate texrels, part 3

7 years agoconfigure: allow to override SDL_CONFIG
notaz [Sun, 6 Aug 2017 18:21:35 +0000 (21:21 +0300)]
configure: allow to override SDL_CONFIG