BIOS sends first draw command, make CI upload build artifacts

This commit is contained in:
liuk7071 2023-07-29 16:36:15 +02:00
parent f40ade4b33
commit bfe582e3a2
5 changed files with 66 additions and 9 deletions

View file

@ -31,3 +31,9 @@ jobs:
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Upload executable
uses: actions/upload-artifact@v2
with:
name: Linux Executable
path: './build/ChonkyStation'

View file

@ -31,3 +31,9 @@ jobs:
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Upload executable
uses: actions/upload-artifact@v2
with:
name: Windows Executable
path: './build/Release/ChonkyStation.exe'

View file

@ -9,8 +9,8 @@ public:
private:
MAKE_LOG_FUNCTION(log, cpuTraceLogger)
std::string gprNames[32] = { "$zero", "$at", "$v0", "$v1", "$a0", "$a1", "$a2", "$a3",
"$t0", "$t1", "$t2", "$t3","$t4", "$t5", "$t6", "$t7",
"$s0", "$s1", "$s2", "$s3", "$s4", "$s5", "$s6", "$s7",
"$t8", "$t9", "$k0", "$k1", "$gp", "$sp", "$fp", "$ra" };
std::string gprNames[32] = { "$zero", "$at", "$v0", "$v1", "$a0", "$a1", "$a2", "$a3",
"$t0", "$t1", "$t2", "$t3","$t4", "$t5", "$t6", "$t7",
"$s0", "$s1", "$s2", "$s3", "$s4", "$s5", "$s6", "$s7",
"$t8", "$t9", "$k0", "$k1", "$gp", "$sp", "$fp", "$ra" };
};

View file

@ -34,6 +34,18 @@ void Gpu::writeGp1(u32 data) {
stat |= (data & 3) << 29;
break;
}
case (u32)GP1Command::StartOfDisplayArea: {
// TODO: Stubbed for now
break;
}
case (u32)GP1Command::HorizontalDisplayRange: {
// TODO: Stubbed for now
break;
}
case (u32)GP1Command::VerticalDisplayRange: {
// TODO: Stubbed for now
break;
}
case (u32)GP1Command::DisplayMode: {
// Bits 0-5 are copied to GPUSTAT.17-22
stat &= ~(0x3f << 17);
@ -70,6 +82,31 @@ void Gpu::startCommand(u32 rawCommand) {
stat |= (rawCommand & (1 << 11)) << 4;
break;
}
case (u32)GP0Command::TextureWindowSetting: {
log("TextureWindowSetting\n");
// TODO: Stubbed for now
break;
}
case (u32)GP0Command::SetDrawingAreaTopLeft: {
log("SetDrawingAreaTopLeft\n");
// TODO: Stubbed for now
break;
}
case (u32)GP0Command::SetDrawingAreaBottomRight: {
log("SetDrawingAreaBottomRight\n");
// TODO: Stubbed for now
break;
}
case (u32)GP0Command::SetDrawingOffset: {
log("SetDrawingOffset\n");
// TODO: Stubbed for now
break;
}
case (u32)GP0Command::MaskBitSetting: {
log("MaskBitSetting\n");
// TODO: Stubbed for now
break;
}
default:
Helpers::panic("[GPU] Unimplemented gp0 command 0x%02x\n", (u32)cmd);
}

View file

@ -18,14 +18,22 @@ public:
u32 paramsLeft = 0;
enum class GP0Command {
NOP = 0x00,
DrawModeSetting = 0xE1
NOP = 0x00,
DrawModeSetting = 0xE1,
TextureWindowSetting = 0xE2,
SetDrawingAreaTopLeft = 0xE3,
SetDrawingAreaBottomRight = 0xE4,
SetDrawingOffset = 0xE5,
MaskBitSetting = 0xE6
};
enum class GP1Command {
ResetGpu = 0x00,
DMADirection = 0x04,
DisplayMode = 0x08
ResetGpu = 0x00,
DMADirection = 0x04,
StartOfDisplayArea = 0x05,
HorizontalDisplayRange = 0x06,
VerticalDisplayRange = 0x07,
DisplayMode = 0x08
};
void startCommand(u32 rawCommand);