Shop OBEX P1 Docs P2 Docs Learn Events
Selfmade Dracblade - Need help to get started — Parallax Forums

Selfmade Dracblade - Need help to get started

bazibazi Posts: 29
edited 2010-06-12 15:06 in Propeller 1
Hi,

i've built a dracblade with a few variations. The schematic i used was Propeller_v4.sch.pdf.

Instead of VGA & TV i have only a TV out on Pins 16,17 and 18. Pin 19 has a jumper + resistor for the fourth TV-pin (aural subcarrier i think, it isn't needed).
I've tested the TV-Out and Keyboard with propdos => works fine.

I've added a 16bit SPI Port Portexpander (MC23S17) for GPIO and two Atari Joysticks [noparse]:)[/noparse]
If i try to run the Parallax Graphics Demo, nothing shows up on TV and 4 LEDs, connected to the Expander are turned on. The expander is located at Pins 20,21,22,23. The Source is modified like this:
tvparams_pins           long    %010_0101       'pins
                        long    %0001           'mode


Mode should be PAL and the source of tv.spin says this:
Somebody said...
%010: pins 23..16
Does this mean, i have to change pins? Why are there 8 pins used for tv instead of 3 or 4?

The 512K ram is connected exactly like shown in the pdf. How to i test it?
How do i run CP/M on this board?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
some say the devil is dead... ...tish army!

Post Edited (bazi) : 6/12/2010 11:41:27 AM GMT

Comments

  • pullmollpullmoll Posts: 817
    edited 2010-06-12 13:09
    bazi said...
    The 512K ram is connected exactly like shown in the pdf. How to i test it?
    How do i run CP/M on this board?

    You can use the spi_warp.spin object (attached), which allows access to the SD card and also supports the XMM of the DracBlade. You have to use BST (or BSTC) to compile this with your test code, because you have to #define DracBladeProp to include the required pieces of code. Your code can then call the methods readram, writeram and sethighaddr to access the XMM in eight banks of 64KB each.

    To run CP/M you can download the latest code from this thread. There's also a hard disk image and a boot.dsk that needs to copied to an SD card. Extract the zip and add the ./lib path to BST's compiler preferences (library search path), then compile cpm.spin to RAM (F10) or EEPROM (F11).

    HTH
    Juergen

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pullmoll's Propeller Projects

    Post Edited (pullmoll) : 6/12/2010 1:15:08 PM GMT
  • kuronekokuroneko Posts: 3,623
    edited 2010-06-12 13:28
    bazi said...
    Somebody said...
    %010: pins 23..16
    Does this mean, i have to change pins? Why are there 8 pins used for tv instead of 3 or 4?
    Pin groups always come in 8's, but as your TV pins are located at 16..18 you want something like %010_0001 (%010_xxxx indicating pin group 16..23, %xxx_0001 makes sure that pins 16..18 are active). Have a look at the end of the TV object, it explains all the relevant bit patterns. And no, you can keep your pins as they are [noparse];)[/noparse]
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-06-12 13:57
    pullmoll might be able to clarify this, but in the file cpm.spin near the bottom of the CON section is this

    #define HAVE_VGA_HIRES
    '#define HAVE_VGA_COLOUR
            vgaPin                  = 16    ' VGA pins on the DracBladeProp - 16-23
    '#define HAVE_TV
            tvPin                   = 16    ' TV pins on the DracBladeProp - 16-19; use 18 for the 1 pin TV out
    #define HAVE_LCD
    #endif DracBladeProp
    
    



    I'm guessing you need to comment out the have_vga and uncmment the have_tv?

    Atari joysticks sounds great. Do you have a schematic?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/propeller
  • bazibazi Posts: 29
    edited 2010-06-12 14:03
    They are really easy to connect:

    Atari_joy-port.jpg

    You only have to pullup 5 or 6 Input Pins (depends on how many buttons you have) and connect Joy-GND to GND and the 5 or 6 pins to the inputs.
    If an input is 0 the button is pressed or the stick is moved.

    I've got 2 competition pro, they look unused [noparse]:)[/noparse]

    competition_pro_box_front.jpg


    Take a look => http://www.epanorama.net/documents/joystick/ataristick.html

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    some say the devil is dead... ...tish army!
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-06-12 14:11
    Yikes!

    With Microswitches?!!

    Is that a standard D9 connector? If so, maybe I could make up some sort of adaptor on the new boards that are coming out that have 8 more digital inputs and outputs. I'll think about that. Now I've seen how pullmoll can add a new pseudo port with only a few lines of code, adding ports for those extra IO pins ought to be fairly easy. (for him. Not for me).

    You could potentially add two joysticks.

    Which computer emulation could use these?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/propeller
  • heaterheater Posts: 3,370
    edited 2010-06-12 14:30
    PullMoll: Couldn't help noticing that spi_warp can have its TriBlade RAM read warped a bit more by shortening its read loop from 9 instructions to 6.

    read_ram                rdlong  buf_ptr, bufAdr
                            mov     ramcount, buf_ptr
                            shr     ramcount, #16
                            and     buf_ptr, halfmask
                            mov     outx, user_idx
                            shl     outx, #8                ' shift address 8 bits
                            or      outx, ram_read          ' add -WE=1 -OE=0
    rdloop                  mov     outa, outx              ' pc (shifted 8 bits + -WE=1 -OE=0)
                            add     outx, #100              ' external ram address++
                            mov     data_8, ina             ' read SRAM
                            wrbyte  data_8, buf_ptr         ' write data_8 to hubaddr ie copy byte to hub
                            add     buf_ptr, #1             ' hub ram address++
                            djnz    ramCount, #rdloop       ' loop until done
                            mov     user_cmd, #0            ' OK
    read_ram_ret            ret
    
    



    Similarly the write loop can be shortened from 12 to 9. Have a look at VMCOG to see how.

    It's not a big deal I just happened to notice because I was hacking on TriBlade external RAM access for VMCOG.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • bazibazi Posts: 29
    edited 2010-06-12 14:43
    someone said...

    With Microswitches?!!
    Yes, heres a good photo of mine http://img231.imageshack.us/img231/1523/atarijoycompetitionpro.jpg
    someone said...

    Is that a standard D9 connector?
    Yes
    someone said...

    Which computer emulation could use these?
    Don't know but i thought about first making a pong-game on the prop with TV-out, don't know how to use it with qz80, zicog, ...
    But i think it should be easy, only 5 or 6 digital inputs. Nearly every Commodore and Atari and a lot others used this joysticks.


    Here a some photos of my worst nightmare [noparse]:D[/noparse]
    vornx.jpg
    hintenc.jpg

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    some say the devil is dead... ...tish army!
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-06-12 14:52
    That is a very nice looking board.

    At the moment, the 'game' keys are the arrow keys on a keyboard. I think spacebar is used as well.

    Just brainstorming here, but if the keyboard driver also polled an input chip like a HC240, maybe it could detect the buttons/microswitches, and convert those to keypress codes?

    Hmm - Commodore and Atari. Are those possible as emulations? pullmoll would be the expert who could answer that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/propeller
  • bazibazi Posts: 29
    edited 2010-06-12 15:06
    AFAIK the 6502 cpu (C64) is already emulated by the prop.

    A modified keyboard driver is the simplest way, i think.

    //edit:

    I think i'll add them this way:
    I have a second eeprom (64kb) on my board. This eeprom will hold configuration data and some bitmaps, texts, ...
    I'll modify the keyboard driver to poll the inputs and if a button is pressed, for example, address 0x00 is read for the correspondig keycode. If moved left, address 0x01, ......, .....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    some say the devil is dead... ...tish army!

    Post Edited (bazi) : 6/12/2010 3:12:19 PM GMT
Sign In or Register to comment.