|
|
|||||||
| About Us | Register | FAQ | Members List | Calendar | Mark Forums Read |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Registered User
Join Date: Mar 2004
Location: CHINA
Posts: 8
|
[Reading Source Code]Who can help me ?
In the R3000A.h file, the following codes
typedef union { struct { unsigned long r0, 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, s8, ra, lo, hi; } n; unsigned long r[34]; /* Lo, Hi in r[33] and r[34] */ } GPRRegs; typedef union { struct { unsigned long Index, Random, EntryLo0, EntryLo1, Context, PageMask, Wired, Reserved0, BadVAddr, Count, EntryHi, Compare, Status, Cause, EPC, PRid, Config, LLAddr, WatchLO, WatchHI, XContext, Reserved1, Reserved2, Reserved3, Reserved4, Reserved5, ECC, CacheErr, TagLo, TagHi, ErrorEPC, Reserved6; } n; unsigned long r[32]; } CP0Regs; What's the meaning of GPRRegs & CP0Regs ?
__________________
sig too big , limits 500x100 & 20 kbs I am Jedimaster |
|
|
|
|
|
#2 (permalink) |
|
Administrator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Aug 2002
Location: somewhere
Posts: 8,589
|
GPRRegs and CP0Regs are the union names, C unions are variable type that can contain many different variables such as structs, but only actually holds one of them at a time
Yours, -Elly
__________________
-= Now watching=-
|
|
|
|
|
|
#4 (permalink) |
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Aug 2003
Location: Victorville(Near Los Angeles or LA for those who are on the DL)
Posts: 839
|
This code defines the Playstations R3000A CPU Registers. A union is used to assign one chunk of memory many different names. They're are useful in many places in low level emulation.
GPRRegs = General Purpose Registers CP0Regs = Coprocessor 0 Registers
__________________
----------------- Emu Tinkerer and C++ Programmer |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|