Kuribo64
Views: 19,978,439 Home | Forums | Uploader | Wiki | Object databases | IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search
04-16-24 07:33 AM
Guest:

0 users reading MIPS Help! | 1 bot

Main - Computers and technology - MIPS Help! Hide post layouts | New reply


Yoshimaster96
Posted on 06-04-15 06:54 PM Link | #60629
.=0xC00000
.set noreorder
.text

li $24, 0x500040
li $25, 0x100000
sw $25, 0($24)
li $25, 0xFFFFFF
sw $25, 4($24)
li $25, 0x200020
sw $25, 8($24)
li $25, 0x200020
sw $25, 12($24)
jal fillrec
nop
j endprg
nop

filrec: li $8, 0x500040
li $9, 640
lw $4, 0($8)
lw $5, 4($8)
lw $6, 8($8)
lw $7, 12($8)
srl $13, $6, 16
andi $14, $6, 0xFFFF
srl $15, $7, 16
andi $16, $7, 0xFFFF
addu $14, $14, $13
addu $16, $16, $15
testal: beq $15, $16, endfil
beq $13, $14, incver
multu $15, $9
mflo $10
addu $10, $10, $13
sll $10, $10, 2
addu $10, $10, $4
sw $5, 0($10)
addi $13, $13, 1
j testal
incver: addi $15, $15, 1
j testal
endfil: jr $31
nop

imgrec: nop
jr $31
nop

rlerec: nop
jr $31
nop

putpix: li $8, 0x500000
li $9, 640
lw $4, 0($8)
lw $5, 4($8)
lw $6, 8($8)
lw $7, 12($8)
multu $7, $9
mflo $10
addu $10, $10, $6
sll $10, $10, 2
addu $10, $10, $4
sw $5, 0($10)
jr $31
nop

endprg: nop

For some reason, filrec doesn't work as expected, not rendering at all. The framebuffer is 640x480 in address range $100000-$22BFFF. Each pixel is 00BBGGRR.

$4 stores the framebuffer address. This is $100000 in this example.
$5 stores the color value. #FFFFFF here.
$6 stores the following: XXXXWWWW
$7 stores the following: YYYYHHHH

My Youtube Channel:
Yoshimaster96smwc
Some layout tips/code!

-Yoshimaster96

Arisotura
Posted on 06-05-15 12:30 PM Link | #60681
It's named 'filrec', but you 'jal fillrec'. That might be why.

____________________
NSMBHD - Kafuka - Jul
melonDS the most fruity DS emulator there is

zafkflzdasd

Yoshimaster96
Posted on 06-05-15 03:32 PM Link | #60685
Thanks! Got it working now!

My Youtube Channel:
Yoshimaster96smwc
Some layout tips/code!

-Yoshimaster96

Arisotura
Posted on 06-05-15 03:36 PM Link | #60686
What's more surprising is that you didn't get an assembler error from it (or you just missed it?).

____________________
NSMBHD - Kafuka - Jul
melonDS the most fruity DS emulator there is

zafkflzdasd

Yoshimaster96
Posted on 06-06-15 12:08 AM Link | #60702
Yeah, probably missed it. You can close or trash this thread if you'd like.

My Youtube Channel:
Yoshimaster96smwc
Some layout tips/code!

-Yoshimaster96


Main - Computers and technology - MIPS Help! Hide post layouts | New reply

Page rendered in 0.029 seconds. (2048KB of memory used)
MySQL - queries: 27, rows: 206/206, time: 0.011 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.