Problem with GLCD T6963c

Hello,
I have an Teensy ++ 2.0 and an GLCD display with T6963c. When I made de PCB I used “non standard” ports for display.
The ports ar asigned to teensy like that

Pin DISPLAY TEENSY
1
2
3
4
5 WR C7
6 RD C6
7 CE C5
8 C/D C4
9 RST
10 DB0 C3
11 DB1 C2
12 DB2 C1
13 DB3 C0
14 DB4 E0
15 DB5 E1
16 DB6 D7
17 DB7 D6
18
19
20

Now the problem is to make the entire board to work. In source code I find somethink like that

// data port other Arduino
#define GLCD_DATA_PORT1 PORTD
#define GLCD_DATA_PIN1 PIND //Arduino Pins 2-7
#define GLCD_DATA_DDR1 DDRD
#define GLCD_DATA_SHIFT1 <<2
#define GLCD_DATA_RSHIFT1 >>2
#define GLCD_DATA_MASK1 0xFC

#define GLCD_DATA_PORT2 PORTB
#define GLCD_DATA_PIN2 PINB //Arduino Pins 8,9
#define GLCD_DATA_DDR2 DDRB
#define GLCD_DATA_SHIFT2 >>6
#define GLCD_DATA_RSHIFT2 <<6
#define GLCD_DATA_MASK2 0x03
// control port
#define GLCD_CTRL_PORT PORTC
#define GLCD_CTRL_PIN PINC
#define GLCD_CTRL_DDR DDRC

endif

// control signals
#define GLCD_WR 0
#define GLCD_RD 1
#define GLCD_CE 2 //Should be able to XNOR this with WR and RD
#define GLCD_CD 3
//#define GLCD_RESET 4 //For some reason my LCD works with this pin resistored to +5
//#define GLCD_FS 5 //Use hardware solution not pin.

I question is who to make changes to work to me with my hardware configuration.

Thank you

That's really not the source code. Those are some defines and macros probably from a header file.
Since your pin mappings are so different, you will probably have to modify the actual source code.

If you want maximum speed, then I'd suggest that you hook the 8 data lines to the 8 output pins of a single port.
You are already using all the pins on PORTC why not use those pins for the GLCD data port?
i.e. use all the same pins but use C0 to C7 on GLCD DB0 to DB7

Not only will you get a substantial performance gain by doing this since it will allow setting all 8 pins at once using a single port write, but it will more than likely simplify the code as well. The way you have it now, you will have to do 8 individual digitalWrite() operations.
The good thing is that at least with the Teensy boards. digitalWrite() operations when the data and pin is known at compile time will create port write operations so it will be MUCH faster than say on UNO.

More than likely you will have to go modify the actual source code, unless there are some other wrapper macros being used that can be modified.

Either way, the changes will be similar. If the code is fairly well structured, the changes should be fairly minimal and isolated to a few routines.

--- bill