Author Topic: OS Screen Draw  (Read 2762 times)

0 Members and 1 Guest are viewing this topic.

Offline Trevor

  • Goldfinger64 Dev Location:UK
  • Full Member
  • ***
  • Posts: 191
  • Karma: +5/-0
  • Everdrive64 v2 (PAL)
    • View Profile
OS Screen Draw
« on: February 19, 2015, 01:29 PM »

Just out of curiosity I searched OS Binary for display lists but couldnt find any.
eg, G_ENDDL DF000000 000000 or more commonly B8000000 00000000

I couldnt find any syncs either (eg E7000000 00000000 PipeSync() )

Krikzz, how do you draw your menus?

Trev

Offline KRIKzz

  • Administrator
  • Hero Member
  • *****
  • Posts: 3305
  • Karma: +495/-2
    • View Profile
Re: OS Screen Draw
« Reply #1 on: February 19, 2015, 02:09 PM »
Screen buffer address is not some constants, i used malloc for buffers memory allocation. Not sure if i understand correctly your question

Offline Trevor

  • Goldfinger64 Dev Location:UK
  • Full Member
  • ***
  • Posts: 191
  • Karma: +5/-0
  • Everdrive64 v2 (PAL)
    • View Profile
Re: OS Screen Draw
« Reply #2 on: February 19, 2015, 03:15 PM »
Yeah, what I mean is the actual drawing of the screen, the text and rectangles etc.

I would have assumed the menu was drawn on top of a rectangle with one of many colour registers used for alpha in 2 cycle mode, all of which drawn on top of a texture rectangle in copy mode.

I couldnt find any such commands, hence my question.
(eg, BA SetOtherMode_H for changing cycle type
FC SetCombine() for alpha
B9 Rendermode)

Trev

Offline KRIKzz

  • Administrator
  • Hero Member
  • *****
  • Posts: 3305
  • Karma: +495/-2
    • View Profile
Re: OS Screen Draw
« Reply #3 on: February 19, 2015, 04:31 PM »
Drawing is fully software and do not use any standard libs functions. My code build the bitmap in back buffer array and then throw it to the screen

Offline saturnu

  • ヽ(^o^)丿
  • Hero Member
  • *****
  • Posts: 1179
  • Karma: +155/-0
    • View Profile
    • :D
Re: OS Screen Draw
« Reply #4 on: February 19, 2015, 04:57 PM »
@Trevor
It seems like you try to find nintendo sdk function signatures in a libdragon rom. :>

Offline Trevor

  • Goldfinger64 Dev Location:UK
  • Full Member
  • ***
  • Posts: 191
  • Karma: +5/-0
  • Everdrive64 v2 (PAL)
    • View Profile
Re: OS Screen Draw
« Reply #5 on: February 19, 2015, 08:19 PM »
Well saturnu... I was looking for Hardware Commands which shouldnt matter whether it was done with Official SDK, libdragon or pure hex.

If you want to change the current rendermode the RDP expects a B900031D xxxxxxxx command.
Likewise to change cycletype the RDP expects BA001400 00x00000

Anyway, thanks krikzz, I didnt really have a follow-up to your answer, but I guess Ive been thinking about how to draw to a framebuffer while also drawing via RDP to framebuffer.

Example (since disproved*) was that the intro to GoldenEye uses a single 440x299x8 texture.
I thougt maybe the image could somehow be written to the framebuffer bypassing Tmem, then the 3D stuff can be drawn as normal on top.
How would such a technique work?

It seems as though in your answer this is what you do, "My code build the bitmap in back buffer array and then throw it to the screen"

Trev

* It turns out GE draws a Texture Rectangle and loads a 'chunk' of the texture into Tmem, copies to screen then fetches another chunk untill the texture is drawn in full.