Commit Graph

1836 Commits

Author SHA1 Message Date
StapleButter c5b7ec2168 attempt at depth buffer 2017-02-14 03:29:02 +01:00
StapleButter 68fb77b204 * backface/frontface culling (and rendering of backfacing polygons)
* fix clipping/viewport transform precision errors
* triangle/quad strips
2017-02-14 02:43:35 +01:00
StapleButter fb53fd5195 * fix overflows during fixed-point multiply
* small fix to SwapBuffers
2017-02-13 14:59:51 +01:00
StapleButter 361ddd7595 * fix GXFIFO decoding
* proper SwapBuffers implementation
* fix polygon clipping
* misc fixes
2017-02-13 02:07:54 +01:00
StapleButter 15c8d59e2b vertex colors, with Gouraud shading and all
has yet to be checked for whether it's accurate, optimized, etc...
2017-02-11 04:10:59 +01:00
StapleButter 050ba5dfbe some debuts of 3D drawing.
it can draw non-strip polygons, filled with a fixed color. oh and it doesn't work if they're facing back.
2017-02-11 03:54:08 +01:00
StapleButter 78f49d061a base for software renderer 2017-02-10 16:50:26 +01:00
StapleButter c95f7578bb store vertices and polygons. strips not handled yet. 2017-02-10 15:24:46 +01:00
StapleButter 3ad95fbc65 Merge pull request #4 from lioncash/off-by-one
ARM: Fix out of bounds array indexing in RestoreCPSR
2017-02-10 14:27:26 +01:00
Lioncash 896bb1b781 ARM: Fix out of bounds array indexing in RestoreCPSR 2017-02-09 08:18:05 -05:00
StapleButter 2bd67aef64 calculate vertices.
it doesn't do much, but hey, it's a start.
2017-02-09 02:39:52 +01:00
StapleButter 49fd4ccb45 * GXFIFO DMA (note: Mario Slam Basketball keeps overflowing the FIFO for whatever reason, probably lack of proper DMA timings)
* start implementing matrix shit
2017-02-08 21:30:10 +01:00
StapleButter 796dc58f71 GXFIFO finished. hacktastic integration into the ARM9 loop. 2017-02-08 00:52:37 +01:00
StapleButter 971e7b7e89 well, GX FIFO base. noting that for now, it doesn't do much beyond getting full real quick.
also make ROM loading fail gracefully if it shits itself, instead of entering an endless loop.
2017-02-07 23:31:21 +01:00
StapleButter 2b7fac05c7 rework FIFO crap so it can also be used for the GXFIFO crapo. 2017-02-07 22:41:33 +01:00
StapleButter 0562410de2 * lay base for 3D engine
* add failure reporting to Init functions, and DeInit functions
* GPU-related notes
* readme update
2017-02-07 22:23:46 +01:00
StapleButter 86cdf28323 change how redrawing is done. fixes memory leak and other fun shit.
calling GetDC() over and over again isn't a good idea.
2017-02-06 00:07:22 +01:00
StapleButter 3cf38e3e9d lil' hack. makes SM64DS go ingame. 2017-02-05 18:34:21 +01:00
StapleButter 1001df49ea support extended palette for 256-color sprites. 2017-02-05 18:23:03 +01:00
StapleButter e88cf1b43d apparently when you set an out-of-bounds address for EEPROM, it should wrap around
TODO: check if it also happens with Flash

