Author Topic: Building Phantom Hardware and Firmware Mods  (Read 179514 times)

0 Members and 2 Guests are viewing this topic.

Offline hasu

  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Building Phantom Hardware and Firmware Mods
« Reply #350 on: Mon, 25 February 2013, 01:59:02 »
Thanks, I'll merge that patch later.

Offline Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Re: Building Phantom Hardware and Firmware Mods
« Reply #351 on: Fri, 01 March 2013, 00:25:39 »
Hey guys love all the great work that has been done with this Phantom keyboard.

However, I want to change it and have a few questions.  First off based off reading a couple of the previous posts it sounds like I can't put media keys on the top layer.  I was hoping to put media keys in the insert cluster where insert and such are.  Am I reading this right? 

I finally figured out how to get to the keymap.c file and pulled it up in the winavr programmers notepad.  So if I want to change the layout all I have to is change what it says for the key on the layout and then in the matrix right below the layout correct?  Also what should I put for no key in the layout and in the matrix below?  What I want to do with that is move the "F" keys to the number keys as a function layer because I will be physically removing the switches from the board.

So this leads into my next question.  How do I specify the bottom key map to be my function layer and I would assume that any keys that are not changed in the Function layer would remain the same.  In the layout and the matrix lines would i just put FN in for the function key?  I am wanting to do the function as a momentary only and not a toggle.

I apologize in advance if these seem like newbie questions but this is the most in depth I have gone into electronics and programming stuff.  The extent of my hardware experience is remove and replace parts inside my computer, and writing a couple very simple programs for my TI-86 back in high school almost 15 years ago.  Any help in this matter would be appreciated.

Melvang
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich

Offline hasu

  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Building Phantom Hardware and Firmware Mods
« Reply #352 on: Fri, 01 March 2013, 05:52:40 »
You can put media keys on any layer.
I'm not sure about other questions. If you need more help you can post your keymap.

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
Re: Building Phantom Hardware and Firmware Mods
« Reply #353 on: Fri, 01 March 2013, 08:38:30 »
However, I want to change it and have a few questions.  First off based off reading a couple of the previous posts it sounds like I can't put media keys on the top layer.  I was hoping to put media keys in the insert cluster where insert and such are.  Am I reading this right?   As hasu mentioned, that should be no problem.

I finally figured out how to get to the keymap.c file and pulled it up in the winavr programmers notepad.  So if I want to change the layout all I have to is change what it says for the key on the layout and then in the matrix right below the layout correct?  The only place that counts is in the matrix, the comment block is just for reference.

Also what should I put for no key in the layout and in the matrix below?  NO  (literally that)

What I want to do with that is move the "F" keys to the number keys as a function layer because I will be physically removing the switches from the board.

So this leads into my next question.  How do I specify the bottom key map to be my function layer and I would assume that any keys that are not changed in the Function layer would remain the same.  In the layout and the matrix lines would i just put FN in for the function key?  As long as the fn_layer array is unchanged you use FN1 to get to layer 1.  Also place FN1 in the same location in both layers.  The new layer assignments are as listed, if you only want a few things to change, duplicate layer 0 to layer 1 then make your changes.

I am wanting to do the function as a momentary only and not a toggle.  That is how it works.
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Re: Building Phantom Hardware and Firmware Mods
« Reply #354 on: Fri, 01 March 2013, 09:04:56 »
Alaricljs

Thanx for the info will get started on changing this stuff around and get it posted here so you guys can laugh at how bad I am probably about to screw this thing up.  Not really tweaking a whole lot just moving a couple things around


Edit: adding code for you guys to check it out for evaluation

Code: [Select]
Copyright 2011 Jun Wako <wakojun@gmail.com>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

/*
 * Keymap for Phantom controller
 */
#include <stdint.h>
#include <stdbool.h>
#include <avr/pgmspace.h>
#include "keycode.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "keymap.h"


