Commit Graph

1584 Commits

Author SHA1 Message Date
Maxim Poliakovski
ab60bb8d0b memctrlbase: cosmetic improvements. 2024-03-26 00:39:33 +01:00
dingusdev
c7ca4d9b97
Merge pull request #80 from dingusdev/cpu-refactor2
Use templating for interpreter
2024-03-25 08:01:51 -07:00
dingusdev
3c3d0b46db
Merge branch 'master' into cpu-refactor2 2024-03-25 07:45:21 -07:00
joevt
f08d9ba81e ppcexec: Fix templated lhzux. 2024-03-25 07:43:34 -07:00
joevt
15a9ffd340 ppcopcodes: Indent. 2024-03-25 07:42:17 -07:00
joevt
b9aae48517 ppcopcodes: Fix templated st. 2024-03-25 07:37:54 -07:00
joevt
e2864ab08c ppcopcodes: Fix templated add. 2024-03-25 07:37:52 -07:00
joevt
effe0198ce ppcexec: Fix bcctr templated parameters. 2024-03-25 07:36:46 -07:00
joevt
c5ac862cef debugger: Add list of input and output registers.
So the debugger can show them during stepping.
The fmt_* functions now take a PPCDisasmContext instead of just the ctx->instr_str so that they can alter the context.
Some fmt_* functions have an alternate (e.g. fmt_twoop_in for fmt_twoop) to indicate a difference in input/output registers.
The mtsrin and mfsrin instructions use a register to indicate which sr register to use.
The string instructions may affect multiple registers but only the first is included in the list.
Removed some extra blank lines.

Fixes:
lscbx: Add r0 check.
mftb: Do simplified if the spr is illegal. Maybe should do illegal opcode instead?
2024-03-24 19:34:29 -07:00
joevt
cd77e361ab ppcexceptions: Use MSR enums. 2024-03-24 18:53:05 -07:00
joevt
bc5fd44172 ppcmmu: Don't log mmu_mode 1. 2024-03-24 18:52:49 -07:00
dingusdev
c781820bf6 Continued table fixes 2024-03-24 17:43:14 -07:00
dingusdev
30802affd4 Continued fixes for tables 2024-03-24 17:24:36 -07:00
dingusdev
eab021a5cb Regression fixes 2024-03-24 16:34:42 -07:00
dingusdev
505b5e6468 Slight tweak to PPC Macros 2024-03-24 15:35:11 -07:00
dingusdev
5631485465 Cleaning up templating 2024-03-24 14:06:07 -07:00
joevt
fafbd9a04f mmiodevice: Move SIZE_ARG macro from pcibase. 2024-03-24 13:03:31 -07:00
joevt
bc582e64cc dbdma: Clear cmd_in_progress before callback.
Because the callback might start DMA commands.
2024-03-24 13:01:12 -07:00
joevt
df0044a110 dbdma: Make sure interrupt controller is set. 2024-03-24 13:00:58 -07:00
joevt
503556196a dbdma: Add missing flags, fields, comments. 2024-03-24 13:00:33 -07:00
joevt
fd961f9ff9 Fix Analyzer warnings.
In Xcode, type Command-Shift-B to analyze every source file or Command-Shift-Control-B to analyze the current source file.

For pseudo_dma_read report FIFO underrun and init data_word in that case.
2024-03-24 12:56:11 -07:00
joevt
e3411670cb videoctrl: Add cursor_dirty flag.
If the flag is set when it comes time to draw the cursor again, then call setup_hw_cursor to update the cursor before drawing the cursor.
2024-03-24 12:45:52 -07:00
joevt
d134107aba atirage: Draw frame buffer only when it changes. 2024-03-24 12:45:30 -07:00
joevt
5de1c23aba adbbus: Don't abort. 2024-03-24 12:35:11 -07:00
joevt
72b257e5d1 atirage: Improve draw_hw_cursor loops.
- Read 8 bytes at a time instead of just 1.
- Remove multiply operations from loop. We just need increments or additions.
- Change compares with int to compares with zero.
2024-03-24 12:27:44 -07:00
joevt
9d0bae2d03 atirage: Add offset to cursor X position.
CUR_HORZ_OFF becomes non-zero when the cursor needs to be drawn to the left of the left edge of the frame buffer.