also fix shit that could have later turned into memory leaks
2017-02-05 17:45:17 +01:00
StapleButter ff3b60bc93 ARM7 BIOS read protect.
(noting that Super Princess Peach reads from the BIOS. probably a bug)
2017-02-05 17:15:17 +01:00
StapleButter 5ccf56d21d * fix 'STMxx with base register included in register list' when base register is banked.
* fix cart DMA for ARM9.
2017-02-05 16:50:20 +01:00
StapleButter 829b044802 improve touchscreen precision 2017-02-04 00:12:08 +01:00
StapleButter 67f0c7b123 256-color sprites. code's weird tho. check it later. 2017-02-04 00:07:25 +01:00
StapleButter 4b3f635c9f fixes to tiled extended BGs. support for 256color/direct bitmap BGs. 2017-02-03 23:49:37 +01:00
StapleButter 399e30017a fix extended backgrounds. blarg 2017-02-03 22:58:00 +01:00
StapleButter 410c18fac4 blarg 2017-02-03 21:11:23 +01:00
StapleButter 1f691f3795 * HBlank flag and IRQ.
* VBlank and HBlank DMA.
2017-02-03 18:47:40 +01:00
StapleButter f4335b9292 better save support. not hardcoded filename, support for non-tiny EEPROM and Flash, attempt at autodetecting the right memory type. 2017-02-03 16:57:31 +01:00
StapleButter 7e9972e037 an attempt at shitty extended "tile+rotscale" BGs 2017-02-02 01:18:03 +01:00
StapleButter 6486d0e10d BG extended palettes! 2017-02-02 00:09:40 +01:00
StapleButter 3451e41bd1 tile hflip/vflip for text BGs.
256-color mode for text BGs.
2017-02-01 23:43:02 +01:00
StapleButter c19056a564 implement screen swap.
silence some logging for 3D GPU writes.
2017-02-01 21:57:25 +01:00
StapleButter 282dcdece3 * make direct boot less shitty.
* add main RAM mirror at 0x02800000 for ARM7.
2017-02-01 21:35:00 +01:00
StapleButter 64f9822db6 fix ARM7 VRAM 2017-02-01 19:30:57 +01:00
StapleButter e028973caa this is not how sprite priorities work, you derp 2017-02-01 18:47:13 +01:00
StapleButter 03c1a9cbc8 more anti-crash.
don't unmap VRAM in cases of overlaps. fixes NSMB minigames, for now.
2017-02-01 17:05:12 +01:00
StapleButter 6d2092a106 blarg 2017-02-01 00:31:23 +01:00
StapleButter 1f5faf8291 TSC support, touchscreen input. not perfect but for now this will do. 2017-02-01 00:24:36 +01:00
StapleButter 548b8d99a6 sqrt crap 2017-01-31 21:53:45 +01:00
StapleButter 9541d17c7c * implement the last missing instructions. QADD is not good according to ARMWrestler, but it doesn't make sense. TODO: investigate.
* buttons A and B
* silence 'unknown IO write' for 3D GPU ports
2017-01-31 18:41:31 +01:00
StapleButter 516bc30ee3 * very shitty implementation of save RAM. requires an existing save file for now.
* refine some SPI code, too. mostly removing a useless function.
* support 16bit accesses to DMAxCNT registers.
2017-01-31 17:34:17 +01:00
StapleButter c3e2f7ad9b * fix VRAM address calculation for GPU A
* add support for mode 5
2017-01-31 15:43:22 +01:00
StapleButter 12ebf83665 keep the GPU from crashing if there's no VRAM mapped, I guess.
noting that the way it's accessing VRAM is grossly inaccurate.
2017-01-31 04:06:05 +01:00
StapleButter 594286ee5d * scheduler revamp, simpler design
* fix dumb bug of the year: ARM LDR opcodes would accidentally read twice, which fucked with things like the IPC FIFO.
2017-01-31 03:54:51 +01:00
StapleButter 348bbd8cb8 move TCM shit to CP15.cpp. closer to the real thing (for example now DMA can't access TCM, etc).
the code is shit. I would use templates if only it fucking worked without requiring the function body to be included in a .h.
2017-01-30 19:11:29 +01:00
StapleButter 6f3b0498db start refactoring shit: more accurate timing and way of counting cycles. 2017-01-30 18:36:11 +01:00
StapleButter 296212ac49 * support for cart secure area
* fix bug in THUMB LDMIA
2017-01-23 02:26:05 +01:00
StapleButter fe3a189406 esgshdgdfh 2017-01-22 20:37:12 +01:00
StapleButter ac8936539e some attempt at cart support 2017-01-22 20:34:59 +01:00