Project

General

Profile

Actions

Feature #78

closed

Get chameleon v2 working

Added by foft over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
03/05/2019
Due date:
% Done:

0%

Estimated time:

Description

Get the chameleon v2 board up and running.


Files

EN25QH128A(2T).pdf (2.2 MB) EN25QH128A(2T).pdf foft, 05/14/2019 09:12 PM
Actions #1

Updated by foft over 5 years ago

we have sync...
zpu is running, tested with a display of toggling background
sdram is failing with 180 degrees

Actions #2

Updated by foft over 5 years ago

sdram test passes with 270 degrees! Still no boot though, will resume testing tomorrow.

Actions #3

Updated by foft over 5 years ago

Fiddled with sd card... blue screen and cassette boot beep. Hmmm.

Actions #4

Updated by foft over 5 years ago

Seems I need to remove/re-insert the sdcard to boot. PS2 doesn't seem to work, so no menu. Perhaps that is why I get the beep (consol stuck??)

Actions #5

Updated by foft over 5 years ago

consol is stuck because of the c64 keys supplied by chameleon 2 io. Tracking down why that is stuck, it has 3 sources: ir, docking or c64 itself

Actions #6

Updated by foft over 5 years ago

Stuck keys were because the remote is not part of chameleon io, I hadn't removed the external signals and they were defaulting to the wrong state. Removed them now and typing in basic.

Actions #7

Updated by foft over 5 years ago

Adding the chameleon_2 shiftreg component fixed up the ps2 keyboard sometimes not working. Also plumbed the sio tx to the red led.

Actions #8

Updated by foft over 5 years ago

Main things to fix:
i) Joystick resetting system!
ii) sd card fiddling needed on first boot

Actions #9

Updated by foft over 5 years ago

Fixed issue (i)

Actions #10

Updated by foft over 5 years ago

Running NUMEN as a little test ;-)

Actions #11

Updated by foft over 5 years ago

Different sd card worked, think its a card re-initialization issue...

Actions #12

Updated by foft over 5 years ago

Haha, this was a known issue on the old version of the chameleon (in many cores) and this one too...

Actions #13

Updated by foft over 5 years ago

Trying to get the ir remote working, should 'just work' since its enabled in chameleon io2 but ... it doesn't

Actions #14

Updated by foft over 5 years ago

Weird thing in chameleon_cdtv_remote, the timer counts when ena_1mhz is high AND halfway between. So is running at 2x the expected rate. Its not clear why.

Actions #15

Updated by foft over 5 years ago

Still don't understand what the logic analyzer tells me, I'm guessing its an optimization since the hdl is pretty high level.

In any case solved the actual issue by adding a synchronizer on ir_data. Working just fine now.

Actions #16

Updated by foft over 5 years ago

Added back the 'return to menu'

Actions #17

Updated by foft over 5 years ago

Now trying to plumb in eclaire firmware 'properly'. e.g. settings/os load/save, video settings, 800 mode etc. Got it running as far as menus/drive emulation. Had a bit of difficulty at first because I was doing some binary editing to add version, and removing some characters from the binary by mistake!!

Actions #18

Updated by foft over 5 years ago

Testing video mode setting (only basic stuff, rgb/vga, no pll reprogramming) and looking ok.
Tested 3rd/4th joysticks in atari800 mode. Got them working but had to change/fix a few small things.
Want to try out flash chip next...

Actions #19

Updated by foft over 5 years ago

I have a 1MB slot. The core itself takes about 350KB compressed. So lets say we have 1/2 MB conservatively to store roms etc. The standard eclaire settings saving takes 192KB.
I guess I can also allow the rpd flashing support.

So... need to plumb in correct slot address, wire up flash pins and re-enable code in firmware (+update commands?).

Actions #20

Updated by foft over 5 years ago

+ 3 byte header with binary length (when flashing rpd)

Actions #21

Updated by foft over 5 years ago

I can't see which flash chip is used, guess I'll just wire it up and try reading the id!

Actions #22

Updated by foft over 5 years ago

1c7018, which is...
EN25QH128A
datasheet attached
So, 64k blocks (erase by d8 as currently used, sector also possible)
Should just work, once I change the addresses.

Actions #23

Updated by foft over 5 years ago

I should be passed the slot by the microcontroller, but since I'm using sof at the moment that clearly isn't working. The firmware is currently hardcoded to 0x200000. Which is slot 2 (but wrong half of it!). Will just give that a spin to test.

Actions #24

Updated by foft over 5 years ago

OK, that works

Actions #25

Updated by foft over 5 years ago

Picked up the slot from the micro. Computed the location of the rom. I added 256kb of blank space first to aligned to a block (this board has 64kb but some might be 256kb...). Now loading and saving is working well.

Docs on the chameleon structure of the rom are here:
https://svn.icomp.de/svn/chaco/doc/Chameleon_USB.pdf
Its a bit misleading on the core info location, since it says it starts at 3+N, while really 3+N is the end+1 of coreinfo. It describes it right after though but I didn't read that well!

So now its running pretty well. I'd like to get hotkeys working and I took a shortcut on eclaire and used the usb ones directly. So I need to plumb the ps2 keys into that logic. After which I think its 'ready'.

Actions #26

Updated by foft over 5 years ago

Of course one more important step: try it in a C64!

Actions #27

Updated by foft over 5 years ago

Did the keyboard plumbing. Seems to work - okish. Though can save some bytes by doing this part in vhdl I think, so might do that.

Actions #28

Updated by foft over 5 years ago

Tried it in the c64. Keyboard works, but only sometimes! Need to work out why.

Actions #29

Updated by foft over 5 years ago

Getting some weird behaviour tonight - cores not starting etc. Unclear what the issue is...

Actions #30

Updated by foft over 5 years ago

Now behaving again, think Chaco had got confused and was doing weird stuff.

Actions #31

Updated by foft over 5 years ago

Re c64 keyboard, the state machine reading it appears to get stuck and just reads DC01 repeatedly??

Actions #32

Updated by foft over 5 years ago

Got a state capture when its working, goes through states as normal.

When it stops, no states are active!

Actions #33

Updated by foft over 5 years ago

I wonder if ba needs a synchronizer or something like that?

Actions #34

Updated by foft over 5 years ago

Well added a synchronizer on ba and also added a when others clause to put it back into a proper state.

Should probably discuss with Peter to see if there is a better fix.

Actions #35

Updated by foft over 5 years ago

  • Status changed from New to Closed

Chameleon 2 is working pretty well.

Moving onto Chameleon 1 backport then will check all other cores work...

Actions

Also available in: Atom PDF