Compare commits

...

9 Commits

Author SHA1 Message Date
Stefanos Kornilios Mitsis Poiitidis
67cd1106ab Edit README.md for beta instructions 2025-04-01 05:58:55 +00:00
Stefanos Kornilios Mitsis Poiitidis
a31d73d2e4 Merge branch 'MastaG/c23_host_cc_workaround' into 'main'
Build pvrtex using GNU(++) 17 standard

See merge request skmp/dca3-game!90
2025-04-01 05:13:53 +00:00
Stefanos Kornilios Mitsis Poiitidis
d630a329a8 Merge branch 'MastaG/dreamshell_prebuilt' into 'main'
Add a "dsiso-prebuilt" target

See merge request skmp/dca3-game!91
2025-04-01 05:13:24 +00:00
Stefanos Kornilios Mitsis Poiitidis
7cc91b9a76 Merge branch 'frogbull/liberty-hints' into 'main'
Small Fix for the Hints of Liberty

See merge request skmp/dca3-game!94
2025-03-31 20:30:08 +00:00
Stefanos Kornilios Mitsis Poiitidis
29c346c9ae Merge branch 'frogbull/miami-hints' into 'main'
Miami Hints (Dreamcast Hints for Miami like in Liberty)

See merge request skmp/dca3-game!93
2025-03-31 20:29:56 +00:00
Frogbull
186339b854 Fix for the wrong Hint about Submissions and Radio in Liberty (Right/Left was inversed for them) 2025-03-31 16:41:26 +02:00
Frogbull
823a283caa Dreamcast Hints like in Liberty 2025-03-31 16:32:53 +02:00
MastaG
6dc8ed77bc Add a "dsiso-prebuilt" target
This way DreamShell users can easily build and test using prebuilt elf binaries.
2025-03-31 15:05:06 +02:00
MastaG
a3ce1e4ed5 Build pvrtex using GNU(++) 17 standard
Recent distros feature GCC 15 which defaults to C23.
ATOMIC_VAR_INIT has been removed from the C23 standard.

This causes the following build failure:
mem.c:72:39: fout: implicit declaration of function ‘ATOMIC_VAR_INIT’; did you mean ‘ATOMIC_FLAG_INIT’? [-Wimplicit-function-declaration]
   72 | static atomic_size_t max_alloc_size = ATOMIC_VAR_INIT(INT_MAX);
      |                                       ^~~~~~~~~~~~~~~
      |                                       ATOMIC_FLAG_INIT

Workaround this by telling the compiler to build using GNU 17 instead.
2025-03-30 20:49:27 +02:00
6 changed files with 1087 additions and 379 deletions

View File

