Scarface The World Is Yours Mac

  1. The World Is Yours is the second studio album by American rapper Scarface.The album was released on August 17, 1993, by Rap-A-Lot Records and Priority Records.The album was not as acclaimed as his debut, Mr. Scarface Is Back, but sold strongly, breaking into the Top 10 on the Billboard 200 chart, and peaking at #1 on the R&B/hip hop album chart.
  2. Scarface The World is Yours. Videogameasset My games. When logged in, you can choose up to 12 games that will be displayed as favourites in this menu.
  1. Scarface The World Is Yours Missions
  2. Scarface The World Is Yours Mission 6
  3. Scarface The World Is Yours Pc Digital
  4. Scarface The World Is Yours Pc
  5. Scarface The World Is Yours Mission 7
  6. Scarface The World Is Yours Map
  7. Scarface The World Is Yours Mac

TL;DR - if you are not interested in an in-depth overview of what was wrong with the game and how it was fixed,scroll down to Download section for a link anda Patreon announcement.

Today’s subject is Scarface: The World is Yours. This tie-in game to a 1983 movie Scarface wasdeveloped by Radical Entertainment and released in late 2006.

Naturally, by now you likely know where it’s going – what is wrong this time?As always, PCGamingWiki page providesan answer – at the time of writing this post, you can see the issue listed as one of the key points:

Graphics are corrupted on modern versions of Windows

Conquer the world! Before you is instruction to how possess Miami, go by it and you will succeed. Only here you will find glosses to all nooks of this production. This Scarface: The World is Yours game guide contains a very detailed description of all the missions available in the game. It also offers maps and plenty of useful tips. Scarface: The World Is Yours is a 2006 open-world activity experience computer game created by Radical Entertainment for PlayStation 2, Xbox, and Windows distributed by Vivendi Games. The essential game-play and game mechanics fall into the sub-class of Grand Theft Auto clones.

This doesn’t tell much about how bad is it, so what does it look like?


It is… very bad. While results vary across different PC’s greatly, nearly every modern PC displays thisbroken mess, rendering the game unplayable. Of course, community came up with workarounds, but they sadly have their drawbacks:

  • dgVoodoo can be used with the game, and it seems to fix the issue. However, dgVoodoo wraps game’s Direct3D 9 to Direct3D 11,which might bump up system requirements considerably. Considering how complex DX9 is, it’s also hard to prove that absolutelyeverything renders flawlessly.
  • Curiously, this issue also goes away when the game runs through… PIX, a graphics debugger! However, similar issues apply– given PIX is used to collect data, it might introduce additional overhead. Also, having to always run the game throughit is a bit clunky, isn’t it?

While these might suffice for casual play, neither of these workarounds address the root cause of the issue.However, we want to know what exactly went wrong, so those aren’t enough – armed with a debugger anda virtual machine, I can proceed to figuring this issue out.

Step one to figuring out such issues is of course attaching a debugger. This time, since the issue seems to bespecific to D3D, I aided myself with DirectX Wrappersfrom Elisha Riedlinger. Having a minimal d3d9.dll wrapper is excellent for prototyping,since it allows me to instantly and reliably tap into game’s rendering code without any game specific hacking.

That said, this issue could really be anything. That’s where experience helps, so I was able to come up with theoriesby just observing how the bug looks visually:

  • When in game, moving around makes those shapes move, possibly corresponding player character’s animations.This means that at least part of this garbage is in fact Tony’s model.
  • Results vary every session, and on some machines it might even look very different – for example, I have seen variations where most of the environment was not corrupted, but people were T-posing.

I theoretized that this issue relates to vertex buffers not updating properly. At this point it’s worthto mention that people thought this issue shows up only on multicore CPU’s. If this is true, then it could meanthat the issue is a classic race condition – which also would explain why it looks different every time.Conceptually, it also makes sense – game could be loading models on multiple threads, setting up D3D resourcesconcurrently and I imagine that failing to do so in a thread safe manner could result in artifacts looking like that.

That theory is trivial to confirm or debunk via a DX9 wrapper. Set up additional code to verifythat all calls to IDirect3DVertexBuffer9::Lock and IDirect3DVertexBuffer9::Unlock are done from the same thread.If they are done from multiple threads, it could be a possible culprit.

