Sergey Lipskiy
291323a049
Add check that buffer's bound is inside RDRAM. Cut buffer's height if necessary.
...
Fixed Lylat Wars - Crash On ROM-Start #363
2015-05-13 10:21:01 +06:00
Sergey Lipskiy
c6d034c692
Don't use smooth filtering in FrameBufferToRDRAM::CopyToRDRAM.
2015-05-13 10:21:00 +06:00
Sergey Lipskiy
3d55b086ee
Add new fb validity check method: by checksum.
...
It is more safe than filling RDRAM with fillcolor, but not compatible with
Mario Tennis.
Thus it is made optional.
Fixed Perfect Dark - Crash often #323
2015-05-13 10:20:55 +06:00
Sergey Lipskiy
6fa0204709
Replace Adler32 by more faster textureCRC from Glide64.
...
textureCRC is good enough to calculate checksum of frame buffer.
2015-05-13 10:20:54 +06:00
Sergey Lipskiy
ce07d2be5a
Fix depth buffer creation.
...
Corrected crash in Blast Corps, issue #125
2015-05-13 10:20:52 +06:00
Sergey Lipskiy
9a556978ba
Add hack for LEGO racers course map:
...
copy RDRAM content to new buffer.
Fixed issue #314
2015-05-13 10:20:48 +06:00
Sergey Lipskiy
ebc5d5bef3
Implement fake copy color buffer to RDRAM for Zelda OOT.
...
Fixed Ocarina of Time pause delay #327
2015-05-13 10:20:48 +06:00
Sergey Lipskiy
5bad15abd9
Correct scissor set in FrameBuffer and DepthBuffer.
2015-05-13 10:20:43 +06:00
Sergey Lipskiy
f76de6450a
Correct gSP.changed and gDP.changed in RDRAMtoFrameBuffer::CopyFromRDRAM
2015-05-13 10:20:43 +06:00
Sergey Lipskiy
d1583b2396
Correct FrameBufferList::renderBuffer -
...
add check that BlitFramebuffer coordinates are inside the buffer.
2015-05-13 10:20:39 +06:00
Sergey Lipskiy
b136d05a3d
Correct FrameBufferList::removeBuffer and FrameBufferList::removeBuffer -
...
null current buffer if removed buffer is the current one.
2015-05-13 10:20:37 +06:00
Sergey Lipskiy
e4599870f3
Minor corrections in DepthBufferToRDRAM::CopyToRDRAM
2015-05-13 10:20:35 +06:00
Sergey Lipskiy
1715a8a3d0
Fix _copyDepthBuffer().
...
Fixed LoT in Zelda MM
2015-05-13 10:20:33 +06:00
Sergey Lipskiy
88acd219a0
Add check that depth image is inside RDRAM bound in DepthBufferToRDRAM::CopyToRDRAM
2015-05-13 10:20:32 +06:00
Sergey Lipskiy
914b23f7db
Code cleanup: remove redundant glEnable(GL_SCISSOR_TEST) from FrameBufferList::renderBuffer()
2015-05-13 10:20:27 +06:00
Sergey Lipskiy
9dbbeca65c
Code cleanup: Move implementation of static get() functions into .cpp files
2015-05-13 10:20:23 +06:00
Sergey Lipskiy
06da08e349
Fix RDRAMtoFrameBuffer::CopyFromRDRAM - if color is black, set alpha black also
...
Fixed Doraemon - Mittsu no Seireiseki, issue #313
2015-05-13 10:20:20 +06:00
Sergey Lipskiy
4553f0345e
Fix RDRAMtoFrameBuffer::CopyFromRDRAM:
...
clear buffer in RDRAM only when current buffer was changed.
Otherwise it is possible that game already uses the buffer for other purpose,
and the clear will overwrite the data.
Fixed Donkey Kong 64 intro, issue #308
2015-05-13 10:20:20 +06:00
Sergey Lipskiy
080900e553
Remove redundant calls to video() functions in FrameBuffer::_initTexture
2015-05-13 10:20:12 +06:00
Sergey Lipskiy
cbae8d686a
Use Adler32 instead of CRC32 for frame buffer checksum calculation.
2015-05-13 10:20:10 +06:00
Sergey Lipskiy
cf7d29a507
Use PBOBinder in FrameBufferToRDRAM::CopyToRDRAM and FrameBufferToRDRAM::CopyToRDRAM
2015-05-13 10:20:09 +06:00
Sergey Lipskiy
778d1e38d5
Add target parameter to PBOBinder struct.
2015-05-13 10:20:09 +06:00
Sergey Lipskiy
905385f251
Correct texture size for RDRAMtoFrameBuffer
2015-05-13 10:20:08 +06:00
Sergey Lipskiy
175598d819
Correct PBO mode for FrameBufferToRDRAM and DepthBufferToRDRAM.
2015-05-13 10:20:07 +06:00
Sergey Lipskiy
30d6792a17
Check buffers intersection even when nothing was drawn to the current buffer.
...
Fixed buffer overflow in Lode Runner.
2015-05-13 10:19:48 +06:00
Sergey Lipskiy
1152f9413c
Correct condition for FrameBuffer::m_needHeightCorrection.
...
Fixed screen shake in Mario Tennis (E), issue #296
2015-05-13 10:19:47 +06:00
Sergey Lipskiy
e27d235544
Don't reset m_cleared flag for selected frame buffer.
...
Fixed fb issues in ISS 2000, #214
2015-05-13 10:19:39 +06:00
Sergey Lipskiy
d4f0407b1f
Code cleanup: remove unused variables in DepthBufferToRDRAM::CopyToRDRAM.
2015-05-13 10:19:38 +06:00
Sergey Lipskiy
0ea5ae34e0
Correct scissor for blit operation.
2015-05-13 10:19:38 +06:00
Sergey Lipskiy
395eb362f1
Don't save depth buffer when found buffer's width is less than VI.width.
...
Otherwise out of memory writes are possible.
That may happen when switching from interlaced to non-interlaced mode.
Fixed crash/freeze in Perfect Dark, issue #285
2015-05-13 10:19:36 +06:00
Sergey Lipskiy
9935dab147
Correct dirty hack for Mario Tennis scoreboard:
...
- do not clear RDRAM area for screboard buffers
- reload scoreboard texture to the buffer when buffer is selected or its height is corrected.
2015-05-13 10:19:35 +06:00
Sergey Lipskiy
ff085b0cbf
Correct RDRAMtoFrameBuffer::CopyFromRDRAM
2015-05-13 10:19:34 +06:00
Sergey Lipskiy
f5ca94b1ef
Remove frame buffer validity check by buffer address written at the origin
...
of the buffer in RDRAM. This is unreliable method.
2015-05-13 10:19:32 +06:00
Sergey Lipskiy
cbdacb58d8
Don't call FrameBufferList::_findBuffer until buffer's actual height is not detected.
...
Otherwise wrong buffers can be removed.
Fixed auxilary buffers creation in Pokemon Stadium menu.
2015-05-13 10:19:25 +06:00
Sergey Lipskiy
5384e189c4
Don't discard frame buffers creation when VI.height == 0
...
Fixed auxilary color buffers creation in Pokemon Stadium.
2015-05-13 10:19:25 +06:00
Sergey Lipskiy
66f7af5a59
Always correct height for auxilary buffers.
2015-05-13 10:19:24 +06:00
Sergey Lipskiy
4ff13a30e6
Correct FrameBufferList::removeBuffers : remove all buffers with given width.
...
Fixed issue with Pokemon Stadium, which set zero VI height before
interlace mode switch.
2015-05-13 10:19:23 +06:00
Sergey Lipskiy
3ac4f2ddb1
Fix crash in FrameBufferList::renderBuffer when m_pCurrent is NULL
2015-05-13 10:19:22 +06:00
Sergey Lipskiy
4e7a5a6b9e
Do not remove auxilary color buffers on interlaced mode switch.
...
Fixed removal of color buffers with pokemon portraits in Pokemon Stadium 2.
2015-05-13 10:19:21 +06:00
Sergey Lipskiy
ea3e81540b
Correct FrameBuffer_ActivateBufferTexture:
...
use buffer's scale instead of scale currently set in video.
Fixed pokemon portraits size in Pokemon Stadium 2.
2015-05-13 10:19:21 +06:00
Sergey Lipskiy
3da54c5616
Re-init frame buffer if its new height is larger than its current one.
2015-05-13 10:19:20 +06:00
Sergey Lipskiy
dfabb7d105
Replace FrameBufferList::isFboMode() check by FrameBufferList::getCurrent() != NULL
2015-05-13 10:19:19 +06:00
Sergey Lipskiy
f4e1afa30c
Split hack_noDepthFrameBuffers on two options:
...
hack_noDepthFrameBuffers and hack_blurPauseScreen.
hack_blurPauseScreen is for games, which copy color buffer into depth buffer area,
blur it and use as background image. Examples: Conker BFD, Mickey USA
hack_noDepthFrameBuffers is for games, which never use depth buffer area as texture
Example: F-1 Pole Position, Mario Golf.
2015-05-13 10:19:18 +06:00
Sergey Lipskiy
e9b406d134
Add special frame buffer flag for Ogre Battle backgrounds.
...
It should protect such buffers from being overwritten by FrameBufferToRDRAM::CopyToRDRAM.
2015-05-13 10:19:17 +06:00
Sergey Lipskiy
2f83ab8963
Correct code for 'noDepthBuffers' situation.
...
Enable 'noDepthBuffers' for "MICKEY USA".
Fixed pause screen in "MICKEY USA"
2015-05-13 10:19:16 +06:00
Sergey Lipskiy
f41bd934ef
Disable RDRAM clear for depth frame buffers.
2015-05-13 10:19:16 +06:00
Sergey Lipskiy
f9f3dc6ede
Fix m_isDepthBuffer flag set.
2015-05-13 10:19:15 +06:00
Sergey Lipskiy
189b594118
Reset buffer's m_RdramCrc and m_validityChecked on buffer change.
2015-05-13 10:19:14 +06:00
Sergey Lipskiy
4a9e7cdc1f
New FB validity check based on checksum of RDRAM content.
2015-05-13 10:19:14 +06:00
Sergey Lipskiy
b0e86e2cbc
Limit frame buffer height by VI.height if buffer width == VI.width
...
Fixed flicker in Bomberman 2 map screen. The game sets scissor.lry = 250 here,
while VI.height is 240. Actual frame buffer height is 240. Making it 250
causes wrong selection of that buffer on VI update.
2015-05-13 10:19:00 +06:00