Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - SimonLothar

Pages: 1 ... 5 6 [7] 8 9
91
Casio Calculators / Re: Casio Prizm documentation
« on: April 08, 2011, 04:17:01 am »
Another hint for expanded customization is the presence of at least two new processor instructions 0x00AB and 0x0nE3 (n=register-no.), which are not documented.
0x00AB and 0x0nE3 are new indeed, but not customized. Since the Prizm processor revealed, that it is a member of the SH-4A family, I had a closer look at the 7780 manual.
0x00AB is SYNCO (new with the 7780)
0x0nE3 is ICBI @Rn (new with the 7780)

BTW.: the SH-4A members are specified to run between 160 MHz and 600 MHz, depending on the processor type.
The SH-4 members are specified to run up to 240 MHz.
The SH-3 members are specified to run up to 200 MHz.
(http://www.renesas.eu/products/mpumcu/superh/superh_landing.jsp)

92
Casio Calculators / Re: Casio Prizm documentation
« on: April 07, 2011, 11:26:13 am »
The processor version register 0xFF000030 of the Prizm returns 0x10300B00.
According to the 7450/7451 hardware manual, appendix D, a CHIP-version code "is always "H'10" in the SH-4A".
The major version byte (VER) is 0x30.
The minor version byte (CUT) is 0x0B.
The product version register 0xFF000044 of the Prizm returns 0x00002C00.
Hence the Prizm processor seems to be a member of the SH-4A family, at least basically.
Another interesting thing is, that the major version byte is higher than on a 7780,
which major version byte is 0x20, according to the manuals.

93
Casio Calculators / Re: Casio Prizm documentation
« on: April 07, 2011, 04:07:20 am »
...The DMAC-address for this operation is 0xFE008020 (channel 0). The address of DMAOR is 0xFE008060...Every single register-address involved in accessing the display does not occur in the 7705- or 7720-lists...
I just noticed that the DMAC-address of the Prizm belongs to the 7730. I would not be surprised, if it turnes out, that parts of the Cyberdyne Systems Model 101 Series 800 have been used, too.

94
Casio Calculators / Re: Compiling stuff for Prizm
« on: April 04, 2011, 11:44:09 am »
For me as an asm coder it is important to know this because I can't rely on C routines.
ASM and C/C++ are both important tools, if you want to program the Prizm (as well as the fx-9860 series). I daresay it is not possible to avoid either of them. Of course you have to decide carefully, which of both is the appropriate tool in a certain situation. Though, mostly it will be C. Anyhow the next version of the miniSDK will accept assembler-source-modules as well.

What I think we need is a long explanation of how insight exactly works
INSIGHT is a C-program. Therefore a pre-condition to understand INSIGHT is the knowledge of C. I am sorry not to have a better message. But myhap it is not this bad, if you should decide to learn C.

and syscalls. An explanation from the ground up would be very helpful
I tried to explain the use of syscalls from out of assembler here:
http://ourl.ca/8207/178619

...Last time I checked the VRAM-DMAC was still undocumented.
I documented the VRAM-DMAC-syscalls 0x025F and 0x0260 the first time in the HTMLHELP-file of miniSDK version 1.03.



95
Casio Calculators / Re: Compiling stuff for Prizm
« on: April 03, 2011, 11:03:17 am »
miniSDK (version 1.04).
New with version 1.04: SDK equipped with a GUI, to configure the projects more conveniently. The documentation of which resides in the included HTMLHELP-file (fx_calculators_SuperH_based.chm; search for "SDK, getting started"); two new functions in INSIGHT to demonstrate the speed difference between direct draw and VRAM-DMAC.

EDIT:
Attachment removed.
New version: http://ourl.ca/9205/201161

96
Casio Calculators / Re: Prizm Getkey
« on: March 25, 2011, 06:57:45 am »
I don't know how I missed the capitalized text saying "RENESAS 730501" and "RENESAS 735501" in the OS.
The 7355 is the 7705 hybrid of the 9860GII-series
The 7337 is the 7705 hybrid of the 9860G-series
The string "RENESAS 735501" in the Prizm OS is debris from legacy GII-OSes.
Obviously they used some parts of the legacy source (of course  :)).

97
Casio Calculators / Re: Prizm Getkey
« on: March 25, 2011, 06:01:08 am »
...what is great about the SH3 is that the keyboard is memory mapped. How that works is that there are 10 bytes representing the state of the keyboard starting at 0xA44B0000...
The 0xA44B0000 register set is not a standard feature of the SH3-group. If you program another SH3-based machine, you won't find the set. It is a special feature of the Prizm. The Prizm MPU is a 7705/7720/XXXX hybrid (the OS identifies the MPU as 7305, which is CASIO customized, t. i. a lot of registers are not documented).

http://ourl.ca/8207/178228

98
Casio Calculators / Re: Compiling stuff for Prizm
« on: March 21, 2011, 05:07:42 pm »
I totally like the display routine!
So? Then if you like it crowded, try this...

@DJ_O: it is C, not assembler!
If something has been wrong with this post, I'd like to apologize.
English is not my mother tongue, so perhaps the post sounded rude or impolite.
Never meant to be.

99
Casio Calculators / Re: Compiling stuff for Prizm
« on: March 21, 2011, 10:58:50 am »
I totally like the display routine!
So? Then if you like it crowded, try this...

@DJ_O: it is C, not assembler!

Code: [Select]
static unsigned int lastrandom=0x12345678;
unsigned short random( int seed = 0 ){
    if (seed) lastrandom=seed;
    lastrandom = ( 0x41C64E6D*lastrandom ) + 0x3039;
    return ( lastrandom >> 16 );
}

#define NSHAPES 100

//
int MoveOne( TBdispFillArea a[], TShapeProps sp[], int idx ){
int vy1, vy2, j, k;
int xoverlap, yoverlap, overlap;
int xd, yd;
a[idx].x1 += sp[idx].dx;
if ( a[idx].x1 >= 384 - sp[idx].wx){
sp[idx].dx = -sp[idx].dx;
a[idx].x1 += sp[idx].dx;
sp[idx].dx = -1;  // cold wall
return 0;
}
if ( a[idx].x1 <= 1){
sp[idx].dx = -sp[idx].dx;
a[idx].x1 += sp[idx].dx;
sp[idx].dx = 3; // hot wall
return 0;
}
for (j=0;j<NSHAPES;j++){
overlap = 0;
if ( j != idx ){
xd = a[idx].x1 - a[j].x1;
yd = a[idx].y1 - a[j].y1;
if ( xd * xd + yd * yd < 100 ) overlap = 1;
if ( overlap ) break;
}
}
if ( overlap ){
sp[idx].dx = -sp[idx].dx;
a[idx].x1 += sp[idx].dx;
k = sp[idx].dx;
sp[idx].dx = sp[j].dx;
sp[j].dx = -k;
return 0;
}

a[idx].y1 += sp[idx].dy;
if ( a[idx].y1 >= 216 - sp[idx].wy){
sp[idx].dy = -sp[idx].dy;
a[idx].y1 += sp[idx].dy;
return 0;
}
if ( a[idx].y1 <= 1){
sp[idx].dy = -sp[idx].dy;
a[idx].y1 += sp[idx].dy;
return 0;
}
for (j=0;j<NSHAPES;j++){
overlap = 0;
if ( j != idx ){
xd = a[idx].x1 - a[j].x1;
yd = a[idx].y1 - a[j].y1;
if ( xd * xd + yd * yd < 100 ) overlap = 1;
if ( overlap ) break;
}
}
if ( overlap ){
sp[idx].dy = -sp[idx].dy;
a[idx].y1 += sp[idx].dy;
k = sp[idx].dy;
sp[idx].dy = sp[j].dy;
sp[j].dy = -k;
return 0;
}

k = 0;
if (sp[idx].dy<0) k -= sp[idx].dy; else k += sp[idx].dy;
if (sp[idx].dx<0) k -= sp[idx].dx; else k += sp[idx].dx;
switch (k){
case 2 : sp[idx].color = 0x001F ; break;
case 3 : sp[idx].color = 0x03FF ; break;
case 4 : sp[idx].color = 0x07E0 ; break;
case 5 : sp[idx].color = 0xFFC0 ; break;
case 6 : sp[idx].color = 0xF800 ; break;
}

a[idx].mode = 0;
Bdisp_AreaClr( &sp[idx].saved, 1, -1 );
a[idx].mode = 1;

a[idx].x2 = a[idx].x1 + sp[idx].wx;
a[idx].y2 = a[idx].y1 + sp[idx].wy;
Bdisp_AreaClr( &a[idx], 1, sp[idx].color );
memcpy( &sp[idx].saved, &a[idx], sizeof( TBdispFillArea ) );

/*
vy1 = a[idx].y1 - sp[idx].wy / 2;
vy2 = a[idx].y2 + sp[idx].wy / 2;
if ( vy1 < 0 ) vy1 = 0;
if ( vy2 > 215 ) vy2 = 215;
Bdisp_PutDisp_DD_stripe( vy1, vy2 );
*/
return 1;

}

#define V 1

void F7_Handler(){
TBdispFillArea ar[NSHAPES];
TShapeProps mp[NSHAPES];
int ticks, i, iwork;
ticks = RTC_GetTicks();
random( ticks );
while (!RTC_Elapsed_ms( ticks, 100 ));

for ( i=0;i<NSHAPES;i++){
ar[i]. mode = 1;
memset( &mp[i], 0, sizeof( TShapeProps ) );
mp[i].wx = 10;
mp[i].wy = 10;
ar[i].x1 = 11 * ((i >> 2)+1);
mp[i].color = random();
ar[i].y1 = 10 + 11 * ( i & 0x3 );

iwork = random();
iwork = ( 3 * iwork ) / 0x10000 + 1;
if ( random() & 0x8000 ) iwork = -iwork;
mp[i].dx = iwork;
iwork = random();
iwork = ( 3 * iwork ) / 0x10000 + 1;
if ( random() & 0x8000 ) iwork = -iwork;
mp[i].dy = iwork;

ar[i].x2 = ar[i].x1 + mp[i].wx;
ar[i].y2 = ar[i].y1 + mp[i].wy;
}
while ( !(*(unsigned short*)0xA44B0000) ){
for (i=0;i<NSHAPES;i++){
MoveOne( ar, mp, i );
}
   Bdisp_PutDisp_DD();
}
}

Attachment removed. Actual version included here:
http://ourl.ca/9205/218371

100
Casio Calculators / Re: Compiling stuff for Prizm
« on: March 20, 2011, 09:45:40 am »
Insight version 1.03:
a little display demo: moving and bouncing objects; a HTMLHELP-file with some information concerning syscalls of fx-9860- and fx-CG-systems (to be continued).

EDIT: ah, yes. @cfxm: and a new pair of my cute icons, which everyone loves. ;D

EDIT(2011-04-03):
Updated: http://ourl.ca/9205/193577
version 1.03 removed

101
Casio Calculators / Re: Casio Prizm documentation
« on: March 12, 2011, 05:29:23 am »
How do you think the cache works with it, though?
I think the cache has to be flushed before DMA (direct memory access) occurs. Perhaps it is done automatically by the DMA request or by setting/toggling certain bits of the registers involved. As these registers are undocumented, this is not easy to verify (at least for me).

EDIT: I forgot to mention. VRAM usually is accessed using base address 0xA8000000, which lies within area P2, a non-cacheable memory range. Caching could be a problem, if you access VRAM using base-address 0x88000000.

102
Casio Calculators / Re: Casio Prizm documentation
« on: March 12, 2011, 12:57:40 am »
You mean that they put hardware support in for the screen?  O.O
Seems like overkill to me.
The amount of data to transfer when copying the complete VRAM to the display is 162 times greater than on a fx-9860. DMA seems to be reasonable.

103
Casio Calculators / Re: Casio Prizm documentation
« on: March 11, 2011, 06:44:47 pm »
Direct display access

syscall 0x026B (void Bdisp_SetPoint_DD( int x, int y, unsigned short color )) writes a point directly to the display.

BTW: syscall 0x025F Bdisp_PutDisp_DD() transfers the data from VRAM to display-RAM via DMA. The DMAC-address for this operation is 0xFE008020 (channel 0). The address of DMAOR is 0xFE008060. The DMAC functions seem to be similar, if not identical compared to those of the 7705's DMAC (0xA4000020) or the 7720's DMAC (0xA4010020). The base address of the displaydriver is 0xB4000000, which does not mean, that this address can be simply used to write directly to the display! The special (undocumented) processor instruction 0x00AB seems to be kind of ping, after something has been written to a DD-related register, perhaps to sync the MPU/DD-interaction. The correspnding DMA-source register (DMARSx) is difficult to identify. At least 0xA4050130 and 0xA405013C are involved.
Every single register-address involved in accessing the display does not occur in the 7705- or 7720-lists.


104
Casio Calculators / Re: Compiling stuff for Prizm
« on: March 07, 2011, 11:45:59 am »
Insight version 1.02:
RTC read and set; battery voltage; new syscalls; a new library fxCG_TOOLS.LIB; 256 color bitmap to fxCG icon converter; memory search; memory backup.

Outdated: update here http://ourl.ca/9205/187104

105
Casio Calculators / Re: The Hacker's toolkit
« on: March 04, 2011, 07:13:22 pm »
I recommend to use links to where the miniSDK has been uploaded the first time. It is only a few days old and it will be changed frequently. Especially the syscall-library and insight will be subject to changes. Distributing copies will possibly hamper the revision management.

Pages: 1 ... 5 6 [7] 8 9