Commit Graph

128 Commits

Author SHA1 Message Date
joevt
a08e70781a Add BAR 0 to control
BAR 0 exists on a real Power Mac 8600 and the dingusppc 7500.

On a Power Mac 8600, the initial value is 0x84000003. In Open Firmware, you can write to all bits of the BAR and read the value back except the 2 least significant bits are always %11. Bit 0 indicates I/O space. Bit 1 is reserved and should be zero so maybe this is not a real I/O space BAR. 0x8400000 is written to the BAR by Open Firmware. It doesn't look like a normal I/O address which are usually 16 bits.

On the emulated 7500, 0x02000000 is written to the BAR by Open Firmware sometime during probe-all. The BAR did not behave as it does in the Power Mac 8600. This commit fixes that.

Two questions remain:
1) Which fcode writes to the BAR? Is it the probe fcode or is it the control fcode? There's no config-_! in the control fcode.
2) What is the purpose of the BAR? Writing to it can cause a hang. The testbits code below seems to succeed - it restores the original value after reading the result of testing each bit and before displaying the result. The values shown for the MSB (0x84 on the 8600 and 0x02 on the 7500) could be three flag bits.

```
dev vci0
: testbits { adr ; org }
	cr
	adr config-l@ dup -> org ." original : " 8 u.r cr
	20 0 do
		1 1f i - << dup 8 u.r ."  : "
		adr config-l!
		adr config-l@
		org adr config-l!
		8 u.r cr
	loop
	;

15810 testbits \ 15810 is the address of the BAR on the emulated 7500.
```
2022-09-02 03:39:50 -07:00
joevt
3ee2ea1871 Fix read/write argument names
base class uses reg_start so derived classes should do the same.
Some derived class already uses reg_start for read method.
2022-08-22 17:16:22 -07:00
Maxim Poliakovski
32b8c8ed43 pcidevice: fix expansion ROM mapping. 2022-08-20 12:51:08 +02:00
joevt
b76bfedf4b Remove unnecessary linefeeds from log
To remove blank lines in the dingusppc.log file or in the console output when -d is used.
2022-08-14 05:26:56 -07:00
Maxim Poliakovski
8dfdf55dff Initial emulation for the Control video. 2022-08-07 15:25:58 +02:00
Maxim Poliakovski
a0e660f6b4 videoctrl: remove unnecessary delay. 2022-08-07 15:25:58 +02:00
Maxim Poliakovski
c0078ce97d Refactor MachineBase and MachineFactory classes.
Adding new machines is much easier now.
A significant amount of duplicated code has been reduced.
2022-07-18 20:27:34 +02:00
Maxim Poliakovski
c37893847a atimach64gx: self-registration with the device registry. 2022-07-18 20:27:34 +02:00
Maxim Poliakovski
0df1b2c408 ATI Mach64 GX controller emulation. 2022-05-21 14:51:27 +02:00
Maxim Poliakovski
226b51d8db displayid: constructor with parameters. 2022-05-21 14:51:27 +02:00
Maxim Poliakovski
cd7624feb5 videoctrl: add pixel_depth member. 2022-05-21 14:51:27 +02:00
Maxim Poliakovski
bd24b644c9 Move ATI Mach64 definitions to separate header. 2022-05-21 14:51:27 +02:00
Maxim Poliakovski
6b686e402e videoctrl: fix surface size. 2022-05-21 14:51:27 +02:00
Maxim Poliakovski
dd79ec38e4 ATIRage: hack to support OF output. 2022-05-21 14:51:27 +02:00
Maxim Poliakovski
36098af5eb ATIRage: use common PCI configuration code. 2022-05-21 14:51:27 +02:00
Maxim Poliakovski
827d7f10dd pdmonboard: reduce logging messages. 2022-02-26 13:37:47 +01:00
Maxim Poliakovski
5c177cc50f Simplify registration of HW component types. 2022-01-26 16:45:21 +01:00
Maxim Poliakovski
d4ecb77b24 pdmonboard: enable periodic video updates. 2022-01-10 17:56:24 +01:00
Maxim Poliakovski
9caaf0f538 Basic emulation of the PDM on-board video. 2021-12-07 22:54:03 +01:00
Maxim Poliakovski
476d893094 videoctrl: add framebuffer conversion callback. 2021-12-07 22:47:25 +01:00
Maxim Poliakovski
fff597075d Monitor type can be now specified from the command line. 2021-12-06 00:40:40 +01:00
Maxim Poliakovski
609fb43726 Rewrite DisplayID to work with AMIC & ATI Rage. 2021-11-30 01:26:32 +01:00
Maxim Poliakovski
99f5aba12e atirage: replace raw pointers with unique_ptr. 2021-11-17 23:30:43 +01:00
Maxim Poliakovski
cbf4e266e1 atirage: better name for HW registers. 2021-11-11 14:57:31 +01:00
Maxim Poliakovski
a01cd9c993 Make display ID method selectable in video controller. 2021-11-09 14:15:21 +01:00
Maxim Poliakovski
958d3ee96a Factor out common video controller code. 2021-11-09 13:40:13 +01:00
Maxim Poliakovski
c0cd6eb38f Add missing licence headers, update license date. 2021-10-23 21:00:31 +02:00
Maxim Poliakovski
9329d56d83 Move devices into dedicated subdirectories. 2021-10-23 20:17:47 +02:00