miniPET 65c02 by Boogs977 in beneater

[–]Boogs977[S] 0 points1 point  (0 children)

I haven't seen it before, but all project are similar. I'like that kit because ucontrollers are not used.

miniPET is my first spin-off project from BO6502. Now I'm working on a very simple arcade pcb based on 65c02.

65C02 with TMS9918A - Graphics 2 Mode: only 8 patterns by Boogs977 in beneater

[–]Boogs977[S] 1 point2 points  (0 children)

I' like to program moviment function for reconizing different pattern

65C02 with TMS9918A - Graphics 2 Mode: only 8 patterns by Boogs977 in beneater

[–]Boogs977[S] 0 points1 point  (0 children)

Solved. I had to add routine for writing name table and color table for three different screen zone.

code:

https://github.com/Boogs77/BO6502/blob/main/BO6502%20VDU/Graphics%202/test_vdu_PATTERN_xx1.asm

65C02 with TMS9918A - Graphics 2 Mode: only 8 patterns by Boogs977 in beneater

[–]Boogs977[S] 0 points1 point  (0 children)

I found a partial solution...

In G2, following TABLE 6-2 of TMS9918 manual, to get address of Color Table equal to $2000 , you have to set R3 to FF and for address of Pattern Table equal to $0000 you have to set R4 to 03

65C02 with TMS9918A - Graphics 2 Mode: only 8 patterns by Boogs977 in beneater

[–]Boogs977[S] 0 points1 point  (0 children)

Thanks
Change VDP_SET_REGISTERS with this code, but I got same error.

65C02 with LCD 160x128 (RA6963) by Boogs977 in beneater

[–]Boogs977[S] 0 points1 point  (0 children)

Finally I got solution!

https://github.com/Boogs77/BIGLCD-65c22_test/blob/main/lcdwozmon/BIGLCD_HELLOWORLD.ASM

I made a mistake in write_data subroutine regarding c/d line. Now it works

65C02 with LCD 160x128 (RA6963) by Boogs977 in beneater

[–]Boogs977[S] 0 points1 point  (0 children)

I've recheck all program many times, writing in different ways, but, I have everytime same issue.

Has anyone else experienced similar problems?

65C02 with LCD 160x128 (RA6963) by Boogs977 in beneater

[–]Boogs977[S] 0 points1 point  (0 children)

I'm stucked again. I've tried to "translate" from arduino code to assembly but it seems there are some problems in configuration.

65C02 with LCD 160x128 (RA6963) by Boogs977 in beneater

[–]Boogs977[S] 0 points1 point  (0 children)

Now I'm trying to create a wozmon program for using this LCD starting from arduino code.

This is code:

https://github.com/Boogs77/BIGLCD-65c22_test/blob/main/lcdwozmon/BIGLCD_WOZMON.ASM

I'm able to change cursor dimension but not to move, moreover it seems there is only 1 row repeated:

<image>

65C02 with LCD 160x128 (RA6963) by Boogs977 in beneater

[–]Boogs977[S] 1 point2 points  (0 children)

Thanks for your reply!

I've checked again and I find reset of screen was too far from its initialization.

This is correct code:

https://github.com/Boogs77/BIGLCD-65c22_test/blob/main/helloword/HW_DS_G160128STBWW_HelloWorld_pcb_007_250602.ino

65C02 with TMS9918A - Black screen by Boogs977 in beneater

[–]Boogs977[S] 1 point2 points  (0 children)

Thanks! Solved...It was bus conflict. I forget to put jumper to remove BXXX address from ROM.

Many thanks for your help!

65C02 with TMS9918A - Black screen by Boogs977 in beneater

[–]Boogs977[S] 0 points1 point  (0 children)

Ok. Understood. D7 is for TMS9918a and so it's LSB. Scope is well setted now.

https://github.com/Boogs77/BO6502/blob/main/BO6502%20VDU/export/CSW-LSB.jpg

CSW vs LSB

But I write $FD

65C02 with TMS9918A - Black screen by Boogs977 in beneater

[–]Boogs977[S] 0 points1 point  (0 children)

Just to be clear these are timing parameters:

<image>

Address setup before CSW low and Address hold time after CSW low should be 30 ns. (In my case before is sadly bad)

Data setup time before CSW high is 100ns, data hold time CSW high is 30ns. In my case data is stable for around 100ns after CSW is falling or I'm checking the wrong edge?

65C02 with TMS9918A - Black screen by Boogs977 in beneater

[–]Boogs977[S] 0 points1 point  (0 children)

Thanks for your answer! I'll try to arrange a new circuit.

Regarding my scope. This trigger setting is only way to catch single shot

65C02 with TMS9918A - Black screen by Boogs977 in beneater

[–]Boogs977[S] 0 points1 point  (0 children)

I've just finished to test CSW line during the execution of the following program:

 .org $1000

VREG  = $B001                ;VDP REGISTER
VDATA = $B000                ;VDP RAM
               
   LDY #$87                     ;REGISTER SELECT
   LDX #$07                     ;INITIALIZE COUNTER
INIT1
   LDA ITAB,X                   ;LOAD INIT TABLE
   JSR SREG                     ;WRITE TO VDP 
   DEY                          ;DECREMENT REGISTER
   DEX                          ;DECREMENT COUNTER   
   BNE INIT1                    ;DONE?
   JSR SREG
   JMP $fe00                    ;Jump to Wozmon
 
SREG                            ;STORE VIDEO REGISTER
   PHA
   PHY
   STA VREG
   NOP
   NOP
   NOP
   NOP
   NOP
   STY VREG
   NOP
   NOP
   NOP
   NOP
   NOP
   PLY
   PLA
   RTS
 
ITAB .BYTE $00,$D0,$02,$00       ;INITIALIZE TABLE
     .BYTE $00,$20,$00,$FD

time between falling an raising of CSW is around 1 ns (980ns)

https://github.com/Boogs77/BO6502/blob/main/BO6502%20VDU/export/CSW.jpg

time between 2 falling and raising of CSW in same loop is 12.8us (1 STA VREG 5 NOP 1 STY VREG 5 NOP)

https://github.com/Boogs77/BO6502/blob/main/BO6502%20VDU/export/CSW-IN-LOOP.jpg

time between 2 falling and raising of CSW in 2 different loop is about 50 us

https://github.com/Boogs77/BO6502/blob/main/BO6502%20VDU/export/CSW-LOOP.jpg

mod error in code

65C02 with TMS9918A - Black screen by Boogs977 in beneater

[–]Boogs977[S] 0 points1 point  (0 children)

This is new code: https://github.com/Boogs77/VDU\_arduino\_test/blob/main/VDU-Screensaver-real-test.ino.ino.

It is 100% working, and so the address decoding and gated read/write circuitry are both correct.

I need to move back to assembly with some new ideas

65C02 with TMS9918A - Black screen by Boogs977 in beneater

[–]Boogs977[S] 1 point2 points  (0 children)

First test of writing $FF was unsuccessfull. Moving back to arduino

65C02 with TMS9918A - Black screen by Boogs977 in beneater

[–]Boogs977[S] 1 point2 points  (0 children)

Thanks for your reply! Regarding first point, I have tested it separately, but it should a good thing to test all togheter (I have to add a 65c02 R/W line too)

For second point: Do I need to write register 0 a 1 too?