CUR_VERT_OFF is handled differently. When CUR_VERT_OFF is non-zero, CUR_OFFSET is changed to point to the first line of the cursor that will be drawn, so CUR_VERT_OFF is the number of lines to remove from the total height of the cursor.
Alternatively, we could handle CUR_VERT_OFF the same way as CUR_HORZ_OFF by leaving the cursor height constant, drawing the cursor starting from the CUR_VERT_OFF line, and adjusting cursor Y position by negative CUR_VERT_OFF.
2024-03-24 12:26:10 -07:00
joevt
ad6d5e9ec9 atimach64gx: Improve draw_hw_cursor loops.
- Read 8 bytes at a time instead of just 1.
- Remove multiply operations from loop. We just need increments or additions.
- Change compares with int to compares with zero.
2024-03-24 12:25:55 -07:00
joevt
6462ceef24 atimach64gx: Add offset to cursor X position.
CUR_HORZ_OFF becomes non-zero when the cursor needs to be drawn to the left of the left edge of the frame buffer.

CUR_VERT_OFF is handled differently. When CUR_VERT_OFF is non-zero, CUR_OFFSET is changed to point to the first line of the cursor that will be drawn, so CUR_VERT_OFF is the number of lines to remove from the total height of the cursor.
Alternatively, we could handle CUR_VERT_OFF the same way as CUR_HORZ_OFF by leaving the cursor height constant, drawing the cursor starting from the CUR_VERT_OFF line, and adjusting cursor Y position by negative CUR_VERT_OFF.
2024-03-24 12:25:35 -07:00
dingusdev
c281b27220 Attempted templating for interpreter 2024-03-24 12:21:19 -07:00
joevt
1d5502dc3c ppcemu: Make flags atomic.
For flags that might be accessed by other threads.
2024-03-22 19:04:51 -07:00
dingusdev
4ef3c792de Refactoring interpreter, pt. 1
Reduce the number of global variables used by interpreter
2024-03-22 08:01:29 -07:00
joevt
a5aac5754c machinetnt: Add Bandit2 option. 2024-03-20 07:38:56 -07:00
joevt
23903a969d Add get_comp_by_name_optional. 2024-03-20 07:38:48 -07:00
joevt
78020c4794 Add Bandit2 and properties for Chaos. 2024-03-20 07:38:39 -07:00
Maxim Poliakovski
682f1900ae zdocs: add PDM RAM documentation. 2024-03-20 12:16:10 +01:00
Maxim Poliakovski
a9cb0cfb2a atahd: report correct CHS parameters & capacity.
This is required for Open Firmware 2.x to boot Mac OS X
and OpenDarwin.
2024-03-20 12:16:10 +01:00
Mihai Parparita
fc6a4872d6 Ensure that NVRAM is persisted when exiting the debugger after an abort
The SIGABRT handler is not invoked by the abort() call in the loguru
fatal handler, but either way it's not necessary (it does its own abort).

Switch to explicitly cleaning up the machine object, which as a side
effect in the destructor chain will persist the NVRAM.
2024-03-20 12:16:10 +01:00
dingusdev
284f58dec4 Continued build fixing 2024-03-16 19:24:40 -07:00
joevt
e51bc0cea5 scsihd: Reorder switch statement.
Order by case value to match scsicdrom.
2024-03-16 17:44:09 -07:00
dingusdev
da9770c99b Attempted build fix 2024-03-16 13:45:28 -07:00
joevt
266d45e13a timermanager: Make immediate timer more immediate. 2024-03-16 11:46:40 -07:00
joevt
703662cb5b timermanager: Add some thread safety. 2024-03-16 11:46:30 -07:00
joevt
833f74dce6 timemanager: Remove unnecessary parameter. 2024-03-16 11:36:41 -07:00
joevt
014aa90462 timemanager: Remove timer minimum timeout. 2024-03-16 11:36:25 -07:00
joevt
f5dcaebbf8 timemanager: 0 is also < a positive integer. 2024-03-16 11:36:10 -07:00
dingusdev
02a9e8d886 Partial fix for writing qwords 2024-03-15 22:00:54 -07:00
joevt
4fe8cf76bb control: Fix framebuffer start for OF and macOS. 2024-03-15 10:27:48 -07:00
joevt
d4ee43179c control: 15bpp mode is big endian. 2024-03-15 10:27:33 -07:00
joevt
5afe1f1a25 control: MISC_ENABLES is a 12 bit register. 2024-03-15 10:27:24 -07:00
joevt
7eb9a66837 atimach64gx: Calculate vert_blank.
So it's not always zero.
2024-03-15 10:16:44 -07:00