I set up verification, and… nothing ¯_(ツ)_/¯ Theory debunked.

Let’s take another look at vertex buffer locks though. I spotted that some (not all) locks are done with aD3DLOCK_DISCARD flag. Looking at MSDN docs, it’s defined as (emphasis added by me):

The application discards all memory within the locked region.For vertex and index buffers, the entire buffer will be discarded.This option is only valid when the resource is created with dynamic usage.

I don’t know about you, but I see possible room for error here. It is possible to lock only a part of the buffer,so I can imagine somebody not realizing that locking a part of the buffer with discard flag would throw it awayentirely.

However, game always locks entire buffers:

Analyzing the code further though, I was not fully convinced that after discarding game always fills the entire buffer.So what if we assume the flag is added there wrongly and remove it?

It works! It doesn’t seem to be a fluke either – the game was consistently fixed for me and several other peoplewho tested.

A cautious reader might stop right here and ask a few questions:

Scarface The World Is Yours Missions

  • Clearly, game worked as-is at some point, so how do you know this is not just another workaround andit’ll break again?
  • Why does using PIX and dgVoodoo fix it?

With a DX9 wrapper and knowledge on when D3DLOCK_DISCARD is supposed to be used, I could come up with proofthat this flag was used wrongly. In principle, you’d use this flag when locking a buffer if you did not careabout the buffer’s past contents and intended to fill it with new data. If the game used this flag, but also expectedthe buffer to retain its old contents, then the flag was misused.

To test whether the game really cares about previous buffer contents, I deliberately filled it with garbageif the game locked it with D3DLOCK_DISCARD:

Much to my relief, the result was more or less what I expected:

Graphics were once again broken, which proves that game locks buffers with a D3DLOCK_DISCARD flag andexpects the contents not to be thrown away! For me that’s a satisfactory enough proof of API misuse,and a proof that removing this flag is not a workaround, but a correct fix.

What about PIX and dgVoodoo? The latter is a wrapper, so I can imagine it not emulating the behaviour ofthe discard flag. PIX on the other hand is a graphics debugger, and in order to be able to capture the frameit likely preserves past and current buffer’s contents. While I can’t prove it for certain, I wouldn’t be surprisedif PIX just ignored this flag overall.

Are we done? Well…

I could technically finish here, as the most important issue has been fixed, and the game is playable.However, something was still off…

Mac


I have a i7-6700K and GTX 1070, mind you.

My PC is nowhere close to “bad”, yet I was unable to maintain stable 60 FPS – in the area presented on a screenshot,I in fact got consistent 40-45 FPS. To say it’s “terrible” would be an understatement.

However, looking up process affinity in Task Manager reveals something… interesting:


It is like this on every game launch.

Looking into the game’s code again, it seems like the game voluntarily sets itself to run on only one core.Why? I don’t know for sure, but I theoretized that this might have been a workaround for the aforementionedgraphics corruption bug. Recall that people claimed this bug occurs only on multicore CPU’s –and so I theoretized perhaps in WinXP days limiting CPU affinity to one core “fixed” this issue,and on newer systems it stopped being the case due to changes in how drivers work (eg. if WDDM driversmanage buffers out of process, then affinity settings would not affect them). It’s a very long shot,but hey – we’ve seen this before already.

Remove this code so game runs on all cores, and sure enough – it’s smooth as butter now.It also does not seem to have any visible race conditions (which could have been “hidden” by setting CPU affinity),because people tested it for hours and encountered no crashes or new bugs.


Now we're talking.

On top of that, I also identified the game was creating the D3D device with a multithreaded flag – which is saidto degrade performance, and was absolutely unneeded for the game. Another performance gain!

Is there more we can do? Turns out, yes.

When testing these fixes, aap observed that the game ran really poorly on his PC – technically,it was full speed, but when driving around it’d hitch a lot. I also observed the same when debugging the gameon a virtual machine, sometimes having the game pause for seconds at a time!

I checked it in a debugger, and much to my surprise, during those hitches the game spent a lot of time…releasing buffers! I fired up PIX and immediately noticed how happy the game is to create new buffers (and thusunload old buffers) when driving around:


Load it all.