// Convert physical keyboard layout to matrix array.
// This is a macro to define keymap easily in keyboard layout form.
#define KEYMAP( \
    K5A, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N,           K5O, K5P, K5Q, \
    K5B, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4N,      K4O, K4P, K4Q, \
    K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N,      K3O, K3P, K3Q, \
    K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2N,           K2O, K2P, K2Q, \
    K1A,      K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1N,           K1O, K1P, K1Q, \
    K0A, K0B, K0C,           K0H,                     K0K, K0L, K0M, K0N,      K0O, K0P, K0Q  \
) { \
/*             A         B         C         D         E         F         G         H         I         J         K         L          M        N          O         P         Q    */  \
/* 0 */   { KC_##K0A, KC_##K0B, KC_##K0C, KC_NO   , KC_NO   , KC_NO   , KC_NO   , KC_##K0H, KC_NO   , KC_NO   , KC_##K0K, KC_##K0L, KC_##K0M, KC_##K0N, KC_##K0O, KC_##K0P, KC_##K0Q}, \
/* 1 */   { KC_##K1A, KC_NO   , KC_##K1C, KC_##K1D, KC_##K1E, KC_##K1F, KC_##K1G, KC_##K1H, KC_##K1I, KC_##K1J, KC_##K1K, KC_##K1L, KC_NO   , KC_##K1N, KC_##K1O, KC_##K1P, KC_##K1Q}, \
/* 2 */   { KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E, KC_##K2F, KC_##K2G, KC_##K2H, KC_##K2I, KC_##K2J, KC_##K2K, KC_##K2L, KC_NO   , KC_##K2N, KC_##K2O, KC_##K2P, KC_##K2Q}, \
/* 3 */   { KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F, KC_##K3G, KC_##K3H, KC_##K3I, KC_##K3J, KC_##K3K, KC_##K3L, KC_##K3M, KC_##K3N, KC_##K3O, KC_##K3P, KC_##K3Q}, \
/* 4 */   { KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_##K4F, KC_##K4G, KC_##K4H, KC_##K4I, KC_##K4J, KC_##K4K, KC_##K4L, KC_NO   , KC_##K4N, KC_##K4O, KC_##K4P, KC_##K4Q}, \
/* 5 */   { KC_##K5A, KC_##K5B, KC_##K5C, KC_##K5D, KC_##K5E, KC_##K5F, KC_##K5G, KC_##K5H, KC_##K5I, KC_##K5J, KC_##K5K, KC_##K5L, KC_##K5M, KC_##K5N, KC_##K5O, KC_##K5P, KC_##K5Q}, \
}

#define KEYCODE(layer, row, col) (pgm_read_byte(&keymaps[(layer)][(row)][(col)]))


// Assign Fn key(0-7) to a layer to which switch with the Fn key pressed.
static const uint8_t PROGMEM fn_layer[] = {
    0,              // Fn0
    1,              // Fn1
    2,              // Fn2
    3,              // Fn3
    4,              // Fn4
    5,              // Fn5
    6,              // Fn6
    7               // Fn7
};

// Assign Fn key(0-7) to a keycode sent when release Fn key without use of the layer.
// See layer.c for details.
static const uint8_t PROGMEM fn_keycode[] = {
    KC_NO,          // Fn0
    KC_NO,          // Fn1
    KC_NO,          // Fn2
    KC_NO,          // Fn3
    KC_NO,          // Fn4
    KC_NO,          // Fn5
    KC_NO,          // Fn6
    KC_NO           // Fn7
};

/*
 * Phantom keyboard layout with winkeys and 7bit style editing block. I am
 * Not in the mood to implement full 7-bit keymap.
 *
 *
 * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
 * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
 * `---'   `---------------' `---------------' `---------------' `-----------'
 * ,-----------------------------------------------------------. ,-----------.
 * |~  |  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backsp | |Ins|Hom|PgU|
 * |-----------------------------------------------------------| |-----------|
 * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |Del|End|PgD|
 * |-----------------------------------------------------------| |---|---|---|
 * |Caps  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  | |???|???|???|
 * |-----------------------------------------------------------| |---|---|---|
 * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift     | |???|Up |???|
 * |-----------------------------------------------------------| |-----------|
 * |Ctl|Gui|Alt|          Space                |Alt|Gui|App|Ctl| |Lef|Dow|Rig|
 * `-----------------------------------------------------------' `-----------'
 */


static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Layer 0: Default Layer
 *
 * ANSI:
 *
 * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
 * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
 * `---'   `---------------' `---------------' `---------------' `-----------'
 * ,-----------------------------------------------------------. ,-----------.
 * |~  |  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backsp | |Ins|Hom|PgU|
 * |-----------------------------------------------------------| |-----------|
 * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |Del|End|PgD|
 * |-----------------------------------------------------------| |---|---|---|
 * |Caps  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  | |???|???|???|
 * |-----------------------------------------------------------| |---|---|---|
 * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift     | |???|Up |???|
 * |-----------------------------------------------------------| |-----------|
 * |Ctl|Gui|Alt|          Space                |Alt|Gui|App|Ctl| |Lef|Dow|Rig|
 * `-----------------------------------------------------------' `-----------'
 */

  KEYMAP(\
    ESC,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,   NO,   NO,         NO,   NO,   NO, \
    GRV,   1,   2,   3,   4,   5,   6,   7,   8,   9,   0, MINS,  EQL, BSPC,  INS, HOME, PGUP, \
    TAB,   Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P, LBRC, RBRC, BSLS,  DEL,  END, PGDN, \
    FN1,   A,   S,   D,   F,   G,   H,   J,   K,   L, SCLN, QUOT,       ENT,    0,    0,    0, \
    LSFT,       Z,   X,   C,   V,   B,   N,   M, COMM,  DOT, SLSH,      RSFT,   0,   UP,    0, \
    LCTL, LGUI, LALT,             SPC,                RALT, RGUI, APP, RCTL, LEFT, DOWN, RGHT),


/*  Layer 1: Function Layer
 *
 * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
 * |Esc|   |   |   |   |   | |   |   |   |   | |   |   |   |   | |   |   |   |
 * `---'   `---------------' `---------------' `---------------' `-----------'
 * ,-----------------------------------------------------------. ,-----------.
 * |~  | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Backsp | |V- |Mut|V+ |
 * |-----------------------------------------------------------| |-----------|
 * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |Prv|Ply|Nxt|
 * |-----------------------------------------------------------| |-----------|
 * |FN1   |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  | |???|???|???|
 * |-----------------------------------------------------------| |-----------|
 * |Shft    |  Z|  X|Clc|  V|  B|  N|  M|  ,|  .|  /|Caps      | |???|Up |???|
 * |-----------------------------------------------------------| |-----------|
 * |Ctl|Gui|Alt|          Space                |Alt|Gui|App|Ctl| |Lef|Dow|Rig|
 * `-----------------------------------------------------------' `-----------'
 */

 KEYMAP(\
    ESC,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,   NO,   NO,         NO,   NO,   NO, \
    GRV,  F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9, F10,  F10,  F11,  F12, VOLD, MUTE, VOLU, \
    TAB,   Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P, LBRC, RBRC, BSLS, MPRV, MPLY, MNXT, \
    FN1,   A,   S,   D,   F,   G,   H,   J,   K,   L, SCLN, QUOT,       ENT,    0,    0,    0, \
    LSFT,       Z,   X,CALC,   V,   B,   N,   M, COMM, DOT, SLSH,      CAPS,    0, PSCR,    0, \
    LCTL, LGUI, LALT,             SPC,                RALT, RGUI, APP, RCTL, LEFT, DOWN, RGHT),


};


uint8_t keymap_get_keycode(uint8_t layer, uint8_t row, uint8_t col)
{
    return KEYCODE(layer, row, col);
}

uint8_t keymap_fn_layer(uint8_t index)
{
    return pgm_read_byte(&fn_layer[index]);
}

uint8_t keymap_fn_keycode(uint8_t index)
{
    return pgm_read_byte(&fn_keycode[index]);
}
« Last Edit: Sat, 02 March 2013, 20:17:11 by Melvang »
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich

Offline Batmann

  • Posts: 531
  • Location: France
Re: Building Phantom Hardware and Firmware Mods
« Reply #355 on: Sat, 18 May 2013, 10:42:06 »
Not sure this is the right place but I don't see where to ask for help,
So I received my Phantom PCB with diodes,
I soldered all the diodes and checked them with a multimeter -> all good, no diodes shorted and all of them are soldered correctly, - pin on the square pad.
I soldered the teensy and uploaded the ANSI win firmware from bpphany -> seems all right
Problem is I have non working keys.
I didn't solder any switch so I plugged the board and checked voltage for each switch and some of them are showing 0V (confirmed by a writing test in a notepad)

I have very few electronics knowledge so I might be missing something obvious or I might be testing things wrong so here is my question:

If you come accross a faulty switch what are the steps you use to try and fix it.

Offline gnubag

  • Posts: 509
  • Location: California, US
Re: Building Phantom Hardware and Firmware Mods
« Reply #356 on: Sat, 18 May 2013, 14:15:09 »
Not sure this is the right place but I don't see where to ask for help,
So I received my Phantom PCB with diodes,
I soldered all the diodes and checked them with a multimeter -> all good, no diodes shorted and all of them are soldered correctly, - pin on the square pad.
I soldered the teensy and uploaded the ANSI win firmware from bpphany -> seems all right
Problem is I have non working keys.
I didn't solder any switch so I plugged the board and checked voltage for each switch and some of them are showing 0V (confirmed by a writing test in a notepad)

I have very few electronics knowledge so I might be missing something obvious or I might be testing things wrong so here is my question:

If you come accross a faulty switch what are the steps you use to try and fix it.

try aquakeytest and a diode leg to short the switches.
if you have soldered everything right and the keys are not working there is probably a problem with the firmware.

Offline Batmann

  • Posts: 531
  • Location: France
Re: Building Phantom Hardware and Firmware Mods
« Reply #357 on: Sat, 18 May 2013, 17:14:06 »
Ok so I tried aquakey and here is the result



the right alt is now working (I forgot to solder the diode)

I resolder every diode on the faulty keys and same result.
I also reloaded the firmware and tried both win and winkeyless.
Problem is still here.
So now I guess it has something to do with the teensy.

Can the faulty keys pattern be linked to a specific teensy leg?

Offline gnubag

  • Posts: 509
  • Location: California, US
Re: Building Phantom Hardware and Firmware Mods
« Reply #358 on: Sat, 18 May 2013, 17:47:26 »
Ok so I tried aquakey and here is the result

Show Image


the right alt is now working (I forgot to solder the diode)

I resolder every diode on the faulty keys and same result.
I also reloaded the firmware and tried both win and winkeyless.
Problem is still here.
So now I guess it has something to do with the teensy.

Can the faulty keys pattern be linked to a specific teensy leg?

probably check the teensy, it looks like some columns are not registering.

Offline Batmann

  • Posts: 531
  • Location: France
Re: Building Phantom Hardware and Firmware Mods
« Reply #359 on: Sat, 18 May 2013, 18:17:47 »
Problem solved
I forgot to solder the inner pins on the teensy (the ones that are not presoldered on the chip)
Now I'm happy :D

Offline SpAmRaY

  • NOT a Moderator
  • * Certified Spammer
  • Posts: 14667
  • Location: ¯\(°_o)/¯
  • because reasons.......
Re: Building Phantom Hardware and Firmware Mods
« Reply #360 on: Mon, 20 May 2013, 14:59:54 »
How difficult is it to wipe out the firmware and start over on a phantom?

Say I've got a board with 91 keys but the firmware is setup for 86 how easy/hard is it to fix it back to using 91 and add a second layer for the numpad area?


Offline SmallFry

  • ** Moderator Emeritus
  • Posts: 3887
  • Location: Wisconsin, USA
  • Leaving 6/15; returning 6/22 or so.
Re: Building Phantom Hardware and Firmware Mods
« Reply #361 on: Mon, 20 May 2013, 22:43:37 »
I can help you with that man. :D

Offline SpAmRaY

  • NOT a Moderator
  • * Certified Spammer
  • Posts: 14667
  • Location: ¯\(°_o)/¯
  • because reasons.......
Re: Building Phantom Hardware and Firmware Mods
« Reply #362 on: Tue, 21 May 2013, 00:39:57 »
I can help you with that man. :D

i passed on that one board i was pm'ing you about but i will still need help eventually when i do get a phantom  :p

Offline Glod

  • * Elevated Elder
  • Posts: 1998
  • Location: Virginia, USA
  • Also Known As Ergonomech
    • YouTube Channel
Re: Building Phantom Hardware and Firmware Mods
« Reply #363 on: Tue, 21 May 2013, 20:18:48 »
<delete me>

Offline WhiteFireDragon

  • Posts: 2276
    • youtube
Re: Building Phantom Hardware and Firmware Mods
« Reply #364 on: Thu, 23 May 2013, 23:47:44 »
I just posted my teensy in another thread so it reminded me to mention it here too since I know people are starting to get PCBs and plates:

When you build yours, solder the teensy as flush as you can to the PCB. Mine is touching the PCB, with only 1 layer of electrical tape between the PCB and teensy to insulate them. You'd want it as flush as possible because this could help clearance with future case designs. Also, the solder joint on the other side should be as flush as possible. If they stick up like typical solder joints, then switches won't be flush. Mine are literally flat.


23111-0 23113-1 23115-2
« Last Edit: Thu, 23 May 2013, 23:49:45 by WhiteFireDragon »

Offline Photekq

  • wheat flour zone
  • Posts: 4794
  • Location: North Wales, UK
  • sorry if i was ever an ******* to you
Re: Building Phantom Hardware and Firmware Mods
« Reply #365 on: Mon, 27 May 2013, 13:49:16 »
I just posted my teensy in another thread so it reminded me to mention it here too since I know people are starting to get PCBs and plates:

When you build yours, solder the teensy as flush as you can to the PCB. Mine is touching the PCB, with only 1 layer of electrical tape between the PCB and teensy to insulate them. You'd want it as flush as possible because this could help clearance with future case designs. Also, the solder joint on the other side should be as flush as possible. If they stick up like typical solder joints, then switches won't be flush. Mine are literally flat.


(Attachment Link) (Attachment Link) (Attachment Link)
How do you achieve those flat solder joints? Mine always bulb up even if the through-hole pins don't stick out the hole.
https://kbdarchive.org/
github
discord: hi mum#5710

Offline Batmann

  • Posts: 531
  • Location: France
Re: Building Phantom Hardware and Firmware Mods
« Reply #366 on: Mon, 27 May 2013, 14:15:49 »
to get mine completely flush, I put it in place without the insulation layer and pushed it all the way against the PCB. Then I cut the pins the "tighter" I could and when I put the insulation layer back, pins were completely flush so soldering didn't leave any "bubbles"
Hope that makes sense  :)

Offline gimpster

  • Posts: 416
  • Location: Seattle, WA
Re: Building Phantom Hardware and Firmware Mods
« Reply #367 on: Thu, 30 May 2013, 16:58:41 »
Yup, the pins have to be trimmed so they sit below the surface of the PCB and then when you solder, you just have to be very careful about how much solder you put into each hole.
-Ryan

Offline Photekq

  • wheat flour zone
  • Posts: 4794
  • Location: North Wales, UK
  • sorry if i was ever an ******* to you
Re: Building Phantom Hardware and Firmware Mods
« Reply #368 on: Thu, 30 May 2013, 17:00:32 »
Thanks ^^
https://kbdarchive.org/
github
discord: hi mum#5710

Offline The_Beast

  • * Maker
  • Posts: 3964
  • Location: Wisconsin
  • I like wood ಠ_๏
Re: Building Phantom Hardware and Firmware Mods
« Reply #369 on: Sat, 01 June 2013, 19:08:29 »
For absolute coding noobs (me in this case), is there a GUI programmer that supports layers and macros (say I want of the 1x bottom row keys to be copy, and the other be paste)? I don't think that alaricljs supported layers or macros


Also, after reading, it is possible to reprogram the teensy without pushing the button right?
Vendor Status: Sadly, not taking any orders/pre-orders at this time

Vendor Quick Links: | Vendor Forum | Hardwood Wrist Rests | Hardwood 60% Cases | Customer Gallery | Giveaway |

Offline bpiphany

  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Re: Building Phantom Hardware and Firmware Mods
« Reply #370 on: Sat, 01 June 2013, 19:19:08 »
Also, after reading, it is possible to reprogram the teensy without pushing the button right?

If you already have a firmware running on the Teesny that supports jumping to the bootloader you can do this. You will need to push the button at least once to load one. After that you will only need to do it if you load a bad firmware (something that tends to happen at least when you write code yourself...).

Offline Rendom

  • Posts: 362
  • Location: Australia
Re: Building Phantom Hardware and Firmware Mods
« Reply #371 on: Sat, 01 June 2013, 19:19:22 »
These two hex files are from the original source code from prins.  They work.
(Attachment Link)
(Attachment Link)

This one is from a recent github source.  For PHANSI.

(Attachment Link)

Are these the firmware codes/program for the Phantom to work?
QFR - MX Blue

Offline SpAmRaY

  • NOT a Moderator
  • * Certified Spammer
  • Posts: 14667
  • Location: ¯\(°_o)/¯
  • because reasons.......
Re: Building Phantom Hardware and Firmware Mods
« Reply #372 on: Sat, 01 June 2013, 19:50:22 »
For absolute coding noobs (me in this case), is there a GUI programmer that supports layers and macros (say I want of the 1x bottom row keys to be copy, and the other be paste)? I don't think that alaricljs supported layers or macros


Also, after reading, it is possible to reprogram the teensy without pushing the button right?

GUI programmer would be awesome!

Offline SmallFry

  • ** Moderator Emeritus
  • Posts: 3887
  • Location: Wisconsin, USA
  • Leaving 6/15; returning 6/22 or so.
Re: Building Phantom Hardware and Firmware Mods
« Reply #373 on: Sat, 01 June 2013, 20:29:17 »
IMO, Hasu's code is *very* friendly to learn. I should make a YouTube video sometime.

Offline Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Re: Building Phantom Hardware and Firmware Mods
« Reply #374 on: Sat, 01 June 2013, 20:51:31 »
please do so for us non coders that still want to build the firmware ourselves
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich

Offline gnubag

  • Posts: 509
  • Location: California, US
Re: Building Phantom Hardware and Firmware Mods
« Reply #375 on: Sat, 01 June 2013, 23:30:42 »
it is pretty stright forward to be honest.
it takes like 5 min to figure it out, since you are just modifying it and not doing it all over.
« Last Edit: Sat, 01 June 2013, 23:42:52 by gnubag »

Offline Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Re: Building Phantom Hardware and Firmware Mods
« Reply #376 on: Mon, 03 June 2013, 00:09:42 »
Anyone know the exact dimensions for the phantom plate and PCB?  Need the numbers for a custom case I am building.  And I would assume that the PCB is pretty much centered on the plate when installed?

Melvang
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich

Offline damorgue

  • Posts: 1176
  • Location: Sweden
    • Personal portfolio
Re: Building Phantom Hardware and Firmware Mods
« Reply #377 on: Fri, 07 June 2013, 08:33:58 »
Has there been any major changes to the firmware lately? I haven't been following it, and am just wondering if multi-stroke key presses or any sort of macro functionality has been implemented? Did any of the other firmwares than Hasu's ever get of the ground?

Offline Rendom

  • Posts: 362
  • Location: Australia
Re: Building Phantom Hardware and Firmware Mods
« Reply #378 on: Mon, 10 June 2013, 12:39:11 »
Can anyone teach me and run through with the coding, and firmware mods? I will be getting my Phantom assembled soon.
QFR - MX Blue

Offline damorgue

  • Posts: 1176
  • Location: Sweden
    • Personal portfolio
Re: Building Phantom Hardware and Firmware Mods
« Reply #379 on: Fri, 14 June 2013, 13:46:20 »
Has there been any major changes to the firmware lately? I haven't been following it, and am just wondering if multi-stroke key presses or any sort of macro functionality has been implemented? Did any of the other firmwares than Hasu's ever get of the ground?

Not only that, but has any support for MX lock switches been added to the lock features such as caps lock?

I also believe I heard someone mention that support for media keys had been added, is that true?

Offline yeeeargh

  • Posts: 15
Re: Building Phantom Hardware and Firmware Mods
« Reply #380 on: Fri, 14 June 2013, 14:25:56 »
yep, media keys are available

Offline damorgue

  • Posts: 1176
  • Location: Sweden
    • Personal portfolio
Re: Building Phantom Hardware and Firmware Mods
« Reply #381 on: Fri, 14 June 2013, 14:27:53 »
and MX lock?

Offline jdcarpe

  • * Curator
  • Posts: 8852
  • Location: Odessa, TX
  • Live long, and prosper.
Re: Building Phantom Hardware and Firmware Mods
« Reply #382 on: Fri, 14 June 2013, 15:05:56 »
and MX lock?

You can put an MX lock switch wherever you like. Just program it to be a shift key. The firmware just outputs the scan codes. It's your OS that would be confused if you had it programmed as caps lock. It would never register the key up event until you unlock the switch.
KMAC :: LZ-GH :: WASD CODE :: WASD v2 :: GH60 :: Alps64 :: JD45 :: IBM Model M :: IBM 4704 "Pingmaster"

http://jd40.info :: http://jd45.info


in memoriam

"When I was a kid, I used to take things apart and never put them back together."

Offline damorgue

  • Posts: 1176
  • Location: Sweden
    • Personal portfolio
Re: Building Phantom Hardware and Firmware Mods
« Reply #383 on: Fri, 14 June 2013, 15:08:34 »
That is the way I am currently running it. Shift doesn't do the same as caps lock though, and doesn't work even slightly for the other locks. I am taking this as still no.

Does anyone know what happened to the other firmwares?

Offline jdcarpe

  • * Curator
  • Posts: 8852
  • Location: Odessa, TX
  • Live long, and prosper.
Re: Building Phantom Hardware and Firmware Mods
« Reply #384 on: Fri, 14 June 2013, 15:22:33 »
That is the way I am currently running it. Shift doesn't do the same as caps lock though, and doesn't work even slightly for the other locks. I am taking this as still no.

Does anyone know what happened to the other firmwares?

What you want, then, is a new HID keyboard driver for [windows, Mac, Linux] that treats caps/scroll/num as momentary and not lock. I don't think there is a scan code that exists for these for the firmware to output.
KMAC :: LZ-GH :: WASD CODE :: WASD v2 :: GH60 :: Alps64 :: JD45 :: IBM Model M :: IBM 4704 "Pingmaster"

http://jd40.info :: http://jd45.info


in memoriam

"When I was a kid, I used to take things apart and never put them back together."

Offline damorgue

  • Posts: 1176
  • Location: Sweden
    • Personal portfolio
Re: Building Phantom Hardware and Firmware Mods
« Reply #385 on: Fri, 14 June 2013, 15:31:46 »
There was a keyboard posted at DT which solved it quite nicely. Since data is sent back to the keyboard with the lock state of the operating system, the keyboard could override it if it didn't correspond to the state of the lock key. No software would have to run on the OS and it would be compatible with all. No need to mess around with scan codes. The keyboard just ensures that caps lock is turned on if the mx lock switch is activated, it is as simple as that.

Offline damorgue

  • Posts: 1176
  • Location: Sweden
    • Personal portfolio
Re: Building Phantom Hardware and Firmware Mods
« Reply #386 on: Fri, 14 June 2013, 21:42:35 »
So apparently Hasu has added support for locking keys since I asked for it a while back. This is more of a public service announcement for those that don't yet know and because I am happy about it.

Offline damorgue

  • Posts: 1176
  • Location: Sweden
    • Personal portfolio
Re: Building Phantom Hardware and Firmware Mods
« Reply #387 on: Sat, 15 June 2013, 10:41:49 »
I don't know about PWM and phantom hardware very much, though this patch may cure your LED problem.
Where can I find phantom schematic?

Code: [Select]
diff --git a/keyboard/phantom/led.c b/keyboard/phantom/led.c
index 3523cb7..109004b 100644
--- a/keyboard/phantom/led.c
+++ b/keyboard/phantom/led.c
@@ -23,12 +23,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 void led_set(uint8_t usb_led)
 {
     if (!(usb_led & (1<<USB_LED_CAPS_LOCK)))
-        PORTB &= ~(1<<6);
+        DDRB &= ~(1<<6);
     else
-        PORTB |= (1<<6);
+        DDRB |= (1<<6);

     if (!(usb_led & (1<<USB_LED_SCROLL_LOCK)))
-        PORTB &= ~(1<<7);
+        DDRB &= ~(1<<7);
     else
-        PORTB |= (1<<7);
+        DDRB |= (1<<7);
 }

Was this ever applied? The code is currently as quoted below and it causes the scroll lock to be very dim.
Replacing PORTB with DDRB works for me to fix it. I don't know or care why it works when I do so, but there is something fishy going on there.

Code: [Select]
#include <avr/io.h>
#include "led.h"


void led_set(uint8_t usb_led)
{
    if (usb_led & (1<<USB_LED_CAPS_LOCK))
    {
        // Output high.
        DDRB |= (1<<6);
        PORTB |= (1<<6);
    }
    else
    {
        // Output low.
        DDRB &= ~(1<<6);
        PORTB &= ~(1<<6);
    }

    if (usb_led & (1<<USB_LED_SCROLL_LOCK))
    {
        // Output high.
        DDRB &= ~(1<<7);
        PORTB |= (1<<7);
    }
    else
    {
        // Output low.
        DDRB &= ~(1<<7);
        PORTB &= ~(1<<7);
    }
}

Offline Wraul

  • Posts: 211
  • Location: Sweden
Re: Building Phantom Hardware and Firmware Mods
« Reply #388 on: Sat, 15 June 2013, 16:20:13 »
Was this ever applied? The code is currently as quoted below and it causes the scroll lock to be very dim.
Replacing PORTB with DDRB works for me to fix it. I don't know or care why it works when I do so, but there is something fishy going on there.

Hmm. You might have hit a bug there.
I'm not at home so I can't test this right now.

Does this give you the correct behavior?
Code: [Select]
#include <avr/io.h>
#include "led.h"


void led_set(uint8_t usb_led)
{
    if (usb_led & (1<<USB_LED_CAPS_LOCK))
    {
        // Output high.
        DDRB |= (1<<6);
        PORTB |= (1<<6);
    }
    else
    {
        // Output low.
        DDRB &= ~(1<<6);
        PORTB &= ~(1<<6);
    }

    if (usb_led & (1<<USB_LED_SCROLL_LOCK))
    {
        // Output high.
        DDRB |= (1<<7);
        PORTB |= (1<<7);
    }
    else
    {
        // Output low.
        DDRB &= ~(1<<7);
        PORTB &= ~(1<<7);
    }
}

Offline agor

  • Posts: 282
  • Location: Germany
Re: Building Phantom Hardware and Firmware Mods
« Reply #389 on: Mon, 17 June 2013, 16:50:25 »
Finally got around to tinker with my phantom a bit.
Soldered all necessary diodes and the teensy to the board and flashed firmware successfully (built tmk ones).

Problem I have: Windows does not seem to find a driver?
Also, after a reboot, the teensy led is flashing all the time. If I replug USB this stops
KBD8X II - MX 5000 - Realforce 88UB - Phantom - GH60

Offline agor

  • Posts: 282
  • Location: Germany
Re: Building Phantom Hardware and Firmware Mods
« Reply #390 on: Tue, 18 June 2013, 10:37:13 »
Works fine with Linux though, but Windows is my main driver.
Also got another problem: it seems some keys are not working, most of them in the first row I think.

ESC, Tab, Caps, Shift, and Ctrl. Tilde works though. Black band of diode to the square. Also tested the solder joints of the diodes with Multimeter Diode Check from the backside and everything seemed fine :(
KBD8X II - MX 5000 - Realforce 88UB - Phantom - GH60

Offline Wraul

  • Posts: 211
  • Location: Sweden
Re: Building Phantom Hardware and Firmware Mods
« Reply #391 on: Tue, 18 June 2013, 10:46:12 »
Works fine with Linux though, but Windows is my main driver.
Also got another problem: it seems some keys are not working, most of them in the first row I think.

ESC, Tab, Caps, Shift, and Ctrl. Tilde works though. Black band of diode to the square. Also tested the solder joints of the diodes with Multimeter Diode Check from the backside and everything seemed fine :(

What layout are you using?
With the tmk firmware I have only tested the ANSI layout on actual hardware.

Btw. It worked for me in windows last time I tried.

Offline agor

  • Posts: 282
  • Location: Germany
Re: Building Phantom Hardware and Firmware Mods
« Reply #392 on: Tue, 18 June 2013, 10:51:22 »
I'm using ISO Layout. If I select HID Keyboard driver manually it shows a different error "device could not boot" or sth like that.
Where can I measure to find out why the keys are not working?
KBD8X II - MX 5000 - Realforce 88UB - Phantom - GH60

Offline Wraul

  • Posts: 211
  • Location: Sweden
Re: Building Phantom Hardware and Firmware Mods
« Reply #393 on: Tue, 18 June 2013, 11:07:25 »
I'm using ISO Layout. If I select HID Keyboard driver manually it shows a different error "device could not boot" or sth like that.
Where can I measure to find out why the keys are not working?

Just to make sure.
You did specify iso when building the firmware?
As instructed here https://github.com/tmk/tmk_keyboard/tree/master/keyboard/phantom#build
It defaults to ANSI, but that should only result in a few non working keys.

More exactly which keys are not working?

You can diagnose the firmware using hid_listen. You find hid_listen here http://www.pjrc.com/teensy/hid_listen.html
Available commands is listed here https://github.com/tmk/tmk_keyboard#magic-comannds

I don't know much about Windows, sorry.

Offline agor

  • Posts: 282
  • Location: Germany
Re: Building Phantom Hardware and Firmware Mods
« Reply #394 on: Tue, 18 June 2013, 11:32:24 »
Firmware was built using: make -f Makefile.pjrc iso

Just debugged the keyboard matrix, it seems the whole column0 is not working, which for iso seems: Esc, 1, Tab, Caps, LShift, LCtrl

KBD8X II - MX 5000 - Realforce 88UB - Phantom - GH60

Offline Wraul

  • Posts: 211
  • Location: Sweden
Re: Building Phantom Hardware and Firmware Mods
« Reply #395 on: Tue, 18 June 2013, 12:22:45 »
Firmware was built using: make -f Makefile.pjrc iso

Just debugged the keyboard matrix, it seems the whole column0 is not working, which for iso seems: Esc, 1, Tab, Caps, LShift, LCtrl



Check your connection on pin D5

Offline agor

  • Posts: 282
  • Location: Germany
Re: Building Phantom Hardware and Firmware Mods
« Reply #396 on: Tue, 18 June 2013, 13:19:29 »
Solder joint looks fine to me, but I'll address this after my vacation. I'll be back in 4 months, thanks for your help!
KBD8X II - MX 5000 - Realforce 88UB - Phantom - GH60

Offline Wraul

  • Posts: 211
  • Location: Sweden
Re: Building Phantom Hardware and Firmware Mods
« Reply #397 on: Tue, 18 June 2013, 14:08:12 »
Solder joint looks fine to me, but I'll address this after my vacation. I'll be back in 4 months, thanks for your help!

Sure. No problem.
Have a nice vacation.

Offline agor

  • Posts: 282
  • Location: Germany
Re: Building Phantom Hardware and Firmware Mods
« Reply #398 on: Tue, 18 June 2013, 17:02:42 »
4 weeks I mean, my employer would kill me :-D
KBD8X II - MX 5000 - Realforce 88UB - Phantom - GH60

Offline Glod

  • * Elevated Elder
  • Posts: 1998
  • Location: Virginia, USA
  • Also Known As Ergonomech
    • YouTube Channel
Re: Building Phantom Hardware and Firmware Mods
« Reply #399 on: Wed, 19 June 2013, 04:27:05 »
It is such a good feeling when you put something together and everything works. Building this phantom was rewarding


Untitled by almightyglod, on Flickr


Untitled by almightyglod, on Flickr

Untitled by almightyglod, on Flickr


Untitled by almightyglod, on Flickr

Wfd plate

Oh and if your wondering what those black rubber gum drop shaped things are it is my little mod with sugru that allows me to use vortex aluminium case. I chose sugru because The material is for the most part hard but is also a little soft, it's not a rock when cured . When you put together the case and pcb everything is nice and tight and level. Without this mod the pcb is balancing in the case only on the teensy.


Untitled by almightyglod, on Flickr

Also worth noting to those looking at vortex case for phantom. you have to mod the case or the pcb like I did and you have to solder the teensy super close to pcb, I used electrical tape and then soldered as close as possible. Just a few mm of more space and the vortex case Will Not work..