Skip to content

Commit

Permalink
Merge pull request #183 from h4570/182-glitched-texture-on-skybox
Browse files Browse the repository at this point in the history
Fix glitched textures
  • Loading branch information
h4570 authored Feb 11, 2024
2 parents 4f21626 + 93e7aa5 commit 04d105c
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 13 deletions.
4 changes: 3 additions & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ Decision was simple - I need to create an engine which will handle 3D file loadi
* 07 - [Code](https://github.com/h4570/tyra/tree/master/tutorials/07-lighting) - Static lightmap and dynamic directional lights
* 08 - [Code](https://github.com/h4570/tyra/tree/master/tutorials/08-skybox-debug) - Skybox and debug rendering
* 09 - [Code](https://github.com/h4570/tyra/tree/master/tutorials/09-manual-mode) - Manual rendering (a'la OpenGL)
* 10 - [Code](https://github.com/h4570/tyra/tree/master/tutorials/10-sprite=sheet) - Sprite sheet (font)
* 11 - [Code](https://github.com/h4570/tyra/tree/master/tutorials/11-texture-region-repeat) - Texture repeating
* Demo game - [Code](https://github.com/h4570/tyra/tree/master/demo)
---

Expand Down Expand Up @@ -141,7 +143,7 @@ Distributed under the Apache License 2.0 License. See `LICENSE` for more informa
Without these guys, Tyra would not happen:
* [Dr Henry Fortuna](http://ps2-edu.tensioncore.com/index.html) - for code sources, PS2 academy tutorials
* Whole [PS2DEV](https://github.com/ps2dev) team, and specially to [Rick Gaiser](https://github.com/rickgaiser), [fjtrujy](https://github.com/fjtrujy) - for a lot of good tips!
* [Wellington Carvalho](https://github.com/Wellinator), [André Guilheme](https://github.com/Wolf3s), [Matías Israelson](https://github.com/israpps) - for testing, contributing to Tyra and sharing cool ideas!
* [Wellington Carvalho](https://github.com/Wellinator), [André Guilheme](https://github.com/Wolf3s), [Matías Israelson](https://github.com/israpps), [Guido Diego Quispe Robles](https://github.com/israpps) - for testing, contributing to Tyra and sharing cool ideas!
* [Leonardo Ono](https://github.com/leonardo-ono) - for software renderer example (with clipping!)
* [Lukasz D.K.](https://github.com/lukaszdk) - for huge archive of PS2 stuff
* [Guilherme Lampert](https://github.com/glampert) - for code sources
Expand Down
2 changes: 1 addition & 1 deletion docs/install/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
1. Git
2. VSCode
3. Docker with PowerShell as a default terminal
4. [PCSX2](https://github.com/h4570/tyra/blob/master/docs/install/pcsx2.md#)
4. [Configured PCSX2](https://github.com/h4570/tyra/blob/master/docs/install/pcsx2.md#)

---

Expand Down
26 changes: 15 additions & 11 deletions docs/install/pcsx2.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
## Install & configure PCSX2
## PCSX2 preparation

- Download & install PCSX2 (1.6+ version) from https://pcsx2.net/
- Download PCSX2 from https://pcsx2.net/
- Install
- Extract bios files from https://romsmania.cc/bios/pcsx2-playstation-2-bios-3 to `%UserProfile%\Documents\PCSX2\bios`
- Close `PCSX2` if you have opened!
- Open `%UserProfile%\Documents\PCSX2\inis\PCSX2_vm.ini` in notepad

```
HostFs=enabled
```

- Open PCSX2 and map pad to your keyboard, for example:
- Map pad to your keyboard, for example:

```
WASD = Left joy
Expand All @@ -18,4 +12,14 @@ Space = X
Circle = C
```

- Enable **"EE timing hack"** in PCSX2 hacks!
### For PCSX2 1.6.X
- Close `PCSX2` if you have opened!
- Open `%UserProfile%\Documents\PCSX2\inis\PCSX2_vm.ini` in notepad and change HostFs option:

```
HostFs=enabled
```

### For PCSX2 1.7.X
- Open `PCSX2`
- Go to Settings -> Emulation -> Enable `Host file system`
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ void DynPipRenderer::addBufferDataToPacket(DynPipBag** bags, const u32& count) {

void DynPipRenderer::sendPacket() {
dma_channel_wait(DMA_CHANNEL_VIF1, 0);
dma_channel_wait(DMA_CHANNEL_GIF, 0); // Wait for texture. Issue #182.

// dma_wait_fast(); // This have no impact on performance
dma_channel_send_packet2(currentPacket, DMA_CHANNEL_VIF1, true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ void BlockizerProgramsManager::sendPacket(McpipProgram* program) {
packet2_utils_vu_add_end_tag(currentPacket);

dma_channel_wait(DMA_CHANNEL_VIF1, 0);
dma_channel_wait(DMA_CHANNEL_GIF, 0); // Wait for texture. Issue #182.

// dma_wait_fast(); // This have no impact on performance

dma_channel_send_packet2(currentPacket, DMA_CHANNEL_VIF1, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ void StaPipQBufferRenderer::sendPacket() {
"Packet is too big. Internal error");

dma_channel_wait(DMA_CHANNEL_VIF1, 0);
dma_channel_wait(DMA_CHANNEL_GIF, 0); // Wait for texture. Issue #182.

// dma_wait_fast(); // This have no impact on performance

dma_channel_send_packet2(currentPacket, DMA_CHANNEL_VIF1, true);
Expand Down

0 comments on commit 04d105c

Please sign in to comment.