don't use K funcs in main, remove some video stuff
This commit is contained in:
parent
11f2201659
commit
a4bab019d7
2 changed files with 5 additions and 24 deletions
|
@ -40,7 +40,6 @@ if K_DEBUG {
|
||||||
|
|
||||||
macro KMaybeDumpString(str) {
|
macro KMaybeDumpString(str) {
|
||||||
if K_DEBUG {
|
if K_DEBUG {
|
||||||
lui k0, K_BASE
|
|
||||||
lw t1, K_CONSOLE_AVAILABLE(k0)
|
lw t1, K_CONSOLE_AVAILABLE(k0)
|
||||||
beqz t1,+
|
beqz t1,+
|
||||||
KDumpString({str})
|
KDumpString({str})
|
||||||
|
|
28
main.asm
28
main.asm
|
@ -23,8 +23,6 @@ if origin() != 0x1000 {
|
||||||
include "kernel.asm"
|
include "kernel.asm"
|
||||||
|
|
||||||
Main:
|
Main:
|
||||||
lui t0, K_BASE
|
|
||||||
|
|
||||||
lui s0, BLAH_BASE
|
lui s0, BLAH_BASE
|
||||||
mfc0 t1, CP0_Status
|
mfc0 t1, CP0_Status
|
||||||
sw t1, 8(s0)
|
sw t1, 8(s0)
|
||||||
|
@ -57,11 +55,7 @@ Main:
|
||||||
ori a2, a0, BLAH_XXD
|
ori a2, a0, BLAH_XXD
|
||||||
jal DumpAndWrite
|
jal DumpAndWrite
|
||||||
lli a3, 0x20 * 4
|
lli a3, 0x20 * 4
|
||||||
KMaybeDumpString(KS_Newline)
|
// KMaybeDumpString(KS_Newline)
|
||||||
|
|
||||||
InitVideo:
|
|
||||||
jal SetupScreen
|
|
||||||
nop
|
|
||||||
|
|
||||||
Test3D:
|
Test3D:
|
||||||
// write the jump to our actual instructions
|
// write the jump to our actual instructions
|
||||||
|
@ -120,7 +114,7 @@ Start3D:
|
||||||
ori a2, a0, BLAH_XXD
|
ori a2, a0, BLAH_XXD
|
||||||
jal DumpAndWrite
|
jal DumpAndWrite
|
||||||
lli a3, 0x40 * 4
|
lli a3, 0x40 * 4
|
||||||
KMaybeDumpString(KS_Newline)
|
// KMaybeDumpString(KS_Newline)
|
||||||
|
|
||||||
SP_BUSY_WAIT()
|
SP_BUSY_WAIT()
|
||||||
|
|
||||||
|
@ -135,24 +129,12 @@ Start3D:
|
||||||
sw t0, SP_STATUS(a0)
|
sw t0, SP_STATUS(a0)
|
||||||
nop
|
nop
|
||||||
|
|
||||||
|
jal SetupScreen
|
||||||
|
nop
|
||||||
|
|
||||||
EnableInt()
|
EnableInt()
|
||||||
|
|
||||||
MainLoop:
|
MainLoop:
|
||||||
// borrowing code from krom for now:
|
|
||||||
WaitScanline(0x1E0) // Wait For Scanline To Reach Vertical Blank
|
|
||||||
WaitScanline(0x1E2)
|
|
||||||
// WaitScanline sets a0
|
|
||||||
|
|
||||||
li t0, 0x00000800 // Even Field
|
|
||||||
sw t0, VI_Y_SCALE(a0)
|
|
||||||
|
|
||||||
WaitScanline(0x1E0) // Wait For Scanline To Reach Vertical Blank
|
|
||||||
WaitScanline(0x1E2)
|
|
||||||
// WaitScanline sets a0
|
|
||||||
|
|
||||||
li t0, 0x02000800 // Odd Field
|
|
||||||
sw t0, VI_Y_SCALE(a0)
|
|
||||||
|
|
||||||
j MainLoop
|
j MainLoop
|
||||||
nop
|
nop
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue