Qui programme sur CASIO Z-1 GR ?

Ici, on fait dans le petit, le LCD qui déchire sa race, on y cause même calculatrices quand on est en manque !

Modérateur : Politburo

Avatar de l’utilisateur
Quax
Fonctionne à 75 bauds
Fonctionne à 75 bauds
Messages : 40
Inscription : 04 janv. 2007 14:02
Contact :

Message par Quax » 24 avr. 2007 14:15

Thanks for this information!

I took a closer look at the Z-1GR yesterday and I must say that disassembling the unit is no fun. :( To get to the PCB component side, I had to remove more than 20 screws. In addition, I had to solder out the buzzer and battery wires plus some flat copper shield wires. There are multiple PCBs plus an inner plastic frame leaving very little space for add-ons.
There are free solder pads for a second RAM chip (IC5). IC4 is a 28 pin 32KB chip, but the PCB seems to be prepared to hold two RAM chips in SO32 package. Here's a scanned picture from that region of the PCB:
http://homepage.mac.com/buschpilot/Stuff/PCB_mem.jpg

I found a 80L188EB13 processor on the PCB and searched for a data sheet that I found here:
http://www.datasheetarchive.com/search.php?q=80L188EB

Two things are notable: there's enough address space to manage more than 64KB and the chip seems to be a 13MHz version (?).

I searched the web and found a description of a simple memory upgrade to 256KB here (text not readable but the pictures show what needs to be done):
http://tsdoctor.ddo.jp/pokekon.htm
This requires soldering two 128K x 8bit CMOS RAM chips to the PCB (IC4 replaced).
I think that I'll do this if there's a chance to get the chips :)

Avatar de l’utilisateur
jvernet
Fonctionne à 14400 bauds
Fonctionne à 14400 bauds
Messages : 7838
Inscription : 24 mai 2002 09:57
Localisation : France 69
Contact :

Message par jvernet » 24 avr. 2007 23:14

I take some time in the train this afternoon to play with assembler and BIOS call on the Z1-GR.

I'still add no luck to understand how the LCD work....

Jerome
"l'ordinateur et l'homme sont les deux opposés les plus intégraux qui existent. L'homme est lent, peu rigoureux et très intuitif. L'ordinateur est super rapide, très rigoureux et complètement con."

Avatar de l’utilisateur
Xerxes
Fonctionne à 300 bauds
Fonctionne à 300 bauds
Messages : 291
Inscription : 02 avr. 2007 13:41
Localisation : Allemagne
Contact :

Message par Xerxes » 29 avr. 2007 09:43

@Quax:
I have disassembled the Z-1GR for overclocking, but it was no fun for me too.

I have also found a maximum possible RAM upgrade to 256KB for this unit.


@jvernet:
Currently I am too busy to analyse the LCD exactly, but I have find out that it is similar to the LCD driver of the HD61700 pockets I have analysed completely some times ago. If you are interested in how to program the LCD driver in Assembly for high speed access in principle, let me know.
Dernière édition par Xerxes le 09 mai 2007 15:04, édité 1 fois.

Avatar de l’utilisateur
jvernet
Fonctionne à 14400 bauds
Fonctionne à 14400 bauds
Messages : 7838
Inscription : 24 mai 2002 09:57
Localisation : France 69
Contact :

Message par jvernet » 29 avr. 2007 14:09

Xerxes a écrit :
@jvernet:
Currently I am too busy to analyse the LCD exactly, but I have find out that it is similar to the LCD driver of the HD61700 pockets I have analysed completely some times ago. If you are interested in how to program the LCD driver in Assembly for high speed access in principle, let me know.
Yes, I am ! I try some of the (very few) example found on the net. I didn't understand how does these work, but it look great.
I found a subroutine that copy a 0800h butes long memory zone to the LCD driver, it's cool. I made a scroll prog from it.

I really need a serial cable for my Z1, as making experiences with assembler hang often the pocket, I loose nearly every time the content of the pocket ;)
"l'ordinateur et l'homme sont les deux opposés les plus intégraux qui existent. L'homme est lent, peu rigoureux et très intuitif. L'ordinateur est super rapide, très rigoureux et complètement con."

Avatar de l’utilisateur
Quax
Fonctionne à 75 bauds
Fonctionne à 75 bauds
Messages : 40
Inscription : 04 janv. 2007 14:02
Contact :

Message par Quax » 30 avr. 2007 12:01

Xerxes a écrit : I have disassembled the Z-1GR for overclocking, but it was no fun for me too.

I have found a maximum possible RAM upgrade to 256KB for this unit.
Overclocking is definitely a good idea. Which clock speed is possible from your experience? Do you know a source for the 128kx8Bit RAM chips?
jvernet a écrit : I really need a serial cable for my Z1, as making experiences with assembler hang often the pocket, I loose nearly every time the content of the pocket ;)
I'm thinking about a (PC+Mac) USB link solution similar to that I've made for the Sharp. I hope to have a working interface through the next weeks. But first I have to procure the RAMs because I don't want to disassemble the Z-1 again :(

Avatar de l’utilisateur
Xerxes
Fonctionne à 300 bauds
Fonctionne à 300 bauds
Messages : 291
Inscription : 02 avr. 2007 13:41
Localisation : Allemagne
Contact :

Message par Xerxes » 03 mai 2007 01:16

@Quax:

Sorry, but I don't know where to get the RAM chips too.

The original frequency of the resonator is 7.36 MHz divided by 2 for the 80L188EB. A good solution may be 14.72 MHz to not have any complications with the serial communication. But at first I have to get a resonator or quartz with that frequency and disassembling the Z-1GR again. :x


@jvernet:

The LCD of the HD61700 series pockets (PB-1000, PB-2000C, AI-1000, FX-870P, VX-3, VX-4) is controlled by 1 main driver and 2 sub driver.

To access the LCD, at first you have to specify the Display Driver Control Register DD with the following structure:

Bit 7 Vdd: Switch the LCD on (1) or off (0)
Bit 6 clock: Syncronisation with HD61700 CPU
Bit 5 ?
Bit 4 CE4: Sub driver 4 (not used)
Bit 3 CE3: Sub driver 3 (not used)
Bit 2 CE2: Sub driver 2 (right half of LCD)
Bit 1 CE1: Sub driver 1 (left half of LCD)
Bit 0 OP: Operation Control (1=Command or 0=Data)


The next step is to send a command to the LCD driver with the following structure:

Bit 5-7: Nexus of sended data (B) and previous LCD contents (A)

000 = inv(A) and B
001 = A xor B
010 = 0
011 = A and inv(B)
100 = B
101 = A or B
110 = 0
111 = A

Bit 4: Access to sub driver 1 (0) or sub driver 2 (1)

Bit 0-3: Command

0 = not used
1 = graphic input (read the LCD contents)
2 = graphic output
3 = ASCII output
4 = LCD on/off
5 = not used
6 = ? (used by power on routine)
7 = not used
8 = width of ASCII output and scroll control
9 = ? (used by power on routine)
A = ? (used by power on routine)
B = ? (used by power on routine)
C = Contrast Control
D = LCD Pulse Frequency (connected to ON-Interrupt of HD61700)
E = not used
F = not used


For output commands it is necessary to specify the output position with two bytes:

Image

First byte for the horizontal position:

Pixel 0..47 = &H00..&H5E (even values only) driver 1
Pixel 48..95 = &H80..&HDE (even values only) driver 1
Pixel 96..143 = &H00..&H5E (even values only) driver 2
Pixel 144..191 = &H80..&HDE (even values only) driver 2

Second byte for the vertical position:

Row 1 = 0
Row 2 = 1
Row 3 = 2
Row 4 = 3


Now an example: You want to program a game with fast output to the right half of the LCD.

Code : Tout sélectionner

var disp_buffer:array[0..383] of byte;

...
     PRE   IX,>disp_buffer ; Index Register IX points to disp_buffer
     LD    $0,48           ; 48 repetitions needed to send the 384 bytes
     LD    $1,&H92         ; &H92 = graphic output to the right half of LCD
     LD    $2,#0           ; horizontal position
     LD    $3,#0           ; vertical position
     PCB   &HFF            ; DD register command announce
     OCBL  $1,L3           ; send contents of main registers $1-$3 as command to LCD
     PCB   &HFE            ; DD register data announce
@00: LDIL  $1,(IX+#0),L8   ; read 8 bytes from disp_buffer to main registers $1-$8
     OCBL  $1,L8           ; send contents of main registers $1-$8 to LCD as graphical data
     SB    $0,#1           ; decrement for loop
     JR    NZ,@00          ; loop jump
...

This is the fastest way for accessing the LCD. Interesting is, that the HD61700 has instructions to operate with byte, word and multibyte (3 to 8 byte) for much faster execution.

I hope this helps you for a better understanding of LCD programming.

Avatar de l’utilisateur
Pocket
Administrateur
Administrateur
Messages : 5813
Inscription : 24 mai 2002 16:55
Localisation : Toulouse
Contact :

Message par Pocket » 03 mai 2007 09:26

Hello,

You can buy 128 Kb static memory from electronic seller like Farnell, RadioSpare, ...

Regards,
Pocket, voit tout, sait tout, lit l'avenir dans les entrailles d'une base phpBB ...
Image

Avatar de l’utilisateur
Quax
Fonctionne à 75 bauds
Fonctionne à 75 bauds
Messages : 40
Inscription : 04 janv. 2007 14:02
Contact :

Message par Quax » 03 mai 2007 09:37

I have ordered the RAM chips at rsonline.de. They also have 14.74 MHz resonators (though not exactly the same SMD package).

Avatar de l’utilisateur
Quax
Fonctionne à 75 bauds
Fonctionne à 75 bauds
Messages : 40
Inscription : 04 janv. 2007 14:02
Contact :

Message par Quax » 21 mai 2007 20:50

Hi!

I have extended my Z-1GR to 256KB on-board memory. The first attempt lead into failure and I thought that I completely wrecked the machine. The main problem was removing the on-board 32 KB RAM chip in a non-destructive way. I have learned my lesson when trying this. It's just a matter of using the right tools and generally being not too destructive ;-)
Finally, I got the machine boot up today. I think that I'll put my experiences on the web.

The next step is to upgrade the Sharp PC-G850V to 64KB RAM. I'm quite sure that this is an easy hack :D

Regarding the Casio USB link: I have ordered some 2,5mm stereo jack connectors but they seem to be not the right size (in length) so I'll see to get another type that fits.
Does anybody know if the Casio takes normal or inverted CMOS RS-232 levels?

Quax

Avatar de l’utilisateur
Xerxes
Fonctionne à 300 bauds
Fonctionne à 300 bauds
Messages : 291
Inscription : 02 avr. 2007 13:41
Localisation : Allemagne
Contact :

Message par Xerxes » 21 mai 2007 22:19

Hi Quax,

well done and with your experience of the Z-1GR, for sure its almost easy to upgrade the PC-G850V as I have seen it opened on your site. :wink:

Avatar de l’utilisateur
Quax
Fonctionne à 75 bauds
Fonctionne à 75 bauds
Messages : 40
Inscription : 04 janv. 2007 14:02
Contact :

Message par Quax » 06 juin 2007 20:03

Yes, the easiest way is a 32KB upgrade as there's a CERAM 2 pin (available through the bus interface) that could be used for chip selection. Another idea is to chip-stack a 128KB RAM (SOJ32) to the ROM. Then the question is how to choose between the banks, there must be some chip select logic. I have to think about this...
Any ideas welcome.

By the way: I have a working USB interface solution for the Z-1GR (and maybe other compatible computers) with 5V TTL levels and Mac/Win driver support. :D
Is there a special Casio link software for data exchange?

Avatar de l’utilisateur
jvernet
Fonctionne à 14400 bauds
Fonctionne à 14400 bauds
Messages : 7838
Inscription : 24 mai 2002 09:57
Localisation : France 69
Contact :

Message par jvernet » 05 janv. 2008 19:42

Quax a écrit :
By the way: I have a working USB interface solution for the Z-1GR (and maybe other compatible computers) with 5V TTL levels and Mac/Win driver support. :D
Is there a special Casio link software for data exchange?
Any news from this cable ? Can you sell it ?
"l'ordinateur et l'homme sont les deux opposés les plus intégraux qui existent. L'homme est lent, peu rigoureux et très intuitif. L'ordinateur est super rapide, très rigoureux et complètement con."

Répondre

Revenir vers « Tous les Pockets »