This is really unhealthy. There is no reason the game can’t reuse buffers instead of throwing them awayand creating new ones. Luckily, the game has only two types of vertex buffers (static buffers in a managed pool,dynamic buffers in a default pool), and one type of index buffer,which makes the buffer cache relatively simple to implement. It looks like this game might really need it.

I settled on implementing a simplistic cache with the following behaviour:

  • On creating buffers, try to find a buffer of matching type and size.
  • If it doesn’t exist, check if there is a bigger buffer of matching type.However, to prevent unnecessary hogging of resources, only test for buffers at most twice as big as requested.
  • If not found, create a new buffer.

I implemented the cache and ran the same test – it was really smooth in comparison for both me and aap!PIX graphs also looked much, much better now:


Reuse it all.

With this fix implemented, I finally was satisfied with the state of the game.Few final touches, and SilentPatch for Scarface is good to go!

Aside from the “exciting” fixes presented above, I also implemented a few more “boring” changes.The full changelog is as follows:

  • Game-breaking graphical corruptions have been fixed, making the game playable on modern multicore machines
  • Allowed the game to use all CPU cores (instead of locking to one core), dramatically improving performance
  • Removed an unneeded multithreaded flag from the D3D device, possibly improving performance slightly
  • Introduced a cache for some D3D resources used by the game, dramatically reducing the amount of stutter when roaming around the city
  • Made the game list all selectable resolutions instead of a cherry picked list
  • Moved the game’s settings from the Registry to settings.ini in the game directory - this resolves possible issues with saving settings

Head to Mods & Patches via the button below to download SilentPatch for Scarface.But before you do, stick with me for a bit longer!


Upon downloading, all you need to do is to extract the archive to the game’s directory and that’s it!When asked whether to overwrite files, select Yes.

Over the past few months, I’velaunchedseveralnewreleases,and I tried to be fairly active on the emulation scene. As I became increasingly productive over this time,some people wished to see a new way to support my work,since GitHub Sponsors – although very nice – has too much friction for some people to start using.

With this in mind, together with the release of SP for Scarface I’m starting a Patreon campaign!Fear not, paid early releases are not happening – as of now, perks include:

  • Place in credits for every release
  • Access to my personal to-do list (with the ability to comment/suggest!)

This is not much, but depending on the response I might end up modifying the rewards a bit.

Thank you!

For those interested,full source code of the patch has been published on GitHub, so it can be freely used as a point of reference:

INFO

Scarface The World Is Yours Mission 6

  • Debug Menu

  • The Fall Starting Area

  • Mansion Overhead Image

  • Unfinished Weapon Menu

  • Typo in Stein Jewellers Mission

Scarface
Build DateKnown BuildsBuild SizeReleased By
April 20, 2006Build 08068 Early Xbox Port3.52GB, 38,798 Files, 551 Folders (Reconstructed)DRW
April 20, 2006Build 08068 Early Xbox Port3.51GB, 38,951 Files, 515 FoldersGunz4Hire

General Info:

Yours

Scarface The World Is Yours Pc Digital

  • About 3 months early.
  • Titlescreen is Black and says Scarface. You can press Left or Right on DPAD to pick levels. Load times are very slow.

Scarface The World Is Yours Pc

  • Looks to be a early Xbox port with alot of PS2 assets still being used. Some levels looks to be unfinished.
  • This file was added from retail to stop the game from trying to find it, - aicommon.dtr.
  • Most Missions are finished but incomplete with some aspects like cut scenes or AI just not working.
  • After completing a mission you can usually just go to the next mission, sometimes it will stick at a black screen.
  • White Button is both the Navigation Menu and the Rage button, which can cause problems if you need the menu but your rage meter is full.
  • Weapon menu is unfinished with all the text for each weapon the exact same.

DEBUG

Press Start, bottom selection is debug menu.

For noclip, then Press in both Thumbsticks or even Black Button, Right Trigger will spawn you to camera location.