@@ -1,14 +1,14 @@
## Intro
dca3 is a port of GTA III for the Dreamcast made by The Gang, using [re3](https://github.com/halpz/re3/tree/master/) as a base.
dca3 is a port of GTA III/VC for the Dreamcast made by The Gang, using [re3](https://github.com/halpz/re3/tree/master/) as a base.
re3 a fully reversed source code for GTA III.
re3 a fully reversed source code for GTA III/VC.
This project was started by [Stefanos Kornilios Mitsis Poiitidis](https://x.com/poiitidis) and uses [KallistiOS](https://kos-docs.dreamcast.wiki/).
## Baking the CDI
### Prerequisites
You need GTA 3 installed. This version has been tested and works: https://store.rockstargames.com/game/buy-grand-theft-auto-the-trilogy.
You need Grand Theft Auto III or Grand Theft Auto: Vice City installed. This version has been tested and works: https://store.rockstargames.com/game/buy-grand-theft-auto-the-trilogy.
Please note that *SOME VERSIONS* of the game may not work. It has been reported that `d4_gta.mp3` is corrupted sometimes.
@@ -18,28 +18,33 @@ You will also need the following tools installed
- git-scm http://git-scm.com/downloads/win
- dreamsdk r3 https://github.com/dreamsdk/dreamsdk/releases
### Preparing the gta3 folder
### Cloning the dca3-game repo (this is required once)
- Open dreamsdk shell
- type `mkdir gta3` (and press enter)
- type `git clone --branch beta https://gitlab.com/skmp/dca3-game.git` (and press enter).
- It should take a moment and successfully clone the repo
- close the dreamsdk shell and proceed to the next step.
### Grand Theft Auto III build (liberty)
#### Preparing the liberty folder
- Open dreamsdk shell
- type `mkdir liberty` (and press enter)
- type `explorer .` (and press enter)
- This will open a folder named gta3. Copy your gta3 files in there.
- This will open a folder named liberty. Copy your gta3 files in there.
- If you use the 2cdrom version of the game, make sure to also copy the contents of the play disc to this folder.
- close the folder and the dreamsdk shell and proceed to the next step.
### Cloning the dca3-game repo and downloading the prebuilt elf
#### Downloading and extracting the prebuilt elf
- Open dreamsdk shell
- type `git clone --branch alpha https://gitlab.com/skmp/dca3-game.git` (and press enter)
- It should take a moment and successfully clone the repo
- type `cd dca3-game/dreamcast` (and press enter)
- type `cd dca3-game/liberty` (and press enter)
- type `explorer .` (and press enter).
- A folder named dreamcast with some files should be open. Keep it on the side.
- Download the Alpha Prebuilt Elf from https://gitlab.com/skmp/dca3-game/-/jobs/8725216645
- Open artifacts.zip and extract dca3.elf to the folder that was kept open before.
- Download the *liberty* beta prebuilt elf from https://gitlab.com/skmp/dca3-game/-/releases/beta
- Open artifacts.zip and extract dca-liberty.elf to the folder that was kept open before.
- Close the folder and dreamsdk shell
### Repacking and making a prebuilt cdi FOR GD-EMU
#### Repacking and making a prebuilt cdi FOR GD-EMU
- Open dreamsdk shell
- type `cd dca3-game/dreamcast` (and press enter)
- type `cd dca3-game/liberty` (and press enter)
- type `make cdi-prebuilt` (and press enter)
- This should take a while (5-15 mins)
- Due to an issue with dreamsdk, this won't fully complete the first time
@@ -47,28 +52,80 @@ You will also need the following tools installed
- It will continue where it left off before
- It should run to completion now and show "*** Repack Completed Successfully ***"
- type `explorer .` (and press enter)
- The dreamcast folder should open up, and it should contain dca3.cdi for you (~ 900 megs)
- The dreamcast folder should open up, and it should contain dca-liberty.cdi for you (~ 900 megs)
### Repacking and making a prebuilt cdi FOR burning CD-ROM
#### Repacking and making a prebuilt cdi FOR burning CD-ROM
- Open dreamsdk shell
- type `cd dca3-game/dreamcast` (and press enter)
- type `cd dca3-game/liberty` (and press enter)
- type `make FOR_DISC=1 cdi-prebuilt` (and press enter)
- This should take a while (5-15 mins)
- Due to an issue with dreamsdk, this won't fully complete the first time
- type `make FOR_DISC=1 cdi-prebuilt` (and press enter)
- It will continue where it left off before
- It should run to completion now and show "*** Repack Completed Successfully ***"
- It should run to completion now and show "*** CDI Baked Successfully ***"
- type `explorer .` (and press enter)
- The dreamcast folder should open up, and it should contain dca3.cdi for you (~ 700 megs or ~260 megs)
- The dreamcast folder should open up, and it should contain dca-liberty.cdi for you (~ 700 megs or ~260 megs)
- If the .cdi is not ~ 700 megs (linux/mkdcdisc) or ~260 megs (windows/cdi4dc), then you did something wrong.
- You can type `rm -rf repack-data` (and press enter)
- And then start this step from the beggining
### Grand Theft Auto Vice City build (miami)
#### Preparing the miami folder
- Open dreamsdk shell
- type `mkdir miami` (and press enter)
- type `explorer .` (and press enter)
- This will open a folder named liberty. Copy your gtavc files in there.
- close the folder and the dreamsdk shell and proceed to the next step.
#### Downloading and extracting the prebuilt elf
- Open dreamsdk shell
- type `cd dca3-game/miami` (and press enter)
- type `explorer .` (and press enter).
- A folder named dreamcast with some files should be open. Keep it on the side.
- Download the *miami* beta prebuilt elf from https://gitlab.com/skmp/dca3-game/-/releases/beta
- Open artifacts.zip and extract dca-miami.elf to the folder that was kept open before.
- Close the folder and dreamsdk shell
#### Repacking and making a prebuilt cdi FOR GD-EMU
- Open dreamsdk shell
- type `cd dca3-game/miami` (and press enter)
- type `FOR_DISC=2 make cdi-prebuilt` (and press enter)
- This should take a while (5-15 mins)
- Due to an issue with dreamsdk, this won't fully complete the first time
- type `FOR_DISC=2 make cdi-prebuilt` (and press enter)
- It will continue where it left off before
- You will have to close the dreamshell window a few times and restart this procesure a few times
- Eventually it should run to completion now and show "*** CDI Baked Successfully ***"
- type `explorer .` (and press enter)
- The dreamcast folder should open up, and it should contain dca-miami.cdi for you (~ 1.5 gigs)
#### Repacking and making a prebuilt cdi FOR burning CD-ROM
- Open dreamsdk shell
- type `cd dca3-game/miami` (and press enter)
- type `make FOR_DISC=1 cdi-prebuilt` (and press enter)
- This should take a while (5-15 mins)
- Due to an issue with dreamsdk, this won't fully complete the first time
- type `make FOR_DISC=1 cdi-prebuilt` (and press enter)
- It will continue where it left off before
- It should run to completion now and show "*** Repack Completed Successfully ***"
- type `explorer .` (and press enter)
- The dreamcast folder should open up, and it should contain dca-miami.cdi for you (~700 or ~550 megs)
## Running on emulators
You must have the 'trails' options turned off from the graphics settings, or a white overlay may appear over the 3d render
## Fine tuning settings
Two experimental modes, 24 bpp (640x480x24) and Anti Aliasing are provided in the Graphics settings.
- When using HDMI or VGA out, it is recommended to turn enable 24 bpp mode. Note that you also have to disable the 'trails' effect.
- Anti Aliasing will work with or without trails, however trails enabled will have a bigger performance hit in that mode.
Enabling any of those modes may result in some missing geometry under heavy scenes (more likely with AA mode).
They can also be combined.
## How to report issues
- Take a photo of your tv/monitor and vmu
- open a ticket via https://gitlab.com/skmp/dca3-game/-/issues/new
- state which elf you have used (eg, https://gitlab.com/skmp/dca3-game/-/jobs/8725216645)
- write something descriptive of what is/went wrong
## License

View File

@@ -160,6 +160,7 @@ clean:
-rm -f IP.BIN
-rm -f $(PROJECT_NAME).iso
-rm -f $(PROJECT_NAME).ds.iso
-rm -f $(PROJECT_NAME)-prebuilt.ds.iso
-rm -f $(PROJECT_NAME).cdi
-rm -f $(DEPS)
-rm -rf $(REPACK_DIR)
@@ -230,6 +231,12 @@ $(PROJECT_NAME).ds.iso: IP.BIN 1ST_READ.BIN $(REPACK_DIR)/repacked $(REPACK_GTA_
$(KOS_BASE)/utils/scramble/scramble $(TARGET)-prebuilt.bin 1ST_READ_PREBUILT.BIN
mkdir -p $(REPACK_GTA_DIR)
$(PROJECT_NAME)-prebuilt.ds.iso: IP.BIN 1ST_READ_PREBUILT.BIN $(REPACK_DIR)/repacked $(REPACK_GTA_DIR)/GTA3SF8.b $(REPACK_GTA_DIR)/0GDTEX.PVR $(REPACK_GTA_DIR)/settings.ico
rm -f $(PROJECT_NAME)-prebuilt.ds.iso
rm -f $(REPACK_GTA_DIR)/1ST_READ.BIN
cp 1ST_READ_PREBUILT.BIN $(REPACK_GTA_DIR)/1ST_READ.BIN
mkisofs -V $(PROJECT_NAME) -G IP.BIN -r -J -l -o $(PROJECT_NAME)-prebuilt.ds.iso $(REPACK_GTA_DIR)
$(PROJECT_NAME)-prebuilt.iso: IP.BIN 1ST_READ_PREBUILT.BIN $(REPACK_DIR)/repacked $(REPACK_GTA_DIR)/GTA3SF8.b $(REPACK_GTA_DIR)/0GDTEX.PVR $(REPACK_GTA_DIR)/settings.ico
rm -f $(REPACK_GTA_DIR)/1ST_READ.BIN
cp 1ST_READ_PREBUILT.BIN $(REPACK_GTA_DIR)/1ST_READ.BIN
@@ -268,6 +275,8 @@ cdi-no-repack: $(PROJECT_NAME)-no-repack.cdi
dsiso: $(PROJECT_NAME).ds.iso
dsiso-prebuilt: $(PROJECT_NAME)-prebuilt.ds.iso
cdi-prebuilt: $(PROJECT_NAME)-prebuilt.cdi
sim: $(REPACK_DIR)/repacked

View File

@@ -164,6 +164,7 @@ clean:
-rm -f IP.BIN
-rm -f $(PROJECT_NAME).iso
-rm -f $(PROJECT_NAME).ds.iso
-rm -f $(PROJECT_NAME)-prebuilt.ds.iso
-rm -f $(PROJECT_NAME).cdi
-rm -f $(DEPS)
-rm -rf $(REPACK_DIR)
@@ -234,6 +235,12 @@ $(PROJECT_NAME).ds.iso: IP.BIN 1ST_READ.BIN $(REPACK_DIR)/repacked $(REPACK_GTA_
$(KOS_BASE)/utils/scramble/scramble $(TARGET)-prebuilt.bin 1ST_READ_PREBUILT.BIN
mkdir -p $(REPACK_GTA_DIR)
$(PROJECT_NAME)-prebuilt.ds.iso: IP.BIN 1ST_READ_PREBUILT.BIN $(REPACK_DIR)/repacked $(REPACK_GTA_DIR)/GTAVCSF8.b $(REPACK_GTA_DIR)/0GDTEX.PVR $(REPACK_GTA_DIR)/settings.ico
rm -f $(PROJECT_NAME)-prebuilt.ds.iso
rm -f $(REPACK_GTA_DIR)/1ST_READ.BIN
cp 1ST_READ_PREBUILT.BIN $(REPACK_GTA_DIR)/1ST_READ.BIN
mkisofs -V $(PROJECT_NAME) -G IP.BIN -r -J -l -o $(PROJECT_NAME)-prebuilt.ds.iso $(REPACK_GTA_DIR)
$(PROJECT_NAME)-prebuilt.iso: IP.BIN 1ST_READ_PREBUILT.BIN $(REPACK_DIR)/repacked $(REPACK_GTA_DIR)/GTAVCSF8.b $(REPACK_GTA_DIR)/0GDTEX.PVR $(REPACK_GTA_DIR)/settings.ico
rm -f $(REPACK_GTA_DIR)/1ST_READ.BIN
cp 1ST_READ_PREBUILT.BIN $(REPACK_GTA_DIR)/1ST_READ.BIN
@@ -272,6 +279,8 @@ cdi-no-repack: $(PROJECT_NAME)-no-repack.cdi
dsiso: $(PROJECT_NAME).ds.iso
dsiso-prebuilt: $(PROJECT_NAME)-prebuilt.ds.iso
cdi-prebuilt: $(PROJECT_NAME)-prebuilt.cdi
sim: $(REPACK_DIR)/repacked

View File

@@ -2121,14 +2121,14 @@ wchar *CControllerConfigManager::GetControllerSettingTextWithOrderNumber(e_Contr
case VEHICLE_ACCELERATE:
for (int i = 0; (ActionText[i] = Dreamcast_RightTrigger[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_CHANGE_RADIO_STATION:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
case VEHICLE_CHANGE_RADIO_STATION: // D-Pad Right to switch RADIO on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_BRAKE:
for (int i = 0; (ActionText[i] = Dreamcast_LeftTrigger[i]) != '\0' && i < iLimitCopy; i++);
break;
case TOGGLE_SUBMISSIONS:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
case TOGGLE_SUBMISSIONS: // D-Pad Left to enable SUBMISSIONS on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
break;
case GO_LEFT:
for (int i = 0; (ActionText[i] = Dreamcast_Stick_Left[i]) != '\0' && i < iLimitCopy; i++);
@@ -2199,11 +2199,11 @@ wchar *CControllerConfigManager::GetControllerSettingTextWithOrderNumber(e_Contr
case VEHICLE_TURRETRIGHT:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_TURRETUP:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
case VEHICLE_TURRETUP: // Remark: VEHICLE_TURRETUP and VEHICLE_TURRETDOWN are used to shift your weight on a bike in Vice City
for (int i = 0; (ActionText[i] = Dreamcast_Stick_Up[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_TURRETDOWN:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
case VEHICLE_TURRETDOWN: // Remark: VEHICLE_TURRETUP and VEHICLE_TURRETDOWN are used to shift your weight on a bike in Vice City
for (int i = 0; (ActionText[i] = Dreamcast_Stick_Down[i]) != '\0' && i < iLimitCopy; i++);
break;
case CAMERA_CHANGE_VIEW_ALL_SITUATIONS:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Up[i]) != '\0' && i < iLimitCopy; i++);
@@ -2259,13 +2259,13 @@ wchar *CControllerConfigManager::GetControllerSettingTextWithOrderNumber(e_Contr
case VEHICLE_ACCELERATE:
for (int i = 0; (ActionText[i] = Dreamcast_RightTrigger[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_CHANGE_RADIO_STATION:
case VEHICLE_CHANGE_RADIO_STATION: // D-Pad Right to switch RADIO on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_BRAKE:
for (int i = 0; (ActionText[i] = Dreamcast_LeftTrigger[i]) != '\0' && i < iLimitCopy; i++);
break;
case TOGGLE_SUBMISSIONS:
case TOGGLE_SUBMISSIONS: // D-Pad Left to enable SUBMISSIONS on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
break;
case GO_LEFT:
@@ -2397,14 +2397,14 @@ wchar *CControllerConfigManager::GetControllerSettingTextWithOrderNumber(e_Contr
case VEHICLE_ACCELERATE:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_CHANGE_RADIO_STATION:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
case VEHICLE_CHANGE_RADIO_STATION: // D-Pad Right to switch RADIO on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_BRAKE:
for (int i = 0; (ActionText[i] = Dreamcast_X[i]) != '\0' && i < iLimitCopy; i++);
break;
case TOGGLE_SUBMISSIONS:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
case TOGGLE_SUBMISSIONS: // D-Pad Left to enable SUBMISSIONS on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
break;
case GO_LEFT:
for (int i = 0; (ActionText[i] = Dreamcast_Stick_Left[i]) != '\0' && i < iLimitCopy; i++);
@@ -2542,8 +2542,8 @@ wchar *CControllerConfigManager::GetControllerSettingTextWithOrderNumber(e_Contr
case VEHICLE_BRAKE:
for (int i = 0; (ActionText[i] = PS2_Square[i]) != '\0' && i < iLimitCopy; i++);
break;
case TOGGLE_SUBMISSIONS:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
case TOGGLE_SUBMISSIONS: // D-Pad Left to enable SUBMISSIONS on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
break;
case GO_LEFT:
for (int i = 0; (ActionText[i] = LefAnalog_Left[i]) != '\0' && i < iLimitCopy; i++);

File diff suppressed because it is too large Load Diff

View File

@@ -14,8 +14,8 @@ else
endif
MYFLAGS=-Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Ilibavutil -I. -DCONFIG_MEMORY_POISONING=0 -DHAVE_FAST_UNALIGNED=0
MYCPPFLAGS=$(MYFLAGS)
MYCFLAGS=$(MYFLAGS) -Wno-pointer-sign
MYCPPFLAGS=$(MYFLAGS) -std=gnu++17
MYCFLAGS=$(MYFLAGS) -Wno-pointer-sign -std=gnu17
.PHONY: all clean