Naomi Peori (@ooPo) header
Naomi Peori (@ooPo) profile picture

Embedded developer. Infosec tourist. Console hacking and CTFs for fun. Compilers and toolchains are my playground. (she/her)

Halifax, Nova Scotia, Canada
Joined October 2008
Photo by Naomi Peori (@ooPo)Photo by Naomi Peori (@ooPo)Photo by Naomi Peori (@ooPo)Photo by Naomi Peori (@ooPo)Photo by Naomi Peori (@ooPo)Photo by Naomi Peori (@ooPo)Photo by Naomi Peori (@ooPo)Photo by Naomi Peori (@ooPo)Photo by Naomi Peori (@ooPo)Photo by Naomi Peori (@ooPo)
Writing the most absurdly, meticulously hand-optimized sprite and billboard rendering routine of my life for our #GTA 3 port to the Sega #Dreamcast. This baby gets used by all of GTA3's UIs, fog effects, screen-space effects, and ESPECIALLY the fake bloom-lighting effects you see blurring light sources in the scene... First of all, I bumped the project up from C++17 to GNU++23, because I ain't fucking around here, and I need every dirty tool at my disposal from C and C++. Good, evil, or questionable language features? Don't care. Enabled! Then what you're looking at here is the core routine for blasting sprites through the Dreamcast's fast path. The pvrVertexSubmit() lambda is responsible for translating one of the GTA3 engine's vertex types over to the Dreamcast's vertex type, and it do so by mapping a DC vertex directly into a "store queue" on our SH4 CPU, where we fill the thing in directly. A store queue is a pretty damn interesting feature of the SuperHitachi architecture which allows us to copy data around extremely quickly by writing cache-line sized chunks of data (32-bytes) into it then issuing a cache flush on it to write its contexts extremely quickly through the cache and into some other region of memory... It's the fastest mechanism we have for memory transfers, faster than DMA, and we have two of them. What happens here is that we've preconfigured the store queues' destination addresses to point to the PowerVR GPU's TA (Tile Accelerator), which is the unit that processes incoming vertices, storing them within vertex buffers in VRAM until it is time to draw the scene. pvr_dr_target() here is simply returning a pointer to ONE of the two store queues, then we translate gtaVert to pvrVert within the SQ, and finally do a call to pvr_dr_commit() to blast that fucker directly to the TA... Something to keep in mind is that although we have two SQs, they cannot both be flushed and accessing the memory bus simultaneously, or the SH4 CPU's pipeline will stall while he first store queue finishing flushing. What we do instead is alternate between writing to one while we flush another store queue. This essentially creates an efficient transfer pipeline where we are never stalled waiting for one store queue to finish! This is honestly the Dreamcast's equivalent of the Genesis's fabled "Blast Processing." Now, the rest of the sprite routine is pretty standard crap, just looping over vertices, blasting them through the store queues. I have gone ahead and added C++20's [[likely]] and [[unlikely]] optimization hints on branches and loops, and yes, we have confirmed that they do actually impact performance on the SH4 architecture with GCC14! The loops have also been unrolled to process up to three vertices at a time, prefetching each one into the cache while we're writing the previous one to the store queue... allowing us to easily push a shitton of these sprites. #cplusplus #cpp #gamedev #retrocomputing
17
83
5
795
40,729
Pre-orders for the @analogue Duo open tomorrow, however it wasn't very clear to me that OpenFPGA support IS NOT INCLUDED, so I made sure to highlight this in the post: retrorgb.com/analogue-duo-pr…
30
22
1
117
27,610
Naomi Peori retweeted
Ghouls'n Ghosts - MEGA DRIVE AMARUS MOD : As usual, LEFT: original MD game - CENTER: hacked MD game - RIGHT: original ARCADE game
10
25
143
8,137
You can now use any hard drive size in the PS2 and simply drag and drop games ISO’s onto the hard drive. New version of OPL brings a lot of quality of life improvements and unlimited storage options! Check out the video! 👉 youtu.be/nKoRvWKojz0
46
288
47
1,402
103,625
Naomi Peori retweeted
After much anticipation and over two years of development, today is the day we finally get to talk about Project Stellar! Join us as we share with you Project Stellar, StellarOS, XboxHD+ v2, and most importantly the future of the Original Xbox. makemhz.com/blogs/news/annou…
80
176
50
883
Naomi Peori retweeted
I'd like to reveal that RT64, the path tracer behind sm64rt, is evolving into an N64 emulator plugin. Here's a small reel of footage I've captured from games that are already showing results. Ray traced lighting, object motion blur, widescreen, DLSS and 60+ FPS.
541
5,653
1,090
25,565
Hello potential employers, I've been part of a #layoff. If you need someone on #threat #research, #malware reverse engineering and #detection, I might be right for you. DM me and I'll give you my #LinkedIn profile. Working on my #resume for the first time in 7 years now. 😢😭
28
118
8
296
Naomi Peori retweeted
Here is the latest RT5X firmware update! A few highlights, among many: *Support for the 2048 x 1536 iPad LCD kit *Ultra low lag 1080p mode (~1 ms) *The ability to press and hold the remote button to speed thru settings🤡 retrotink.com/post/retrotink…
Rate my setup. This is the only gaming station I need for the rest of my life 🤡
36
88
18
436
Naomi Peori retweeted
What would have happened if the PlayStation 1 CPU had a real data cache? You can find out with the #MiSTerFPGA PSX core, it's available as option. Some games profit a lot.
22
60
7
416
After months of work, kudos to @davidgfnet, we finally have updated the PSP toolchain to the latest Binutils (2.37.0), GCC (11.2.0), and Newlib (4.1.0) #RetroArch is already using it in the nightly binaries, we have saved some KB as well 😝 #PSPDev #Docker github.com/pspdev/pspdev
6
22
1
115
Naomi Peori retweeted
so, PS4 Crypto Coprocessor (CCP) interface in secure kernel had a bug that allowed us to dump (or better saying, bruteforce) key slots from SAMU, that's how AES/HMAC keys from PFS, portability keys, VTRM keys, etc could be retrieved on unpatched firmware: gist.github.com/flatz/222153…
44
153
10
610
Naomi Peori retweeted
We have now opened up preorders for the #MemCardPRO! Please read the details on the page before preordering. 👇 🛒 | 8bitmods.com/accessories/mem…
5
6
1
44
Naomi Peori retweeted
Not exactly the hack of the century, but here's my long overdue writeup about dumping the PC-Engine's internal YUV lookup ROM by looking at tiny lines on silicon: furrtek.free.fr/?a=pceyuv
11
59
2
240
Translation: We got all (symmetric) ps5 root keys. They can all be obtained from software - including per-console root key, if you look hard enough!
Another one bites the dust 😎
135
1,001
277
3,525
Naomi Peori retweeted
A few hours ago, @rustlang 1.56 was released! 🦀 This version ships with the new edition: Rust 2021! 🐊✨🎊 There's quite a few new features in the new version and edition: 1/17
8
323
21
1,319
Naomi Peori retweeted
Usually, I would want to fix the graphic glitches first, but I cannot stay quiet anymore :) First ingame shots of Spyro on the #MiSTerFPGA PSX core. Game is loaded via savestate, not booted from CD. You can try this and other short game snapshots yourself next week.
57
123
48
652
I made a bunch of changes that were desperately needed. Thanks to everyone who encouraged me to slow down, but also keep going. The address lines are jumper enabled now in case the flash chip pins being NC means really leave it NC. Bottom layer is GND. Top is +5V.
5
1
5
Naomi Peori retweeted
An introduction to register allocation, in which Lexical Cat takes a trip to Paris 🇫🇷🐈‍⬛
33
138
11
761
#PS2 has 3 main CPUs, EE, IOP and DVP, which means, 3 toolchains. Months ago we upgraded the toolchain for EE cpu, now is the turn of IOP. We’re happy to announce that we updated to the latest GCC version. You can get it as usual in #GitHub or #DockerHub github.com/ps2dev/ps2dev – at Benamejí, España
4
26
3
113