Debug OptionDescription
TeleportSpawns you near the Mission you selected.
Artist Safe RoamUnknown
Toggle Debug InfoExample
1000 ballsGives Tony 1000 Balls
Get Massive AmmoGives Tony Every Weapon with full Clips
10,000,000 dirty cashGives Tony 10,000,000 dirty cash
1000g drugsGives Tony 1000g Drugs
10,000 Cop heatAdds 10,000 Cop Heat to your overall Heat progression.
Make Supplier ReadyExample
Show PMG TemplatesExample
Display Last PMG TemplateExample
Restart Last PMGExample
Test Miami PMG StagesExample
Test Island PMG StagesExample
Toggle Time Of DayChanges Time of Day
Toggle WidescreenToggles Widescreen
Toggle ProgressiveToggles Progressive
Toggle Lock to VsyncToggles Vsync Lock
Toggle Half SpeedCuts Frame rate to 15FPS
Toggle Invert ReticleExample
Toggle Cop GameExample
Toggle RainToggles Rain to start
Toggle LightningToggles Lightning Weather
Call Any BoatBoat 1, Boat 2, Boat 3,
Call Any CarCar 1, Car 2, Car 3,
Call Any CharacterBasic Male 01, Basic Male 02,
Call Any NISExample
Set Reputation LevelAdds a Reputation to your score and changes the Scarface logo in Options corresponding to what level your Rep is.
MAKE TONY INVINCIBLE (DEBUG)Makes Tony Invincible
GIVE PLAYER MONEYGives Tony 500,200,000 Cash
FORCE-INCOME-COLLECTExample
MISSION FAIL (DEBUG)Will force fail your Mission
MISSION FINISH (DEBUG)Will force finish your Mission, altho most of the time it wont proced to next objective.
Toggle HUDExample
Test fontBox opens to test formatting and font size of A-Z 0-9

Scarface The World Is Yours Mission 7

LEVELS

Scarface The World Is Yours Map

Level NameLevel Info
Scarface (New Game)Opens to Combat Tutorial, then to early Cut of Into Video, then puts you to Level 'The Fall'.
Combat tutorialAI works! The text still refers to the PS2
The FallAI isnt working, no enemy behind you when you start the level. Sometimes the screen will go black and stay black. Can complete Entire Mission. Black screen after final video.
The ReturnStarting video missing of Tony Cruising the streets of Miami.
FelixWorks, Cutscenes are out of place and the Press B to talk texture will stay on screen sometimes.
Mansion PurchaseYou can drive through the locked gate with a vehicle. Car will sometimes despawn after cutscene. When you have to get a gun, Tony will spawn inside the desk, use debug camera then RT to spawn Tony next to the desk.
Gaspar GomezThe Cut scenes are incomplete. At one point Tony starts falling from the sky. Make sure Invincibility is turned on when doing this mission. AI is broken.
Frontal AssaultMake sure to have at least 15,000 cash before opening Exotics menu to purchase a driver.
Pedro's Pawn ShopComplete level is here, other then slowdown it works as should.
Cabana CigarsUnfinished Cutscene. Mission Text is too big that it goes off screen.
Oakley Drive-in TheatreThe complete level is here, AI works for the most part.
Babylon Club ReduxCutscene isnt complete, AI very buggy and enemies stand still. Alot of back and forth killing. You can complete the entire level.
The Diaz BrothersIncomplete Level. In order to star mission you must do the mission above and it will take you to this mission after. After kill the first brother and you get to the second brother, no matter the outcome you will lose and have to restart the mission. Spawns you into the water with a blank map if you select the mission from teleporter.
Havana StorehouseAI is not working yet. Cut scene does not load world props fast enough.
Freedom Town ReduxExample
O'Grady's Liquor StoreExample
Fidel's RecordsExample
U-Gin Shotgun BarExample
Babylon ClubExample
The SandmanExample
The Venus BarExample
Marina StorageExample
Nacho ContrerasExample
The Dock BossExample
Contra BandExample
GanglandExample
AncMissions At VenusBarExample
Nacho's TankerExample
Macau Fast FoodExample
Chi Peso TrattoriaExample
Swansong Hotel RestaurantExample
Sun Ray HotelExample
Shoreline StorageExample
Un-LoadExample
DeliverExample
Angel Dust Donut ShopExample
Whippet Gambling HallExample
Peninsula Gentlemans ClubExample
Stein JewellersThere is a typo when talking to the owner of the jeweler, the level is finished even tho some of the AI is still broken.
Coco's Lounge And DiscoExample
Leopard Rail YardExample
The PlantationExample
TranquilandiaExample
The Endes

Scarface The World Is Yours Mac

Retrieved from 'https://protoplanet.us/index.php?title=ScarFace:_The_World_is_Yours&oldid=391'