diff --git a/src/avrdude.conf.in b/src/avrdude.conf.in
index b4c28a12..5a68cff5 100644
--- a/src/avrdude.conf.in
+++ b/src/avrdude.conf.in
@@ -159,9 +159,9 @@
 # complain.
 #
 # Parts can also inherit parameters from previously defined parts
-# using the following syntax. In this case specified integer and 
-# string values override parameter values from the parent part. New 
-# memory definitions are added to the definitions inherited from the 
+# using the following syntax. In this case specified integer and
+# string values override parameter values from the parent part. New
+# memory definitions are added to the definitions inherited from the
 # parent. If, however, a new memory definition refers to an existing
 # one of the same name for that part then, from v7.1, the existing
 # memory definition is extended, and components overwritten with new
@@ -175,7 +175,7 @@
 #     ;
 #
 # NOTES:
-#   * 'devicecode' is the device code used by the STK500 (see codes 
+#   * 'devicecode' is the device code used by the STK500 (see codes
 #       listed below)
 #   * Not all memory types will implement all instructions.
 #   * AVR Fuse bits and Lock bits are implemented as a type of memory.
@@ -303,8 +303,8 @@
 #define AT86RF401   0xD0
 
 #define AT89START   0xE0
-#define AT89S51	    0xE0
-#define AT89S52	    0xE1
+#define AT89S51     0xE0
+#define AT89S52     0xE1
 
 # The following table lists the devices in the original AVR910
 # appnote:
@@ -356,15 +356,15 @@
 # in the Internet.  These add the following codes (only devices that
 # actually exist are listed):
 
-# ATmega8515	0x3A
-# ATmega128	0x43
-# ATmega64	0x45
-# ATtiny26	0x5E
-# ATmega8535	0x69
-# ATmega32	0x72
-# ATmega16	0x74
-# ATmega8	0x76
-# ATmega169	0x78
+# ATmega8515    0x3A
+# ATmega128     0x43
+# ATmega64      0x45
+# ATtiny26      0x5E
+# ATmega8535    0x69
+# ATmega32      0x72
+# ATmega16      0x74
+# ATmega8       0x76
+# ATmega169     0x78
 
 #
 # Overall avrdude defaults; suitable for ~/.avrduderc
@@ -374,34 +374,363 @@ default_serial     = "@DEFAULT_SER_PORT@";
 default_spi        = "@DEFAULT_SPI_PORT@";
 # default_bitclock = 2.5;
 
+@HAVE_PARPORT_BEGIN@
+# Parallel port programmers
+
+#------------------------------------------------------------
+# bsd
+#------------------------------------------------------------
+
+programmer
+    id                     = "bsd";
+    desc                   = "Brian Dean's Programmer, http://www.bsdhome.com/avrdude/";
+    type                   = "par";
+    vcc                    = 2, 3, 4, 5;
+    reset                  = 7;
+    sck                    = 8;
+    mosi                   = 9;
+    miso                   = 10;
+;
+
+#------------------------------------------------------------
+# stk200
+#------------------------------------------------------------
+
+programmer
+    id                     = "stk200";
+    desc                   = "STK200";
+    type                   = "par";
+    buff                   = 4, 5;
+    reset                  = 9;
+    sck                    = 6;
+    mosi                   = 7;
+    miso                   = 10;
+;
+
+#------------------------------------------------------------
+# pony-stk200
+#------------------------------------------------------------
+
+# The programming dongle used by the popular Ponyprog
+# utility.  It is almost similar to the STK200 one,
+# except that there is a LED indicating that the
+# programming is currently in progress.
+
+programmer parent "stk200"
+    id                     = "pony-stk200";
+    desc                   = "Pony Prog STK200";
+    pgmled                 = 8;
+;
+
+#------------------------------------------------------------
+# dt006
+#------------------------------------------------------------
+
+programmer
+    id                     = "dt006";
+    desc                   = "Dontronics DT006";
+    type                   = "par";
+    reset                  = 4;
+    sck                    = 5;
+    mosi                   = 2;
+    miso                   = 11;
+;
+
+#------------------------------------------------------------
+# bascom
+#------------------------------------------------------------
+
+programmer parent "dt006"
+    id                     = "bascom";
+    desc                   = "Bascom SAMPLE programming cable";
+;
+
+#------------------------------------------------------------
+# alf
+#------------------------------------------------------------
+
+programmer
+    id                     = "alf";
+    desc                   = "Nightshade ALF-PgmAVR, http://nightshade.homeip.net/";
+    type                   = "par";
+    vcc                    = 2, 3, 4, 5;
+    buff                   = 6;
+    reset                  = 7;
+    sck                    = 8;
+    mosi                   = 9;
+    miso                   = 10;
+    errled                 = 1;
+    rdyled                 = 14;
+    pgmled                 = 16;
+    vfyled                 = 17;
+;
+
+#------------------------------------------------------------
+# sp12
+#------------------------------------------------------------
+
+programmer
+    id                     = "sp12";
+    desc                   = "Steve Bolt's Programmer";
+    type                   = "par";
+    vcc                    = 4, 5, 6, 7, 8;
+    reset                  = 3;
+    sck                    = 2;
+    mosi                   = 9;
+    miso                   = 11;
+;
+
+#------------------------------------------------------------
+# picoweb
+#------------------------------------------------------------
+
+programmer
+    id                     = "picoweb";
+    desc                   = "Picoweb Programming Cable, http://www.picoweb.net/";
+    type                   = "par";
+    reset                  = 2;
+    sck                    = 3;
+    mosi                   = 4;
+    miso                   = 13;
+;
+
+#------------------------------------------------------------
+# abcmini
+#------------------------------------------------------------
+
+programmer
+    id                     = "abcmini";
+    desc                   = "ABCmini Board, aka Dick Smith HOTCHIP";
+    type                   = "par";
+    reset                  = 4;
+    sck                    = 3;
+    mosi                   = 2;
+    miso                   = 10;
+;
+
+#------------------------------------------------------------
+# futurlec
+#------------------------------------------------------------
+
+programmer
+    id                     = "futurlec";
+    desc                   = "Futurlec.com programming cable.";
+    type                   = "par";
+    reset                  = 3;
+    sck                    = 2;
+    mosi                   = 1;
+    miso                   = 10;
+;
+
+#------------------------------------------------------------
+# xil
+#------------------------------------------------------------
+
+# From the contributor of the "xil" jtag cable:
+# The "vcc" definition isn't really vcc (the cable gets its power from
+# the programming circuit) but is necessary to switch one of the
+# buffer lines (trying to add it to the "buff" lines doesn't work in
+# avrdude versions before 5.5j).
+# With this, TMS connects to RESET, TDI to MOSI, TDO to MISO and TCK
+# to SCK (plus vcc/gnd of course)
+
+programmer
+    id                     = "xil";
+    desc                   = "Xilinx JTAG cable";
+    type                   = "par";
+    vcc                    = 6;
+    buff                   = 5;
+    reset                  = 4;
+    sck                    = 3;
+    mosi                   = 2;
+    miso                   = 13;
+;
+
+#------------------------------------------------------------
+# dapa
+#------------------------------------------------------------
+
+programmer
+    id                     = "dapa";
+    desc                   = "Direct AVR Parallel Access cable";
+    type                   = "par";
+    vcc                    = 3;
+    reset                  = 16;
+    sck                    = 1;
+    mosi                   = 2;
+    miso                   = 11;
+;
+
+#------------------------------------------------------------
+# atisp
+#------------------------------------------------------------
+
+programmer
+    id                     = "atisp";
+    desc                   = "AT-ISP V1.1 programming cable for AVR-SDK1 from <http://micro-research.co.th/> micro-research.co.th";
+    type                   = "par";
+    reset                  = ~6;
+    sck                    = ~8;
+    mosi                   = ~7;
+    miso                   = ~10;
+;
+
+#------------------------------------------------------------
+# ere-isp-avr
+#------------------------------------------------------------
+
+programmer
+    id                     = "ere-isp-avr";
+    desc                   = "ERE ISP-AVR <http://www.ere.co.th/download/sch050713.pdf>";
+    type                   = "par";
+    reset                  = ~4;
+    sck                    = 3;
+    mosi                   = 2;
+    miso                   = 10;
+;
+
+#------------------------------------------------------------
+# blaster
+#------------------------------------------------------------
+
+programmer
+    id                     = "blaster";
+    desc                   = "Altera ByteBlaster";
+    type                   = "par";
+    buff                   = 14;
+    reset                  = 3;
+    sck                    = 2;
+    mosi                   = 8;
+    miso                   = 11;
+;
+
+#------------------------------------------------------------
+# frank-stk200
+#------------------------------------------------------------
+
+# It is almost same as pony-stk200, except vcc on pin 5 to auto
+# disconnect port (download on http://electropol.free.fr/spip/spip.php?article27)
+
+programmer parent "pony-stk200"
+    id                     = "frank-stk200";
+    desc                   = "Frank STK200";
+    vcc                    = 5;
+    buff                   = ; # delete buff pin assignment
+;
+
+#------------------------------------------------------------
+# 89isp
+#------------------------------------------------------------
+
+# The AT98ISP Cable is a simple parallel dongle for AT89 family.
+# http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2877
+
+programmer
+    id                     = "89isp";
+    desc                   = "Atmel at89isp cable";
+    type                   = "par";
+    reset                  = 17;
+    sck                    = 1;
+    mosi                   = 2;
+    miso                   = 10;
+;
+@HAVE_PARPORT_END@
+
+@HAVE_LINUXGPIO_BEGIN@
+
+# This programmer bitbangs GPIO lines using the Linux sysfs GPIO interface
+#
+# To enable it set the configuration below to match the GPIO lines connected
+# to the relevant ISP header pins and uncomment the entry definition. In case
+# you don't have the required permissions to edit this system wide config
+# file put the entry in a separate <your name>.conf file and use it with
+# -C+<your name>.conf on the command line.
+#
+# To check if your avrdude build has support for the linuxgpio programmer
+# compiled in, use -c?type on the command line and look for linuxgpio in the
+# list. If it's not available you need pass the --enable-linuxgpio=yes option
+# to configure and recompile avrdude.
+#
+#
+# #------------------------------------------------------------
+# # linuxgpio
+# #------------------------------------------------------------
+#
+# programmer
+#     id                   = "linuxgpio";
+#     desc                 = "Use the Linux sysfs interface to bitbang GPIO lines";
+#     type                 = "linuxgpio";
+#     reset                = ?;
+#     sck                  = ?;
+#     mosi                 = ?;
+#     miso                 = ?;
+# ;
+@HAVE_LINUXGPIO_END@
+
+@HAVE_LINUXSPI_BEGIN@
+#------------------------------------------------------------
+# linuxspi
+#------------------------------------------------------------
+
+# This programmer uses the built in linux SPI bus devices to program an
+# attached AVR. The reset pin must be attached to a GPIO pin that
+# is otherwise unused (see gpioinfo(1)); the SPI bus CE pins are not
+# suitable since they would release /RESET too early.
+#
+
+programmer
+    id                     = "linuxspi";
+    desc                   = "Use Linux SPI device in /dev/spidev*";
+    type                   = "linuxspi";
+    connection_type        = spi;
+    reset                  = 25;    # Pi GPIO number - this is J8:22
+;
+@HAVE_LINUXSPI_END@
+
 #
 # PROGRAMMER DEFINITIONS
 #
 
+#------------------------------------------------------------
+# wiring
+#------------------------------------------------------------
+
 # http://wiring.org.co/
-# Basically STK500v2 protocol, with some glue to trigger the
-# bootloader.
-programmer
-  id    = "wiring";
-  desc  = "Wiring";
-  type  = "wiring";
-  connection_type = serial;
-;
+# Basically STK500v2 protocol, with some glue to trigger the bootloader
 
 programmer
-  id    = "arduino";
-  desc  = "Arduino";
-  type  = "arduino";
-  connection_type = serial;
+    id                     = "wiring";
+    desc                   = "Wiring";
+    type                   = "wiring";
+    connection_type        = serial;
 ;
 
+#------------------------------------------------------------
+# arduino
+#------------------------------------------------------------
+
 programmer
-  id    = "xbee";
-  desc  = "XBee Series 2 Over-The-Air (XBeeBoot)";
-  type  = "xbee";
-  connection_type = serial;
+    id                     = "arduino";
+    desc                   = "Arduino";
+    type                   = "arduino";
+    connection_type        = serial;
 ;
 
+#------------------------------------------------------------
+# xbee
+#------------------------------------------------------------
+
+programmer
+    id                     = "xbee";
+    desc                   = "XBee Series 2 Over-The-Air (XBeeBoot)";
+    type                   = "xbee";
+    connection_type        = serial;
+;
+
+#------------------------------------------------------------
+# avrftdi
+#------------------------------------------------------------
+
 # this will interface with the chips on these programmers:
 #
 # http://real.kiev.ua/old/avreal/en/adapters
@@ -412,7 +741,7 @@ programmer
 # http://dangerousprototypes.com/docs/FT2232_breakout_board
 # http://www.ftdichip.com/Products/Modules/DLPModules.htm,DLP-2232*,DLP-USB1232H
 # http://flashrom.org/FT2232SPI_Programmer
-# 
+#
 # The drivers will look for a specific device and use the first one found.
 # If you have mulitple devices, then look for unique information (like SN)
 # And fill that in here.
@@ -423,108 +752,118 @@ programmer
 # these FTDI ICs has been designed.
 
 programmer
-  id         = "avrftdi";
-  desc       = "FT2232D based generic programmer";
-  type       = "avrftdi";
-  connection_type = usb;
-  usbvid     = 0x0403;
-  usbpid     = 0x6010;
-  usbvendor  = "";
-  usbproduct = "";
-  usbdev     = "A";
-  usbsn      = "";
-#ISP-signals - lower ADBUS-Nibble (default)
-  reset  = 3;
-  sck    = 0;
-  mosi   = 1;
-  miso   = 2;
-#LED SIGNALs - higher ADBUS-Nibble
-#  errled = 4;
-#  rdyled = 5;
-#  pgmled = 6;
-#  vfyled = 7;
-#Buffer Signal - ACBUS - Nibble
-#  buff   = 8;
+    id                     = "avrftdi";
+    desc                   = "FT2232D based generic programmer";
+    type                   = "avrftdi";
+    connection_type        = usb;
+    usbvid                 = 0x0403;
+    usbpid                 = 0x6010;
+    usbdev                 = "A";
+#   ISP-signals - lower ADBUS-Nibble (default)
+    reset                  = 3;
+    sck                    = 0;
+    mosi                   = 1;
+    miso                   = 2;
+#   LED SIGNALs - higher ADBUS-Nibble
+#   errled                 = 4;
+#   rdyled                 = 5;
+#   pgmled                 = 6;
+#   vfyled                 = 7;
+#   Buffer Signal - ACBUS - Nibble
+#   buff                   = 8;
 ;
+
+#------------------------------------------------------------
+# 2232HIO
+#------------------------------------------------------------
+
 # This is an implementation of the above with a buffer IC (74AC244) and
 # 4 LEDs directly attached, all active low.
+
 programmer
-  id         = "2232HIO";
-  desc       = "FT2232H based generic programmer";
-  type       = "avrftdi";
-  connection_type = usb;
-  usbvid     = 0x0403;
-# Note: This PID is reserved for generic H devices and 
+    id                     = "2232HIO";
+    desc                   = "FT2232H based generic programmer";
+    type                   = "avrftdi";
+    connection_type        = usb;
+    usbvid                 = 0x0403;
+# Note: This PID is reserved for generic H devices and
 # should be programmed into the EEPROM
-#  usbpid     = 0x8A48;
-  usbpid     = 0x6010;
-  usbdev     = "A";
-  usbvendor  = "";
-  usbproduct = "";
-  usbsn      = "";
-#ISP-signals 
-  reset  = 3;
-  sck    = 0;
-  mosi   = 1;
-  miso   = 2;
-  buff   = ~4;
-#LED SIGNALs 
-  errled = ~ 11;
-  rdyled = ~ 14;
-  pgmled = ~ 13;
-  vfyled = ~ 12;
+#   usbpid                 = 0x8A48;
+    usbpid                 = 0x6010;
+    usbdev                 = "A";
+    buff                   = ~4;
+#ISP-signals
+    reset                  = 3;
+    sck                    = 0;
+    mosi                   = 1;
+    miso                   = 2;
+#LED SIGNALs
+    errled                 = ~11;
+    rdyled                 = ~14;
+    pgmled                 = ~13;
+    vfyled                 = ~12;
 ;
 
+#------------------------------------------------------------
+# 4232h
+#------------------------------------------------------------
+
 #The FT4232H can be treated as FT2232H, but it has a different USB
 #device ID of 0x6011.
+
 programmer parent "avrftdi"
-  id         = "4232h";
-  desc       = "FT4232H based generic programmer";
-  usbpid     = 0x6011;
+    id                     = "4232h";
+    desc                   = "FT4232H based generic programmer";
+    usbpid                 = 0x6011;
 ;
 
-programmer
-  id         = "jtagkey";
-  desc       = "Amontec JTAGKey, JTAGKey-Tiny and JTAGKey2";
-  type       = "avrftdi";
-  connection_type = usb;
-  usbvid     = 0x0403;
-# Note: This PID is used in all JTAGKey variants
-  usbpid     = 0xCFF8;
-  usbdev     = "A";
-  usbvendor  = "";
-  usbproduct = "";
-  usbsn      = "";
-#ISP-signals => 20 - Pin connector on JTAGKey
-  reset  = 3; # TMS 7 violet
-  sck    = 0; # TCK 9 white
-  mosi   = 1; # TDI 5 green
-  miso   = 2; # TDO 13 orange
-  buff   = ~4;
-# VTG           VREF 1 brown with red tip
-# GND           GND 20 black
-# The colors are on the 20 pin breakout cable
-# from Amontec
-;
+#------------------------------------------------------------
+# jtagkey
+#------------------------------------------------------------
 
 programmer
-  id         = "ft232h";
-  desc       = "FT232H in MPSSE mode";
-  type       = "avrftdi";
-  connection_type = usb;
-  usbvid     = 0x0403;
-  usbpid     = 0x6014;
-  usbdev     = "A";
-  usbvendor  = "";
-  usbproduct = "";
-  usbsn      = "";
+    id                     = "jtagkey";
+    desc                   = "Amontec JTAGKey, JTAGKey-Tiny and JTAGKey2";
+    type                   = "avrftdi";
+    connection_type        = usb;
+    usbvid                 = 0x0403;
+#   Note: This PID is used in all JTAGKey variants
+    usbpid                 = 0xcff8;
+    usbdev                 = "A";
+    buff                   = ~4;
+#   ISP-signals => 20 - Pin connector on JTAGKey
+    reset                  = 3; # TMS 7 violet
+    sck                    = 0; # TCK 9 white
+    mosi                   = 1; # TDI 5 green
+    miso                   = 2; # TDO 13 orange
+#   VTG           VREF 1 brown with red tip
+#   GND           GND 20 black
+# The colors are on the 20 pin breakout cable from Amontec
+;
+
+#------------------------------------------------------------
+# ft232h
+#------------------------------------------------------------
+
+programmer
+    id                     = "ft232h";
+    desc                   = "FT232H in MPSSE mode";
+    type                   = "avrftdi";
+    connection_type        = usb;
+    usbvid                 = 0x0403;
+    usbpid                 = 0x6014;
+    usbdev                 = "A";
 #ISP-signals
-  sck    = 0; # AD0 (TCK)
-  mosi   = 1; # AD1 (TDI)
-  miso   = 2; # AD2 (TDO)
-  reset  = 3; # AD3 (TMS)
+    reset                  = 3; # AD3 (TMS)
+    sck                    = 0; # AD0 (TCK)
+    mosi                   = 1; # AD1 (TDI)
+    miso                   = 2; # AD2 (TDO)
 ;
 
+#------------------------------------------------------------
+# um232h
+#------------------------------------------------------------
+
 # Pin J2-7 (AD0) is SCK
 # Pin J2-8 (AD1) is MOSI
 # Pin J2-9 (AD2) is MISO
@@ -532,11 +871,17 @@ programmer
 # Pin J2-6 is GND
 # Use the -b flag to set the SPI clock rate eg -b 3750000 is the fastest I could get
 # a 16MHz Atmega1280 to program reliably.  The 232H is conveniently 5V tolerant.
+
 programmer parent "ft232h"
-  id    = "um232h";
-  desc  = "UM232H module from FTDI";
+    id                     = "um232h";
+    desc                   = "UM232H module from FTDI";
+    usbpid                 = 0x6014;
 ;
 
+#------------------------------------------------------------
+# c232hm
+#------------------------------------------------------------
+
 # Orange (Pin 2) is SCK
 # Yellow (Pin 3) is MOSI
 # Green (Pin 4) is MISO
@@ -544,14 +889,20 @@ programmer parent "ft232h"
 # Black (Pin 10) is GND
 # Use the -b flag to set the SPI clock rate eg -b 3750000 is the fastest I could get
 # a 16MHz Atmega1280 to program reliably.  The 232H is conveniently 5V tolerant.
+
 programmer parent "ft232h"
-  id    = "c232hm";
-  desc  = "C232HM cable from FTDI";
+    id                     = "c232hm";
+    desc                   = "C232HM cable from FTDI";
+    usbpid                 = 0x6014;
 ;
 
+#------------------------------------------------------------
+# o-link
+#------------------------------------------------------------
+
 # On the adapter you can read "O-Link". On the PCB is printed "OpenJTAG v3.1"
-# You can find it as "OpenJTAG ARM JTAG USB" in the internet. 
-# (But there are also several projects called Open JTAG, eg. 
+# You can find it as "OpenJTAG ARM JTAG USB" in the internet.
+# (But there are also several projects called Open JTAG, eg.
 # http://www.openjtag.org, which are completely different.)
 #   http://www.100ask.net/shop/english.html (website seems to be outdated)
 #   http://item.taobao.com/item.htm?id=1559277013
@@ -562,72 +913,86 @@ programmer parent "ft232h"
 #   http://armwerks.com/catalog/o-link-debugger-copy/
 # or just have a look at ebay ...
 # It is basically the same entry as jtagkey with different usb ids.
+
 programmer parent "jtagkey"
-  id         = "o-link";
-  desc       = "O-Link, OpenJTAG from www.100ask.net";
-  usbvid     = 0x1457;
-  usbpid     = 0x5118;
-  usbvendor  = "www.100ask.net";
-  usbproduct = "USB<=>JTAG&RS232";
+    id                     = "o-link";
+    desc                   = "O-Link, OpenJTAG from www.100ask.net";
+    usbvid                 = 0x1457;
+    usbpid                 = 0x5118;
+    usbvendor              = "www.100ask.net";
+    usbproduct             = "USB<=>JTAG&RS232";
 ;
 
+#------------------------------------------------------------
+# openmoko
+#------------------------------------------------------------
+
 # http://wiki.openmoko.org/wiki/Debug_Board_v3
+
 programmer
-  id    = "openmoko";
-  desc  = "Openmoko debug board (v3)";
-  type  = "avrftdi";
-  usbvid     = 0x1457;
-  usbpid    = 0x5118;
-  usbdev = "A";
-  usbvendor  = "";
-  usbproduct = "";
-  usbsn      = "";
-  reset  = 3; # TMS 7
-  sck    = 0; # TCK 9
-  mosi   = 1; # TDI 5
-  miso   = 2; # TDO 13
+    id                     = "openmoko";
+    desc                   = "Openmoko debug board (v3)";
+    type                   = "avrftdi";
+    usbvid                 = 0x1457;
+    usbpid                 = 0x5118;
+    usbdev                 = "A";
+    reset                  = 3; # TMS 7
+    sck                    = 0; # TCK 9
+    mosi                   = 1; # TDI 5
+    miso                   = 2; # TDO 13
 ;
 
+#------------------------------------------------------------
+# lm3s811
+#------------------------------------------------------------
+
 # Only Rev. A boards.
 # Schematic and user manual: http://www.cs.put.poznan.pl/wswitala/download/pdf/811EVBK.pdf
+
 programmer
-  id         = "lm3s811";
-  desc       = "Luminary Micro LM3S811 Eval Board (Rev. A)";
-  type       = "avrftdi";
-  connection_type = usb;
-  usbvid     = 0x0403;
-  usbpid     = 0xbcd9;
-  usbvendor  = "LMI";
-  usbproduct = "LM3S811 Evaluation Board";
-  usbdev     = "A";
-  usbsn      = "";
-#ISP-signals - lower ACBUS-Nibble (default)
-  reset  = 3;
-  sck    = 0;
-  mosi   = 1;
-  miso   = 2;
+    id                     = "lm3s811";
+    desc                   = "Luminary Micro LM3S811 Eval Board (Rev. A)";
+    type                   = "avrftdi";
+    connection_type        = usb;
+    usbvid                 = 0x0403;
+    usbpid                 = 0xbcd9;
+    usbdev                 = "A";
+    usbvendor              = "LMI";
+    usbproduct             = "LM3S811 Evaluation Board";
 # Enable correct buffers
-  buff   = 7;
+    buff                   = 7;
+#ISP-signals - lower ACBUS-Nibble (default)
+    reset                  = 3;
+    sck                    = 0;
+    mosi                   = 1;
+    miso                   = 2;
 ;
 
+#------------------------------------------------------------
+# tumpa
+#------------------------------------------------------------
+
 # submitted as bug #46020
+
 programmer
-  id     = "tumpa";
-  desc   = "TIAO USB Multi-Protocol Adapter";
-  type   = "avrftdi";
-  connection_type = usb;
-  usbvid = 0x0403;
-  usbpid = 0x8A98;
-  usbdev = "A";
-  usbvendor = "TIAO";
-  usbproduct = "";
-  usbsn  = "";
-  sck    = 0; # TCK 9
-  mosi   = 1; # TDI 5
-  miso   = 2; # TDO 13
-  reset  = 3; # TMS 7
+    id                     = "tumpa";
+    desc                   = "TIAO USB Multi-Protocol Adapter";
+    type                   = "avrftdi";
+    connection_type        = usb;
+    usbvid                 = 0x0403;
+    usbpid                 = 0x8a98;
+    usbdev                 = "A";
+    usbvendor              = "TIAO";
+    reset                  = 3; # TMS 7
+    sck                    = 0; # TCK 9
+    mosi                   = 1; # TDI 5
+    miso                   = 2; # TDO 13
 ;
 
+#------------------------------------------------------------
+# ktlink
+#------------------------------------------------------------
+
 # Kristech KT-LINK FT2232H interface with IO switching and voltage buffers.
 # Created on 20220410 by CeDeROM Tomasz CEDRO (www.cederom.io).
 # Interface DataSheet: https://kristech.pl/files/KT-LINK-UM-ENG.pdf
@@ -644,232 +1009,338 @@ programmer
 #  * Connect JTAG connector pin 1 to 5V (i.e. EXT pin 13 or JTAG pin 19).
 #  * For TPI connection use resistors: TDO --[470R]-- TPIDATA --[470R]-- TDI.
 #  * Powering target from JTAG pin 19 allows KT-LINK current measurement.
-programmer
-  id    = "ktlink";
-  desc  = "KT-LINK FT2232H interface with IO switching and voltage buffers.";
-  type  = "avrftdi";
-  connection_type = usb;
-  usbvid= 0x0403;
-  usbpid= 0xBBE2;
-  usbdev= "A";
-  reset = 8;
-  sck   = 0;
-  mosi  = 1;
-  miso  = 2;
-  buff  = ~10,~14,~13,5;
-  rdyled = ~15;
-;
 
 programmer
-  id    = "serialupdi";
-  desc  = "SerialUPDI";
-  type  = "serialupdi";
-  connection_type = serial;
-  hvupdi_support = 1;
+    id                     = "ktlink";
+    desc                   = "KT-LINK FT2232H interface with IO switching and voltage buffers.";
+    type                   = "avrftdi";
+    connection_type        = usb;
+    usbvid                 = 0x0403;
+    usbpid                 = 0xbbe2;
+    usbdev                 = "A";
+    buff                   = 5, ~10, ~13, ~14;
+    reset                  = 8;
+    sck                    = 0;
+    mosi                   = 1;
+    miso                   = 2;
+    rdyled                 = ~15;
 ;
 
-programmer
-  id    = "avrisp";
-  desc  = "Atmel AVR ISP";
-  type  = "stk500";
-  connection_type = serial;
-;
+#------------------------------------------------------------
+# serialupdi
+#------------------------------------------------------------
 
 programmer
-  id    = "avrispv2";
-  desc  = "Atmel AVR ISP V2";
-  type  =  "stk500v2";
-  connection_type = serial;
+    id                     = "serialupdi";
+    desc                   = "SerialUPDI";
+    type                   = "serialupdi";
+    connection_type        = serial;
+    hvupdi_support         = 1;
 ;
 
+#------------------------------------------------------------
+# avrisp
+#------------------------------------------------------------
+
 programmer
-  id    = "avrispmkII";
-  desc  = "Atmel AVR ISP mkII";
-  type  =  "stk500v2";
-  connection_type = usb;
+    id                     = "avrisp";
+    desc                   = "Atmel AVR ISP";
+    type                   = "stk500";
+    connection_type        = serial;
 ;
 
+#------------------------------------------------------------
+# avrispv2
+#------------------------------------------------------------
+
+programmer
+    id                     = "avrispv2";
+    desc                   = "Atmel AVR ISP V2";
+    type                   = "stk500v2";
+    connection_type        = serial;
+;
+
+#------------------------------------------------------------
+# avrispmkII
+#------------------------------------------------------------
+
+programmer
+    id                     = "avrispmkII";
+    desc                   = "Atmel AVR ISP mkII";
+    type                   = "stk500v2";
+    connection_type        = usb;
+;
+
+#------------------------------------------------------------
+# avrisp2
+#------------------------------------------------------------
+
 programmer parent "avrispmkII"
-  id    = "avrisp2";
+    id                     = "avrisp2";
 ;
 
-programmer
-  id    = "buspirate";
-  desc  = "The Bus Pirate";
-  type  = "buspirate";
-  connection_type = serial;
-;
+#------------------------------------------------------------
+# buspirate
+#------------------------------------------------------------
 
 programmer
-  id    = "buspirate_bb";
-  desc  = "The Bus Pirate (bitbang interface, supports TPI)";
-  type  = "buspirate_bb";
-  connection_type = serial;
+    id                     = "buspirate";
+    desc                   = "The Bus Pirate";
+    type                   = "buspirate";
+    connection_type        = serial;
+;
+
+#------------------------------------------------------------
+# buspirate_bb
+#------------------------------------------------------------
+
+programmer
+    id                     = "buspirate_bb";
+    desc                   = "The Bus Pirate (bitbang interface, supports TPI)";
+    type                   = "buspirate_bb";
+    connection_type        = serial;
   # pins are bits in bitbang byte (numbers are 87654321)
   # 1|POWER|PULLUP|AUX|MOSI|CLK|MISO|CS
-  reset  = 1;
-  sck    = 3;
-  mosi   = 4;
-  miso   = 2;
-  #vcc    = 7; This is internally set independent of this setting.
+    reset                  = 1;
+    sck                    = 3;
+    mosi                   = 4;
+    miso                   = 2;
+  # vcc                    = 7; # Internally set independent of this setting
 ;
 
+#------------------------------------------------------------
+# stk500
+#------------------------------------------------------------
+
 # This is supposed to be the "default" STK500 entry.
 # Attempts to select the correct firmware version
 # by probing for it.  Better use one of the entries
 # below instead.
-programmer
-  id    = "stk500";
-  desc  = "Atmel STK500";
-  type  = "stk500generic";
-  connection_type = serial;
-;
 
 programmer
-  id    = "stk500v1";
-  desc  = "Atmel STK500 Version 1.x firmware";
-  type  = "stk500";
-  connection_type = serial;
+    id                     = "stk500";
+    desc                   = "Atmel STK500";
+    type                   = "stk500generic";
+    connection_type        = serial;
 ;
 
-programmer
-  id    = "mib510";
-  desc  = "Crossbow MIB510 programming board";
-  type  = "stk500";
-  connection_type = serial;
-;
+#------------------------------------------------------------
+# stk500v1
+#------------------------------------------------------------
 
 programmer
-  id    = "stk500v2";
-  desc  = "Atmel STK500 Version 2.x firmware";
-  type  = "stk500v2";
-  connection_type = serial;
+    id                     = "stk500v1";
+    desc                   = "Atmel STK500 Version 1.x firmware";
+    type                   = "stk500";
+    connection_type        = serial;
 ;
 
-programmer
-  id    = "stk500pp";
-  desc  = "Atmel STK500 V2 in parallel programming mode";
-  type  = "stk500pp";
-  connection_type = serial;
-;
+#------------------------------------------------------------
+# mib510
+#------------------------------------------------------------
 
 programmer
-  id    = "stk500hvsp";
-  desc  = "Atmel STK500 V2 in high-voltage serial programming mode";
-  type  = "stk500hvsp";
-  connection_type = serial;
+    id                     = "mib510";
+    desc                   = "Crossbow MIB510 programming board";
+    type                   = "stk500";
+    connection_type        = serial;
 ;
 
-programmer
-  id    = "stk600";
-  desc  = "Atmel STK600";
-  type  = "stk600";
-  connection_type = usb;
-;
+#------------------------------------------------------------
+# stk500v2
+#------------------------------------------------------------
 
 programmer
-  id    = "stk600pp";
-  desc  = "Atmel STK600 in parallel programming mode";
-  type  = "stk600pp";
-  connection_type = usb;
+    id                     = "stk500v2";
+    desc                   = "Atmel STK500 Version 2.x firmware";
+    type                   = "stk500v2";
+    connection_type        = serial;
 ;
 
-programmer
-  id    = "stk600hvsp";
-  desc  = "Atmel STK600 in high-voltage serial programming mode";
-  type  = "stk600hvsp";
-  connection_type = usb;
-;
+#------------------------------------------------------------
+# stk500pp
+#------------------------------------------------------------
 
 programmer
-  id    = "avr910";
-  desc  = "Atmel Low Cost Serial Programmer";
-  type  = "avr910";
-  connection_type = serial;
+    id                     = "stk500pp";
+    desc                   = "Atmel STK500 V2 in parallel programming mode";
+    type                   = "stk500pp";
+    connection_type        = serial;
 ;
 
-programmer
-  id    = "ft245r";
-  desc  = "FT245R Synchronous BitBang";
-  type  = "ftdi_syncbb";
-  connection_type = usb;
-  miso  = 1; # D1
-  sck   = 0; # D0
-  mosi  = 2; # D2
-  reset = 4; # D4
-;
+#------------------------------------------------------------
+# stk500hvsp
+#------------------------------------------------------------
 
 programmer
-  id    = "ft232r";
-  desc  = "FT232R Synchronous BitBang";
-  type  = "ftdi_syncbb";
-  connection_type = usb;
-  miso  = 1;  # RxD
-  sck   = 0;  # TxD
-  mosi  = 2;  # RTS
-  reset = 4;  # DTR
+    id                     = "stk500hvsp";
+    desc                   = "Atmel STK500 V2 in high-voltage serial programming mode";
+    type                   = "stk500hvsp";
+    connection_type        = serial;
 ;
 
+#------------------------------------------------------------
+# stk600
+#------------------------------------------------------------
+
+programmer
+    id                     = "stk600";
+    desc                   = "Atmel STK600";
+    type                   = "stk600";
+    connection_type        = usb;
+;
+
+#------------------------------------------------------------
+# stk600pp
+#------------------------------------------------------------
+
+programmer
+    id                     = "stk600pp";
+    desc                   = "Atmel STK600 in parallel programming mode";
+    type                   = "stk600pp";
+    connection_type        = usb;
+;
+
+#------------------------------------------------------------
+# stk600hvsp
+#------------------------------------------------------------
+
+programmer
+    id                     = "stk600hvsp";
+    desc                   = "Atmel STK600 in high-voltage serial programming mode";
+    type                   = "stk600hvsp";
+    connection_type        = usb;
+;
+
+#------------------------------------------------------------
+# avr910
+#------------------------------------------------------------
+
+programmer
+    id                     = "avr910";
+    desc                   = "Atmel Low Cost Serial Programmer";
+    type                   = "avr910";
+    connection_type        = serial;
+;
+
+#------------------------------------------------------------
+# ft245r
+#------------------------------------------------------------
+
+programmer
+    id                     = "ft245r";
+    desc                   = "FT245R Synchronous BitBang";
+    type                   = "ftdi_syncbb";
+    connection_type        = usb;
+    reset                  = 4; # D4
+    sck                    = 0; # D0
+    mosi                   = 2; # D2
+    miso                   = 1; # D1
+;
+
+#------------------------------------------------------------
+# ft232r
+#------------------------------------------------------------
+
+programmer
+    id                     = "ft232r";
+    desc                   = "FT232R Synchronous BitBang";
+    type                   = "ftdi_syncbb";
+    connection_type        = usb;
+    reset                  = 4;  # DTR
+    sck                    = 0;  # TxD
+    mosi                   = 2;  # RTS
+    miso                   = 1;  # RxD
+;
+
+#------------------------------------------------------------
+# bwmega
+#------------------------------------------------------------
+
 # see http://www.bitwizard.nl/wiki/index.php/FTDI_ATmega
+
 programmer
-  id    = "bwmega";
-  desc  = "BitWizard ftdi_atmega builtin programmer";
-  type  = "ftdi_syncbb";
-  connection_type = usb;
-  miso  = 5;  # DSR
-  sck   = 6;  # DCD
-  mosi  = 3;  # CTS
-  reset = 7;  # RI
+    id                     = "bwmega";
+    desc                   = "BitWizard ftdi_atmega builtin programmer";
+    type                   = "ftdi_syncbb";
+    connection_type        = usb;
+    reset                  = 7;  # RI
+    sck                    = 6;  # DCD
+    mosi                   = 3;  # CTS
+    miso                   = 5;  # DSR
 ;
 
+#------------------------------------------------------------
+# arduino-ft232r
+#------------------------------------------------------------
+
 # see http://www.geocities.jp/arduino_diecimila/bootloader/index_en.html
 # Note: pins are numbered from 1!
-programmer
-  id    = "arduino-ft232r";
-  desc  = "Arduino: FT232R connected to ISP";
-  type  = "ftdi_syncbb";
-  connection_type = usb;
-  miso  = 3;  # CTS X3(1)
-  sck   = 5;  # DSR X3(2)
-  mosi  = 6;  # DCD X3(3)
-  reset = 7;  # RI  X3(4)
-;
 
 programmer
-  id    = "tc2030";
-  desc  = "Tag-Connect TC2030";
-  type  = "ftdi_syncbb";
-  connection_type = usb;
-  #                      FOR TPI devices:
-  mosi  = 0;  # TxD = D0 (wire to TPIDATA via 1k resistor)
-  miso  = 1;  # RxD = D1 (wire to TPIDATA directly)
-  sck   = 2;  # RTS = D2 (wire to SCK)
-  reset = 3;  # CTS = D3 (wire to ~RESET)
+    id                     = "arduino-ft232r";
+    desc                   = "Arduino: FT232R connected to ISP";
+    type                   = "ftdi_syncbb";
+    connection_type        = usb;
+    reset                  = 7;  # RI  X3(4)
+    sck                    = 5;  # DSR X3(2)
+    mosi                   = 6;  # DCD X3(3)
+    miso                   = 3;  # CTS X3(1)
 ;
 
+#------------------------------------------------------------
+# tc2030
+#------------------------------------------------------------
+
+programmer
+    id                     = "tc2030";
+    desc                   = "Tag-Connect TC2030";
+    type                   = "ftdi_syncbb";
+    connection_type        = usb;
+  #                      FOR TPI devices:
+    reset                  = 3;  # CTS = D3 (wire to ~RESET)
+    sck                    = 2;  # RTS = D2 (wire to SCK)
+    mosi                   = 0;  # TxD = D0 (wire to TPIDATA via 1k resistor)
+    miso                   = 1;  # RxD = D1 (wire to TPIDATA directly)
+;
+
+#------------------------------------------------------------
+# diecimila
+#------------------------------------------------------------
+
 # website mentioned above uses this id
+
 programmer parent "arduino-ft232r"
-  id    = "diecimila";
-  desc  = "alias for arduino-ft232r";
+    id                     = "diecimila";
+    desc                   = "alias for arduino-ft232r";
 ;
 
+#------------------------------------------------------------
+# uncompatino
+#------------------------------------------------------------
+
 # There is a ATmega328P kit PCB called "uncompatino".
 # This board allows ISP via its on-board FT232R.
 # This is designed like Arduino Duemilanove but has no standard ICPS header.
 # Its 4 pairs of pins are shorted to enable ftdi_syncbb.
 # http://akizukidenshi.com/catalog/g/gP-07487/
 # http://akizukidenshi.com/download/ds/akizuki/k6096_manual_20130816.pdf
+
 programmer
-  id    = "uncompatino";
-  desc  = "uncompatino with all pairs of pins shorted";
-  type  = "ftdi_syncbb";
-  connection_type = usb;
-  miso  = 3; # cts
-  sck   = 5; # dsr
-  mosi  = 6; # dcd
-  reset = 7; # ri
+    id                     = "uncompatino";
+    desc                   = "uncompatino with all pairs of pins shorted";
+    type                   = "ftdi_syncbb";
+    connection_type        = usb;
+    reset                  = 7; # ri
+    sck                    = 5; # dsr
+    mosi                   = 6; # dcd
+    miso                   = 3; # cts
 ;
 
+#------------------------------------------------------------
+# ttl232r
+#------------------------------------------------------------
+
 # FTDI USB to serial cable TTL-232R-5V with a custom adapter for ICSP
 # http://www.ftdichip.com/Products/Cables/USBTTLSerial.htm
 # http://www.ftdichip.com/Support/Documents/DataSheets/Cables/DS_TTL-232R_CABLES.pdf
@@ -881,818 +1352,847 @@ programmer
 # TTL-232R TXD 4 Orange -> ICPS RESET (pin 5)
 # TTL-232R RXD 5 Yellow -> ICPS SCK   (pin 3)
 # TTL-232R RTS 6 Green  -> ICPS MISO  (pin 1)
-# Except for VCC and GND, you can connect arbitual pairs as long as 
+# Except for VCC and GND, you can connect arbitual pairs as long as
 # the following table is adjusted.
+
 programmer
-  id    = "ttl232r";
-  desc  = "FTDI TTL232R-5V with ICSP adapter";
-  type  = "ftdi_syncbb";
-  connection_type = usb;
-  miso  = 2; # rts
-  sck   = 1; # rxd
-  mosi  = 3; # cts
-  reset = 0; # txd
+    id                     = "ttl232r";
+    desc                   = "FTDI TTL232R-5V with ICSP adapter";
+    type                   = "ftdi_syncbb";
+    connection_type        = usb;
+    reset                  = 0; # txd
+    sck                    = 1; # rxd
+    mosi                   = 3; # cts
+    miso                   = 2; # rts
 ;
 
-programmer
-  id    = "usbasp";
-  desc  = "USBasp, http://www.fischl.de/usbasp/";
-  type  = "usbasp";
-  connection_type = usb;
-  usbvid     = 0x16C0; # VOTI
-  usbpid     = 0x05DC; # Obdev's free shared PID
-  usbvendor  = "www.fischl.de";
-  usbproduct = "USBasp";
+#------------------------------------------------------------
+# usbasp
+#------------------------------------------------------------
 
+programmer
+    id                     = "usbasp";
+    desc                   = "USBasp, http://www.fischl.de/usbasp/";
+    type                   = "usbasp";
+    connection_type        = usb;
+    usbvid                 = 0x16c0; # VOTI
+    usbpid                 = 0x05dc; # Obdev's free shared PID
+    usbvendor              = "www.fischl.de";
+    usbproduct             = "USBasp";
   # following variants are autodetected for id "usbasp"
 
   # original usbasp from fischl.de
   # see above "usbasp"
 
   # old usbasp from fischl.de
-  #usbvid     = 0x03EB; # ATMEL
-  #usbpid     = 0xC7B4; # (unoffical) USBasp
-  #usbvendor  = "www.fischl.de";
-  #usbproduct = "USBasp";
+  # usbvid                 = 0x03EB; # ATMEL
+  # usbpid                 = 0xC7B4; # (unoffical) USBasp
+  # usbvendor              = "www.fischl.de";
+  # usbproduct             = "USBasp";
 
   # NIBObee (only if -P nibobee is given on command line)
   # see below "nibobee"
 ;
 
-programmer
-  id    = "nibobee";
-  desc  = "NIBObee";
-  type  = "usbasp";
-  connection_type = usb;
-  usbvid     = 0x16C0; # VOTI
-  usbpid     = 0x092F; # NIBObee PID
-  usbvendor  = "www.nicai-systems.com";
-  usbproduct = "NIBObee";
-;
+#------------------------------------------------------------
+# nibobee
+#------------------------------------------------------------
 
 programmer
-  id    = "usbasp-clone";
-  desc  = "Any usbasp clone with correct VID/PID";
-  type  = "usbasp";
-  connection_type = usb;
-  usbvid    = 0x16C0; # VOTI
-  usbpid    = 0x05DC; # Obdev's free shared PID
-  #usbvendor  = "";
-  #usbproduct = "";
+    id                     = "nibobee";
+    desc                   = "NIBObee";
+    type                   = "usbasp";
+    connection_type        = usb;
+    usbvid                 = 0x16c0; # VOTI
+    usbpid                 = 0x092f; # NIBObee PID
+    usbvendor              = "www.nicai-systems.com";
+    usbproduct             = "NIBObee";
 ;
 
+#------------------------------------------------------------
+# usbasp-clone
+#------------------------------------------------------------
+
+programmer
+    id                     = "usbasp-clone";
+    desc                   = "Any usbasp clone with correct VID/PID";
+    type                   = "usbasp";
+    connection_type        = usb;
+    usbvid                 = 0x16c0; # VOTI
+    usbpid                 = 0x05dc; # Obdev's free shared PID
+;
+
+#------------------------------------------------------------
+# usbtiny
+#------------------------------------------------------------
+
 # USBtiny can also be used for TPI programming.
 # In that case, a resistor of 1 kOhm is needed between MISO and MOSI
 # pins of the connector, and MISO (pin 1 of the 6-pin connector)
 # connects to TPIDATA.
-programmer
-  id    = "usbtiny";
-  desc  = "USBtiny simple USB programmer, https://learn.adafruit.com/usbtinyisp";
-  type  = "usbtiny";
-  connection_type = usb;
-  usbvid     = 0x1781;
-  usbpid     = 0x0c9f;
-;
 
 programmer
-  id    = "arduinoisp";
-  desc  = "Arduino ISP Programmer";
-  type  = "usbtiny";
-  connection_type = usb;
-  usbvid     = 0x2341;
-  usbpid     = 0x0049;
+    id                     = "usbtiny";
+    desc                   = "USBtiny simple USB programmer, https://learn.adafruit.com/usbtinyisp";
+    type                   = "usbtiny";
+    connection_type        = usb;
+    usbvid                 = 0x1781;
+    usbpid                 = 0x0c9f;
 ;
 
+#------------------------------------------------------------
+# arduinoisp
+#------------------------------------------------------------
+
 programmer
-  id    = "arduinoisporg";
-  desc  = "Arduino ISP Programmer";
-  type  = "usbtiny";
-  connection_type = usb;
-  usbvid     = 0x2A03;
-  usbpid     = 0x0049;
+    id                     = "arduinoisp";
+    desc                   = "Arduino ISP Programmer";
+    type                   = "usbtiny";
+    connection_type        = usb;
+    usbvid                 = 0x2341;
+    usbpid                 = 0x0049;
 ;
 
+#------------------------------------------------------------
+# arduinoisporg
+#------------------------------------------------------------
+
+programmer
+    id                     = "arduinoisporg";
+    desc                   = "Arduino ISP Programmer";
+    type                   = "usbtiny";
+    connection_type        = usb;
+    usbvid                 = 0x2a03;
+    usbpid                 = 0x0049;
+;
+
+#------------------------------------------------------------
+# ehajo-isp
+#------------------------------------------------------------
+
 # commercial version of USBtiny, using a separate VID/PID
+
 programmer
-  id    = "ehajo-isp";
-  desc  = "avr-isp-programmer from eHaJo, http://www.eHaJo.de";
-  type  = "usbtiny";
-  connection_type = usb;
-  usbvid     = 0x16D0;
-  usbpid     = 0x0BA5;
+    id                     = "ehajo-isp";
+    desc                   = "avr-isp-programmer from eHaJo, http://www.eHaJo.de";
+    type                   = "usbtiny";
+    connection_type        = usb;
+    usbvid                 = 0x16d0;
+    usbpid                 = 0x0ba5;
 ;
 
+#------------------------------------------------------------
+# iseavrprog
+#------------------------------------------------------------
+
 # commercial version of USBtiny, using a separate VID/PID
 # https://github.com/IowaScaledEngineering/ckt-avrprogrammer
-programmer
-  id    = "iseavrprog";
-  desc  = "USBtiny-based programmer, https://iascaled.com";
-  type  = "usbtiny";
-  connection_type = usb;
-  usbvid     = 0x1209;
-  usbpid     = 0x6570;
-;
 
 programmer
-  id = "micronucleus";
-  desc = "Micronucleus Bootloader";
-  type = "micronucleus";
-  connection_type = usb;
-  usbvid = 0x16D0;
-  usbpid = 0x0753;
+    id                     = "iseavrprog";
+    desc                   = "USBtiny-based programmer, https://iascaled.com";
+    type                   = "usbtiny";
+    connection_type        = usb;
+    usbvid                 = 0x1209;
+    usbpid                 = 0x6570;
 ;
 
-programmer
-  id = "teensy";
-  desc = "Teensy Bootloader";
-  type = "teensy";
-  connection_type = usb;
-  usbvid = 0x16C0;
-  usbpid = 0x0478;
-;
+#------------------------------------------------------------
+# micronucleus
+#------------------------------------------------------------
 
 programmer
-  id    = "butterfly";
-  desc  = "Atmel Butterfly Development Board";
-  type  = "butterfly";
-  connection_type = serial;
+    id                     = "micronucleus";
+    desc                   = "Micronucleus Bootloader";
+    type                   = "micronucleus";
+    connection_type        = usb;
+    usbvid                 = 0x16d0;
+    usbpid                 = 0x0753;
 ;
 
-programmer
-  id    = "avr109";
-  desc  = "Atmel AppNote AVR109 Boot Loader";
-  type  = "butterfly";
-  connection_type = serial;
-;
+#------------------------------------------------------------
+# teensy
+#------------------------------------------------------------
 
 programmer
-  id    = "avr911";
-  desc  = "Atmel AppNote AVR911 AVROSP";
-  type  = "butterfly";
-  connection_type = serial;
+    id                     = "teensy";
+    desc                   = "Teensy Bootloader";
+    type                   = "teensy";
+    connection_type        = usb;
+    usbvid                 = 0x16c0;
+    usbpid                 = 0x0478;
 ;
- 
+
+#------------------------------------------------------------
+# butterfly
+#------------------------------------------------------------
+
+programmer
+    id                     = "butterfly";
+    desc                   = "Atmel Butterfly Development Board";
+    type                   = "butterfly";
+    connection_type        = serial;
+;
+
+#------------------------------------------------------------
+# avr109
+#------------------------------------------------------------
+
+programmer
+    id                     = "avr109";
+    desc                   = "Atmel AppNote AVR109 Boot Loader";
+    type                   = "butterfly";
+    connection_type        = serial;
+;
+
+#------------------------------------------------------------
+# avr911
+#------------------------------------------------------------
+
+programmer
+    id                     = "avr911";
+    desc                   = "Atmel AppNote AVR911 AVROSP";
+    type                   = "butterfly";
+    connection_type        = serial;
+;
+
+#------------------------------------------------------------
+# mkbutterfly
+#------------------------------------------------------------
+
 # suggested in http://forum.mikrokopter.de/topic-post48317.html
+
 programmer
-  id    = "mkbutterfly";
-  desc  = "Mikrokopter.de Butterfly";
-  type  = "butterfly_mk";
-  connection_type = serial;
+    id                     = "mkbutterfly";
+    desc                   = "Mikrokopter.de Butterfly";
+    type                   = "butterfly_mk";
+    connection_type        = serial;
 ;
 
+#------------------------------------------------------------
+# butterfly_mk
+#------------------------------------------------------------
+
 programmer parent "mkbutterfly"
-  id    = "butterfly_mk";
+    id                     = "butterfly_mk";
 ;
 
+#------------------------------------------------------------
+# jtagmkI
+#------------------------------------------------------------
+
 programmer
-  id    = "jtagmkI";
-  desc  = "Atmel JTAG ICE (mkI)";
-  baudrate = 115200;    # default is 115200
-  type  = "jtagmki";
-  connection_type = serial;
+    id                     = "jtagmkI";
+    desc                   = "Atmel JTAG ICE (mkI)";
+    type                   = "jtagmki";
+    connection_type        = serial;
+    baudrate               = 115200;    # default is 115200
 ;
 
+#------------------------------------------------------------
+# jtag1
+#------------------------------------------------------------
+
 # easier to type
+
 programmer parent "jtagmkI"
-  id    = "jtag1";
+    id                     = "jtag1";
 ;
 
+#------------------------------------------------------------
+# jtag1slow
+#------------------------------------------------------------
+
 # easier to type
+
 programmer parent "jtag1"
-  id    = "jtag1slow";
-  baudrate = 19200;
+    id                     = "jtag1slow";
+    baudrate               = 19200;
 ;
 
+#------------------------------------------------------------
+# jtagmkII
+#------------------------------------------------------------
+
 # The JTAG ICE mkII has both, serial and USB connectivity.  As it is
 # mostly used through USB these days (AVR Studio 5 only supporting it
 # that way), we make connection_type = usb the default.  Users are
 # still free to use a serial port with the -P option.
 
 programmer
-  id    = "jtagmkII";
-  desc  = "Atmel JTAG ICE mkII";
-  baudrate = 19200;    # default is 19200
-  type  = "jtagmkii";
-  connection_type = usb;
+    id                     = "jtagmkII";
+    desc                   = "Atmel JTAG ICE mkII";
+    type                   = "jtagmkii";
+    connection_type        = usb;
+    baudrate               = 19200;    # default is 19200
 ;
 
+#------------------------------------------------------------
+# jtag2slow
+#------------------------------------------------------------
+
 # easier to type
+
 programmer parent "jtagmkII"
-  id    = "jtag2slow";
+    id                     = "jtag2slow";
 ;
 
+#------------------------------------------------------------
+# jtag2fast
+#------------------------------------------------------------
+
 # JTAG ICE mkII @ 115200 Bd
+
 programmer parent "jtag2slow"
-  id    = "jtag2fast";
-  baudrate = 115200;
+    id                     = "jtag2fast";
+    baudrate               = 115200;
 ;
 
+#------------------------------------------------------------
+# jtag2
+#------------------------------------------------------------
+
 # make the fast one the default, people will love that
+
 programmer parent "jtag2fast"
-  id    = "jtag2";
+    id                     = "jtag2";
 ;
 
+#------------------------------------------------------------
+# jtag2isp
+#------------------------------------------------------------
+
 # JTAG ICE mkII in ISP mode
+
 programmer
-  id    = "jtag2isp";
-  desc  = "Atmel JTAG ICE mkII in ISP mode";
-  baudrate = 115200;
-  type  = "jtagmkii_isp";
-  connection_type = usb;
+    id                     = "jtag2isp";
+    desc                   = "Atmel JTAG ICE mkII in ISP mode";
+    type                   = "jtagmkii_isp";
+    connection_type        = usb;
+    baudrate               = 115200;
 ;
 
+#------------------------------------------------------------
+# jtag2dw
+#------------------------------------------------------------
+
 # JTAG ICE mkII in debugWire mode
+
 programmer
-  id    = "jtag2dw";
-  desc  = "Atmel JTAG ICE mkII in debugWire mode";
-  baudrate = 115200;
-  type  = "jtagmkii_dw";
-  connection_type = usb;
+    id                     = "jtag2dw";
+    desc                   = "Atmel JTAG ICE mkII in debugWire mode";
+    type                   = "jtagmkii_dw";
+    connection_type        = usb;
+    baudrate               = 115200;
 ;
 
-# JTAG ICE mkII in AVR32 mode
-programmer
-  id    = "jtagmkII_avr32";
-  desc  = "Atmel JTAG ICE mkII im AVR32 mode";
-  baudrate = 115200;
-  type  = "jtagmkii_avr32";
-  connection_type = usb;
-;
+#------------------------------------------------------------
+# jtagmkII_avr32
+#------------------------------------------------------------
 
 # JTAG ICE mkII in AVR32 mode
+
 programmer
-  id    = "jtag2avr32";
-  desc  = "Atmel JTAG ICE mkII im AVR32 mode";
-  baudrate = 115200;
-  type  = "jtagmkii_avr32";
-  connection_type = usb;
+    id                     = "jtagmkII_avr32";
+    desc                   = "Atmel JTAG ICE mkII im AVR32 mode";
+    type                   = "jtagmkii_avr32";
+    connection_type        = usb;
+    baudrate               = 115200;
 ;
 
+#------------------------------------------------------------
+# jtag2avr32
+#------------------------------------------------------------
+
+# JTAG ICE mkII in AVR32 mode
+
+programmer
+    id                     = "jtag2avr32";
+    desc                   = "Atmel JTAG ICE mkII im AVR32 mode";
+    type                   = "jtagmkii_avr32";
+    connection_type        = usb;
+    baudrate               = 115200;
+;
+
+#------------------------------------------------------------
+# jtag2pdi
+#------------------------------------------------------------
+
 # JTAG ICE mkII in PDI mode
+
 programmer
-  id    = "jtag2pdi";
-  desc  = "Atmel JTAG ICE mkII PDI mode";
-  baudrate = 115200;
-  type  = "jtagmkii_pdi";
-  connection_type = usb;
+    id                     = "jtag2pdi";
+    desc                   = "Atmel JTAG ICE mkII PDI mode";
+    type                   = "jtagmkii_pdi";
+    connection_type        = usb;
+    baudrate               = 115200;
 ;
 
+#------------------------------------------------------------
+# dragon_jtag
+#------------------------------------------------------------
+
 # AVR Dragon in JTAG mode
+
 programmer
-  id    = "dragon_jtag";
-  desc  = "Atmel AVR Dragon in JTAG mode";
-  baudrate = 115200;
-  type  = "dragon_jtag";
-  connection_type = usb;
+    id                     = "dragon_jtag";
+    desc                   = "Atmel AVR Dragon in JTAG mode";
+    type                   = "dragon_jtag";
+    connection_type        = usb;
+    baudrate               = 115200;
 ;
 
+#------------------------------------------------------------
+# dragon_isp
+#------------------------------------------------------------
+
 # AVR Dragon in ISP mode
+
 programmer
-  id    = "dragon_isp";
-  desc  = "Atmel AVR Dragon in ISP mode";
-  baudrate = 115200;
-  type  = "dragon_isp";
-  connection_type = usb;
+    id                     = "dragon_isp";
+    desc                   = "Atmel AVR Dragon in ISP mode";
+    type                   = "dragon_isp";
+    connection_type        = usb;
+    baudrate               = 115200;
 ;
 
+#------------------------------------------------------------
+# dragon_pp
+#------------------------------------------------------------
+
 # AVR Dragon in PP mode
+
 programmer
-  id    = "dragon_pp";
-  desc  = "Atmel AVR Dragon in PP mode";
-  baudrate = 115200;
-  type  = "dragon_pp";
-  connection_type = usb;
+    id                     = "dragon_pp";
+    desc                   = "Atmel AVR Dragon in PP mode";
+    type                   = "dragon_pp";
+    connection_type        = usb;
+    baudrate               = 115200;
 ;
 
+#------------------------------------------------------------
+# dragon_hvsp
+#------------------------------------------------------------
+
 # AVR Dragon in HVSP mode
+
 programmer
-  id    = "dragon_hvsp";
-  desc  = "Atmel AVR Dragon in HVSP mode";
-  baudrate = 115200;
-  type  = "dragon_hvsp";
-  connection_type = usb;
+    id                     = "dragon_hvsp";
+    desc                   = "Atmel AVR Dragon in HVSP mode";
+    type                   = "dragon_hvsp";
+    connection_type        = usb;
+    baudrate               = 115200;
 ;
 
+#------------------------------------------------------------
+# dragon_dw
+#------------------------------------------------------------
+
 # AVR Dragon in debugWire mode
+
 programmer
-  id    = "dragon_dw";
-  desc  = "Atmel AVR Dragon in debugWire mode";
-  baudrate = 115200;
-  type  = "dragon_dw";
-  connection_type = usb;
+    id                     = "dragon_dw";
+    desc                   = "Atmel AVR Dragon in debugWire mode";
+    type                   = "dragon_dw";
+    connection_type        = usb;
+    baudrate               = 115200;
 ;
 
+#------------------------------------------------------------
+# dragon_pdi
+#------------------------------------------------------------
+
 # AVR Dragon in PDI mode
-programmer
-  id    = "dragon_pdi";
-  desc  = "Atmel AVR Dragon in PDI mode";
-  baudrate = 115200;
-  type  = "dragon_pdi";
-  connection_type = usb;
-;
 
 programmer
-  id    = "jtag3";
-  desc  = "Atmel AVR JTAGICE3 in JTAG mode";
-  type  = "jtagice3";
-  connection_type = usb;
-  usbpid = 0x2110, 0x2140;
+    id                     = "dragon_pdi";
+    desc                   = "Atmel AVR Dragon in PDI mode";
+    type                   = "dragon_pdi";
+    connection_type        = usb;
+    baudrate               = 115200;
 ;
 
+#------------------------------------------------------------
+# jtag3
+#------------------------------------------------------------
+
 programmer
-  id    = "jtag3pdi";
-  desc  = "Atmel AVR JTAGICE3 in PDI mode";
-  type  = "jtagice3_pdi";
-  connection_type = usb;
-  usbpid = 0x2110, 0x2140;
+    id                     = "jtag3";
+    desc                   = "Atmel AVR JTAGICE3 in JTAG mode";
+    type                   = "jtagice3";
+    connection_type        = usb;
+    usbpid                 = 0x2110, 0x2140;
 ;
 
+#------------------------------------------------------------
+# jtag3pdi
+#------------------------------------------------------------
+
 programmer
-  id    = "jtag3updi";
-  desc  = "Atmel AVR JTAGICE3 in UPDI mode";
-  type  = "jtagice3_updi";
-  connection_type = usb;
-  usbpid = 0x2110, 0x2140;
-  hvupdi_support = 1;
+    id                     = "jtag3pdi";
+    desc                   = "Atmel AVR JTAGICE3 in PDI mode";
+    type                   = "jtagice3_pdi";
+    connection_type        = usb;
+    usbpid                 = 0x2110, 0x2140;
 ;
 
+#------------------------------------------------------------
+# jtag3updi
+#------------------------------------------------------------
+
 programmer
-  id    = "jtag3dw";
-  desc  = "Atmel AVR JTAGICE3 in debugWIRE mode";
-  type  = "jtagice3_dw";
-  connection_type = usb;
-  usbpid = 0x2110, 0x2140;
+    id                     = "jtag3updi";
+    desc                   = "Atmel AVR JTAGICE3 in UPDI mode";
+    type                   = "jtagice3_updi";
+    connection_type        = usb;
+    usbpid                 = 0x2110, 0x2140;
+    hvupdi_support         = 1;
 ;
 
+#------------------------------------------------------------
+# jtag3dw
+#------------------------------------------------------------
+
 programmer
-  id    = "jtag3isp";
-  desc  = "Atmel AVR JTAGICE3 in ISP mode";
-  type  = "jtagice3_isp";
-  connection_type = usb;
-  usbpid = 0x2110, 0x2140;
+    id                     = "jtag3dw";
+    desc                   = "Atmel AVR JTAGICE3 in debugWIRE mode";
+    type                   = "jtagice3_dw";
+    connection_type        = usb;
+    usbpid                 = 0x2110, 0x2140;
 ;
 
+#------------------------------------------------------------
+# jtag3isp
+#------------------------------------------------------------
+
 programmer
-  id    = "xplainedpro";
-  desc  = "Atmel AVR XplainedPro in JTAG mode";
-  type  = "jtagice3";
-  connection_type = usb;
-  usbpid = 0x2111;
+    id                     = "jtag3isp";
+    desc                   = "Atmel AVR JTAGICE3 in ISP mode";
+    type                   = "jtagice3_isp";
+    connection_type        = usb;
+    usbpid                 = 0x2110, 0x2140;
 ;
 
+#------------------------------------------------------------
+# xplainedpro
+#------------------------------------------------------------
+
 programmer
-  id    = "xplainedpro_updi";
-  desc  = "Atmel AVR XplainedPro in UPDI mode";
-  type  = "jtagice3_updi";
-  connection_type = usb;
-  usbpid = 0x2111;
-  hvupdi_support = 1;
+    id                     = "xplainedpro";
+    desc                   = "Atmel AVR XplainedPro in JTAG mode";
+    type                   = "jtagice3";
+    connection_type        = usb;
+    usbpid                 = 0x2111;
 ;
 
+#------------------------------------------------------------
+# xplainedpro_updi
+#------------------------------------------------------------
+
 programmer
-  id    = "xplainedmini";
-  desc  = "Atmel AVR XplainedMini in ISP mode";
-  type  = "jtagice3_isp";
-  connection_type = usb;
-  usbpid = 0x2145;
+    id                     = "xplainedpro_updi";
+    desc                   = "Atmel AVR XplainedPro in UPDI mode";
+    type                   = "jtagice3_updi";
+    connection_type        = usb;
+    usbpid                 = 0x2111;
+    hvupdi_support         = 1;
 ;
 
+#------------------------------------------------------------
+# xplainedmini
+#------------------------------------------------------------
+
 programmer
-  id    = "xplainedmini_dw";
-  desc  = "Atmel AVR XplainedMini in debugWIRE mode";
-  type  = "jtagice3_dw";
-  connection_type = usb;
-  usbpid = 0x2145;
+    id                     = "xplainedmini";
+    desc                   = "Atmel AVR XplainedMini in ISP mode";
+    type                   = "jtagice3_isp";
+    connection_type        = usb;
+    usbpid                 = 0x2145;
 ;
 
+#------------------------------------------------------------
+# xplainedmini_dw
+#------------------------------------------------------------
+
 programmer
-  id    = "xplainedmini_updi";
-  desc  = "Atmel AVR XplainedMini in UPDI mode";
-  type  = "jtagice3_updi";
-  connection_type = usb;
-  usbpid = 0x2145;
-  hvupdi_support = 1;
+    id                     = "xplainedmini_dw";
+    desc                   = "Atmel AVR XplainedMini in debugWIRE mode";
+    type                   = "jtagice3_dw";
+    connection_type        = usb;
+    usbpid                 = 0x2145;
 ;
 
+#------------------------------------------------------------
+# xplainedmini_updi
+#------------------------------------------------------------
+
 programmer
-  id    = "atmelice";
-  desc  = "Atmel-ICE (ARM/AVR) in JTAG mode";
-  type  = "jtagice3";
-  connection_type = usb;
-  usbpid = 0x2141;
+    id                     = "xplainedmini_updi";
+    desc                   = "Atmel AVR XplainedMini in UPDI mode";
+    type                   = "jtagice3_updi";
+    connection_type        = usb;
+    usbpid                 = 0x2145;
+    hvupdi_support         = 1;
 ;
 
+#------------------------------------------------------------
+# atmelice
+#------------------------------------------------------------
+
 programmer
-  id    = "atmelice_pdi";
-  desc  = "Atmel-ICE (ARM/AVR) in PDI mode";
-  type  = "jtagice3_pdi";
-  connection_type = usb;
-  usbpid = 0x2141;
+    id                     = "atmelice";
+    desc                   = "Atmel-ICE (ARM/AVR) in JTAG mode";
+    type                   = "jtagice3";
+    connection_type        = usb;
+    usbpid                 = 0x2141;
 ;
 
+#------------------------------------------------------------
+# atmelice_pdi
+#------------------------------------------------------------
+
 programmer
-  id    = "atmelice_updi";
-  desc  = "Atmel-ICE (ARM/AVR) in UPDI mode";
-  type  = "jtagice3_updi";
-  connection_type = usb;
-  usbpid = 0x2141;
-  hvupdi_support = 1;
+    id                     = "atmelice_pdi";
+    desc                   = "Atmel-ICE (ARM/AVR) in PDI mode";
+    type                   = "jtagice3_pdi";
+    connection_type        = usb;
+    usbpid                 = 0x2141;
 ;
 
+#------------------------------------------------------------
+# atmelice_updi
+#------------------------------------------------------------
+
 programmer
-  id    = "atmelice_dw";
-  desc  = "Atmel-ICE (ARM/AVR) in debugWIRE mode";
-  type  = "jtagice3_dw";
-  connection_type = usb;
-  usbpid = 0x2141;
+    id                     = "atmelice_updi";
+    desc                   = "Atmel-ICE (ARM/AVR) in UPDI mode";
+    type                   = "jtagice3_updi";
+    connection_type        = usb;
+    usbpid                 = 0x2141;
+    hvupdi_support         = 1;
 ;
 
+#------------------------------------------------------------
+# atmelice_dw
+#------------------------------------------------------------
+
 programmer
-  id    = "atmelice_isp";
-  desc  = "Atmel-ICE (ARM/AVR) in ISP mode";
-  type  = "jtagice3_isp";
-  connection_type = usb;
-  usbpid = 0x2141;
+    id                     = "atmelice_dw";
+    desc                   = "Atmel-ICE (ARM/AVR) in debugWIRE mode";
+    type                   = "jtagice3_dw";
+    connection_type        = usb;
+    usbpid                 = 0x2141;
 ;
 
+#------------------------------------------------------------
+# atmelice_isp
+#------------------------------------------------------------
+
 programmer
-  id    = "powerdebugger";
-  desc  = "Atmel PowerDebugger (ARM/AVR) in JTAG mode";
-  type  = "jtagice3";
-  connection_type = usb;
-  usbpid = 0x2144;
+    id                     = "atmelice_isp";
+    desc                   = "Atmel-ICE (ARM/AVR) in ISP mode";
+    type                   = "jtagice3_isp";
+    connection_type        = usb;
+    usbpid                 = 0x2141;
 ;
 
+#------------------------------------------------------------
+# powerdebugger
+#------------------------------------------------------------
+
 programmer
-  id    = "powerdebugger_pdi";
-  desc  = "Atmel PowerDebugger (ARM/AVR) in PDI mode";
-  type  = "jtagice3_pdi";
-  connection_type = usb;
-  usbpid = 0x2144;
+    id                     = "powerdebugger";
+    desc                   = "Atmel PowerDebugger (ARM/AVR) in JTAG mode";
+    type                   = "jtagice3";
+    connection_type        = usb;
+    usbpid                 = 0x2144;
 ;
 
+#------------------------------------------------------------
+# powerdebugger_pdi
+#------------------------------------------------------------
+
 programmer
-  id    = "powerdebugger_updi";
-  desc  = "Atmel PowerDebugger (ARM/AVR) in UPDI mode";
-  type  = "jtagice3_updi";
-  connection_type = usb;
-  usbpid = 0x2144;
-  hvupdi_support = 0, 1;
+    id                     = "powerdebugger_pdi";
+    desc                   = "Atmel PowerDebugger (ARM/AVR) in PDI mode";
+    type                   = "jtagice3_pdi";
+    connection_type        = usb;
+    usbpid                 = 0x2144;
 ;
 
+#------------------------------------------------------------
+# powerdebugger_updi
+#------------------------------------------------------------
+
 programmer
-  id    = "powerdebugger_dw";
-  desc  = "Atmel PowerDebugger (ARM/AVR) in debugWire mode";
-  type  = "jtagice3_dw";
-  connection_type = usb;
-  usbpid = 0x2144;
+    id                     = "powerdebugger_updi";
+    desc                   = "Atmel PowerDebugger (ARM/AVR) in UPDI mode";
+    type                   = "jtagice3_updi";
+    connection_type        = usb;
+    usbpid                 = 0x2144;
+    hvupdi_support         = 0, 1;
 ;
 
+#------------------------------------------------------------
+# powerdebugger_dw
+#------------------------------------------------------------
+
 programmer
-  id    = "powerdebugger_isp";
-  desc  = "Atmel PowerDebugger (ARM/AVR) in ISP mode";
-  type  = "jtagice3_isp";
-  connection_type = usb;
-  usbpid = 0x2144;
+    id                     = "powerdebugger_dw";
+    desc                   = "Atmel PowerDebugger (ARM/AVR) in debugWire mode";
+    type                   = "jtagice3_dw";
+    connection_type        = usb;
+    usbpid                 = 0x2144;
 ;
 
+#------------------------------------------------------------
+# powerdebugger_isp
+#------------------------------------------------------------
+
 programmer
-  id    = "pickit4_updi";
-  desc  = "MPLAB(R) PICkit 4 in UPDI mode";
-  type  = "jtagice3_updi";
-  connection_type = usb;
-  usbpid = 0x2177, 0x2178, 0x2179;
-  hvupdi_support = 0, 1, 2;
+    id                     = "powerdebugger_isp";
+    desc                   = "Atmel PowerDebugger (ARM/AVR) in ISP mode";
+    type                   = "jtagice3_isp";
+    connection_type        = usb;
+    usbpid                 = 0x2144;
 ;
 
+#------------------------------------------------------------
+# pickit4_updi
+#------------------------------------------------------------
+
 programmer
-  id    = "pickit4_pdi";
-  desc  = "MPLAB(R) PICkit 4 in PDI mode";
-  type  = "jtagice3_pdi";
-  connection_type = usb;
-  usbpid = 0x2177, 0x2178, 0x2179;
+    id                     = "pickit4_updi";
+    desc                   = "MPLAB(R) PICkit 4 in UPDI mode";
+    type                   = "jtagice3_updi";
+    connection_type        = usb;
+    usbpid                 = 0x2177, 0x2178, 0x2179;
+    hvupdi_support         = 0, 1, 2;
 ;
 
+#------------------------------------------------------------
+# pickit4_pdi
+#------------------------------------------------------------
+
 programmer
-   id    = "pickit4_isp";
-   desc  = "MPLAB(R) PICkit 4 in ISP mode";
-   type  = "jtagice3_isp";
-   connection_type = usb;
-   usbpid = 0x2177, 0x2178, 0x2179;
+    id                     = "pickit4_pdi";
+    desc                   = "MPLAB(R) PICkit 4 in PDI mode";
+    type                   = "jtagice3_pdi";
+    connection_type        = usb;
+    usbpid                 = 0x2177, 0x2178, 0x2179;
 ;
 
+#------------------------------------------------------------
+# pickit4_isp
+#------------------------------------------------------------
+
 programmer
-  id    = "snap_updi";
-  desc  = "MPLAB(R) SNAP in UPDI mode";
-  type  = "jtagice3_updi";
-  connection_type = usb;
-  usbpid = 0x217F, 0x2180, 0x2181;
-  hvupdi_support = 1;
+    id                     = "pickit4_isp";
+    desc                   = "MPLAB(R) PICkit 4 in ISP mode";
+    type                   = "jtagice3_isp";
+    connection_type        = usb;
+    usbpid                 = 0x2177, 0x2178, 0x2179;
 ;
 
+#------------------------------------------------------------
+# snap_updi
+#------------------------------------------------------------
+
 programmer
-  id    = "snap_pdi";
-  desc  = "MPLAB(R) SNAP in PDI mode";
-  type  = "jtagice3_pdi";
-  connection_type = usb;
-  usbpid = 0x217F, 0x2180, 0x2181;
+    id                     = "snap_updi";
+    desc                   = "MPLAB(R) SNAP in UPDI mode";
+    type                   = "jtagice3_updi";
+    connection_type        = usb;
+    usbpid                 = 0x217f, 0x2180, 0x2181;
+    hvupdi_support         = 1;
 ;
 
+#------------------------------------------------------------
+# snap_pdi
+#------------------------------------------------------------
+
 programmer
-  id    = "snap_isp";
-  desc  = "MPLAB(R) SNAP in ISP mode";
-  type  = "jtagice3_isp";
-  connection_type = usb;
-  usbpid = 0x217F, 0x2180, 0x2181;
+    id                     = "snap_pdi";
+    desc                   = "MPLAB(R) SNAP in PDI mode";
+    type                   = "jtagice3_pdi";
+    connection_type        = usb;
+    usbpid                 = 0x217f, 0x2180, 0x2181;
 ;
 
+#------------------------------------------------------------
+# snap_isp
+#------------------------------------------------------------
+
 programmer
-  id    = "pkobn_updi";
-  desc  = "Curiosity nano (nEDBG) in UPDI mode";
-  type  = "jtagice3_updi";
-  connection_type = usb;
-  usbpid = 0x2175;
-  hvupdi_support = 1;
+    id                     = "snap_isp";
+    desc                   = "MPLAB(R) SNAP in ISP mode";
+    type                   = "jtagice3_isp";
+    connection_type        = usb;
+    usbpid                 = 0x217f, 0x2180, 0x2181;
 ;
 
+#------------------------------------------------------------
+# pkobn_updi
+#------------------------------------------------------------
+
 programmer
-  id    = "pavr";
-  desc  = "Jason Kyle's pAVR Serial Programmer";
-  type  = "avr910";
-  connection_type = serial;
+    id                     = "pkobn_updi";
+    desc                   = "Curiosity nano (nEDBG) in UPDI mode";
+    type                   = "jtagice3_updi";
+    connection_type        = usb;
+    usbpid                 = 0x2175;
+    hvupdi_support         = 1;
 ;
 
+#------------------------------------------------------------
+# pavr
+#------------------------------------------------------------
+
 programmer
-  id    = "pickit2";
-  desc  = "MicroChip's PICkit2 Programmer";
-  type  = "pickit2";
-  connection_type = usb;
+    id                     = "pavr";
+    desc                   = "Jason Kyle's pAVR Serial Programmer";
+    type                   = "avr910";
+    connection_type        = serial;
 ;
 
+#------------------------------------------------------------
+# pickit2
+#------------------------------------------------------------
+
 programmer
-  id    = "flip1";
-  desc  = "FLIP USB DFU protocol version 1 (doc7618)";
-  type  = "flip1";
-  connection_type = usb;
+    id                     = "pickit2";
+    desc                   = "MicroChip's PICkit2 Programmer";
+    type                   = "pickit2";
+    connection_type        = usb;
 ;
 
+#------------------------------------------------------------
+# flip1
+#------------------------------------------------------------
+
 programmer
-  id    = "flip2";
-  desc  = "FLIP USB DFU protocol version 2 (AVR4023)";
-  type  = "flip2";
-  connection_type = usb;
+    id                     = "flip1";
+    desc                   = "FLIP USB DFU protocol version 1 (doc7618)";
+    type                   = "flip1";
+    connection_type        = usb;
 ;
 
-@HAVE_PARPORT_BEGIN@
-# Parallel port programmers.
+#------------------------------------------------------------
+# flip2
+#------------------------------------------------------------
 
 programmer
-  id    = "bsd";
-  desc  = "Brian Dean's Programmer, http://www.bsdhome.com/avrdude/";
-  type  = "par";
-  connection_type = parallel;
-  vcc   = 2, 3, 4, 5;
-  reset = 7;
-  sck   = 8;
-  mosi  = 9;
-  miso  = 10;
+    id                     = "flip2";
+    desc                   = "FLIP USB DFU protocol version 2 (AVR4023)";
+    type                   = "flip2";
+    connection_type        = usb;
 ;
 
-programmer
-  id    = "stk200";
-  desc  = "STK200";
-  type  = "par";
-  connection_type = parallel;
-  buff  = 4, 5;
-  sck   = 6;
-  mosi  = 7;
-  reset = 9;
-  miso  = 10;
-;
+#------------------------------------------------------------
+# ponyser
+#------------------------------------------------------------
 
-# The programming dongle used by the popular Ponyprog
-# utility.  It is almost similar to the STK200 one,
-# except that there is a LED indicating that the
-# programming is currently in progress.
-
-programmer parent "stk200"
-  id    = "pony-stk200";
-  desc  = "Pony Prog STK200";
-  pgmled = 8; 
-;
-
-programmer
-  id    = "dt006";
-  desc  = "Dontronics DT006";
-  type  = "par";
-  connection_type = parallel;
-  reset = 4;
-  sck   = 5;
-  mosi  = 2;
-  miso  = 11;
-;
-
-programmer parent "dt006"
-  id    = "bascom";
-  desc  = "Bascom SAMPLE programming cable";
-;
-
-programmer
-  id     = "alf";
-  desc   = "Nightshade ALF-PgmAVR, http://nightshade.homeip.net/";
-  type   = "par";
-  connection_type = parallel;
-  vcc    = 2, 3, 4, 5;
-  buff   = 6;
-  reset  = 7;
-  sck    = 8;
-  mosi   = 9;
-  miso   = 10;
-  errled = 1;
-  rdyled = 14;
-  pgmled = 16;
-  vfyled = 17;
-;
-
-programmer
-  id    = "sp12";
-  desc  = "Steve Bolt's Programmer";
-  type  = "par";
-  connection_type = parallel;
-  vcc   = 4,5,6,7,8;
-  reset = 3;
-  sck   = 2;
-  mosi  = 9;
-  miso  = 11;
-;
-
-programmer
-  id     = "picoweb";
-  desc   = "Picoweb Programming Cable, http://www.picoweb.net/";
-  type   = "par";
-  connection_type = parallel;
-  reset  = 2;
-  sck    = 3;
-  mosi   = 4;
-  miso   = 13;
-;
-
-programmer
-  id    = "abcmini";
-  desc  = "ABCmini Board, aka Dick Smith HOTCHIP";
-  type  = "par";
-  connection_type = parallel;
-  reset = 4;
-  sck   = 3;
-  mosi  = 2;
-  miso  = 10;
-;
-
-programmer
-  id    = "futurlec";
-  desc  = "Futurlec.com programming cable.";
-  type  = "par";
-  connection_type = parallel;
-  reset = 3;
-  sck   = 2;
-  mosi  = 1;
-  miso  = 10;
-;
-
-
-# From the contributor of the "xil" jtag cable:
-# The "vcc" definition isn't really vcc (the cable gets its power from
-# the programming circuit) but is necessary to switch one of the
-# buffer lines (trying to add it to the "buff" lines doesn't work in 
-# avrdude versions before 5.5j).
-# With this, TMS connects to RESET, TDI to MOSI, TDO to MISO and TCK
-# to SCK (plus vcc/gnd of course)
-programmer
-  id    = "xil";
-  desc  = "Xilinx JTAG cable";
-  type  = "par";
-  connection_type = parallel;
-  mosi  = 2;
-  sck   = 3;
-  reset = 4;
-  buff  = 5;
-  miso  = 13;
-  vcc   = 6;
-;
-
-
-programmer
-  id = "dapa";
-  desc = "Direct AVR Parallel Access cable";
-  type = "par";
-  connection_type = parallel;
-  vcc   = 3;
-  reset = 16;
-  sck = 1;
-  mosi = 2;
-  miso = 11;
-;
-
-programmer
-  id    = "atisp";
-  desc  = "AT-ISP V1.1 programming cable for AVR-SDK1 from <http://micro-research.co.th/> micro-research.co.th";
-  type  = "par";
-  connection_type = parallel;
-  reset = ~6;
-  sck   = ~8;
-  mosi  = ~7;
-  miso  = ~10;
-;
-
-programmer
-  id    = "ere-isp-avr";
-  desc  = "ERE ISP-AVR <http://www.ere.co.th/download/sch050713.pdf>";
-  type  = "par";
-  connection_type = parallel;
-  reset = ~4;
-  sck   = 3;
-  mosi  = 2;
-  miso  = 10;
-;
-
-programmer
-  id    = "blaster";
-  desc  = "Altera ByteBlaster";
-  type  = "par";
-  connection_type = parallel;
-  sck   = 2;
-  miso  = 11;
-  reset = 3;
-  mosi  = 8;
-  buff  = 14;
-;
-
-# It is almost same as pony-stk200, except vcc on pin 5 to auto
-# disconnect port (download on http://electropol.free.fr/spip/spip.php?article27)
-programmer parent "pony-stk200"
-  id    = "frank-stk200";
-  desc  = "Frank STK200";
-  buff  = ; # delete buff pin assignment
-  vcc   = 5;
-;
-
-# The AT98ISP Cable is a simple parallel dongle for AT89 family.
-# http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2877
-programmer
-  id = "89isp";
-  desc = "Atmel at89isp cable";
-  type = "par";
-  connection_type = parallel;
-  reset = 17;
-  sck = 1;
-  mosi = 2;
-  miso = 10;
-;
-
-@HAVE_PARPORT_END@
-
-@HAVE_LINUXGPIO_BEGIN@
-#This programmer bitbangs GPIO lines using the Linux sysfs GPIO interface
-#
-#To enable it set the configuration below to match the GPIO lines connected to the
-#relevant ISP header pins and uncomment the entry definition. In case you don't
-#have the required permissions to edit this system wide config file put the
-#entry in a separate <your name>.conf file and use it with -C+<your name>.conf
-#on the command line.
-#
-#To check if your avrdude build has support for the linuxgpio programmer compiled in,
-#use -c?type on the command line and look for linuxgpio in the list. If it's not available
-#you need pass the --enable-linuxgpio=yes option to configure and recompile avrdude.
-#
-#programmer
-#  id    = "linuxgpio";
-#  desc  = "Use the Linux sysfs interface to bitbang GPIO lines";
-#  type  = "linuxgpio";
-#  reset = ?;
-#  sck   = ?;
-#  mosi  = ?;
-#  miso  = ?;
-#;
-@HAVE_LINUXGPIO_END@
-
-
-@HAVE_LINUXSPI_BEGIN@
-# This programmer uses the built in linux SPI bus devices to program an
-# attached AVR. The reset pin must be attached to a GPIO pin that
-# is otherwise unused (see gpioinfo(1)); the SPI bus CE pins are not
-# suitable since they would release /RESET too early.
-#
-programmer
-   id = "linuxspi";
-   desc = "Use Linux SPI device in /dev/spidev*";
-   type = "linuxspi";
-   connection_type = spi;
-   reset = 25;    # Pi GPIO number - this is J8:22
-;
-@HAVE_LINUXSPI_END@
-
-# some ultra cheap programmers use bitbanging on the 
-# serialport.
+# some ultra cheap programmers use bitbanging on the serialport
 #
 # PC - DB9 - Pins for RS232:
 #
@@ -1713,78 +2213,99 @@ programmer
 # reset=!txd sck=rts mosi=dtr miso=cts
 
 programmer
-  id    = "ponyser";
-  desc  = "design ponyprog serial, reset=!txd sck=rts mosi=dtr miso=cts";
-  type  = "serbb";
-  connection_type = serial;
-  reset = ~3;
-  sck   = 7;
-  mosi  = 4;
-  miso  = 8;
+    id                     = "ponyser";
+    desc                   = "design ponyprog serial, reset=!txd sck=rts mosi=dtr miso=cts";
+    type                   = "serbb";
+    connection_type        = serial;
+    reset                  = ~3;
+    sck                    = 7;
+    mosi                   = 4;
+    miso                   = 8;
 ;
 
+#------------------------------------------------------------
+# siprog
+#------------------------------------------------------------
+
 # Same as above, different name
 # reset=!txd sck=rts mosi=dtr miso=cts
 
 programmer parent "ponyser"
-  id    = "siprog";
-  desc  = "Lancos SI-Prog <http://www.lancos.com/siprogsch.html>";
+    id                     = "siprog";
+    desc                   = "Lancos SI-Prog <http://www.lancos.com/siprogsch.html>";
 ;
 
+#------------------------------------------------------------
+# dasa
+#------------------------------------------------------------
+
 # unknown (dasa in uisp)
 # reset=rts sck=dtr mosi=txd miso=cts
 
 programmer
-  id    = "dasa";
-  desc  = "serial port banging, reset=rts sck=dtr mosi=txd miso=cts";
-  type  = "serbb";
-  connection_type = serial;
-  reset = 7;
-  sck   = 4;
-  mosi  = 3;
-  miso  = 8;
+    id                     = "dasa";
+    desc                   = "serial port banging, reset=rts sck=dtr mosi=txd miso=cts";
+    type                   = "serbb";
+    connection_type        = serial;
+    reset                  = 7;
+    sck                    = 4;
+    mosi                   = 3;
+    miso                   = 8;
 ;
 
+#------------------------------------------------------------
+# dasa3
+#------------------------------------------------------------
+
 # unknown (dasa3 in uisp)
 # reset=!dtr sck=rts mosi=txd miso=cts
 
 programmer
-  id    = "dasa3";
-  desc  = "serial port banging, reset=!dtr sck=rts mosi=txd miso=cts";
-  type  = "serbb";
-  connection_type = serial;
-  reset = ~4;
-  sck   = 7;
-  mosi  = 3;
-  miso  = 8;
+    id                     = "dasa3";
+    desc                   = "serial port banging, reset=!dtr sck=rts mosi=txd miso=cts";
+    type                   = "serbb";
+    connection_type        = serial;
+    reset                  = ~4;
+    sck                    = 7;
+    mosi                   = 3;
+    miso                   = 8;
 ;
 
+#------------------------------------------------------------
+# C2N232i
+#------------------------------------------------------------
+
 # C2N232i (jumper configuration "auto")
 # reset=dtr sck=!rts mosi=!txd miso=!cts
 
 programmer
-  id    = "c2n232i";
-  desc  = "serial port banging, reset=dtr sck=!rts mosi=!txd miso=!cts";
-  type  = "serbb";
-  connection_type = serial;
-  reset = 4;
-  sck   = ~7;
-  mosi  = ~3;
-  miso  = ~8;
+    id                     = "c2n232i";
+    desc                   = "serial port banging, reset=dtr sck=!rts mosi=!txd miso=!cts";
+    type                   = "serbb";
+    connection_type        = serial;
+    reset                  = 4;
+    sck                    = ~7;
+    mosi                   = ~3;
+    miso                   = ~8;
 ;
 
+#------------------------------------------------------------
+# jtag2updi
+#------------------------------------------------------------
+
 # JTAG2UPDI
 # https://github.com/ElTangas/jtag2updi
 
 programmer
-  id    = "jtag2updi";
-  desc  = "JTAGv2 to UPDI bridge";
-  type  = "jtagmkii_updi";
-  connection_type = serial;
-  baudrate = 115200;
-  hvupdi_support = 1;
+    id                     = "jtag2updi";
+    desc                   = "JTAGv2 to UPDI bridge";
+    type                   = "jtagmkii_updi";
+    connection_type        = serial;
+    baudrate               = 115200;
+    hvupdi_support         = 1;
 ;
 
+
 #
 # PART DEFINITIONS
 #
@@ -1796,62 +2317,58 @@ programmer
 # This is an HVSP-only device.
 
 part
-    id                  = "t11";
-    desc                = "ATtiny11";
-    stk500_devcode      = 0x11;
-    signature           = 0x1e 0x90 0x04;
-    chip_erase_delay    = 20000;
-
-    timeout		= 200;
-    hvsp_controlstack     =
-        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00,
+    desc                   = "ATtiny11";
+    id                     = "t11";
+    stk500_devcode         = 0x11;
+    chip_erase_delay       = 20000;
+    signature              = 0x1e 0x90 0x04;
+    serial                 = no;
+    timeout                = 200;
+    hvsp_controlstack      =
+        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x00,
         0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
-        0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
+        0x78, 0x00, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
         0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    hvspcmdexedelay     = 0;
-    synchcycles         = 6;
-    latchcycles         = 1;
-    togglevtg           = 1;
-    poweroffdelay       = 25;
-    resetdelayms        = 0;
-    resetdelayus        = 50;
-    hvleavestabdelay    = 100;
-    resetdelay          = 25;
-    chiperasepolltimeout = 40;
-    chiperasetime       = 0;
+    hventerstabdelay       = 100;
+    latchcycles            = 1;
+    togglevtg              = 1;
+    poweroffdelay          = 25;
+    resetdelayus           = 50;
+    hvleavestabdelay       = 100;
+    resetdelay             = 25;
+    chiperasepolltimeout   = 40;
     programfusepolltimeout = 25;
     programlockpolltimeout = 25;
+    synchcycles            = 6;
 
     memory "eeprom"
-        size            = 64;
-	blocksize	= 64;
-	readsize	= 256;
-	delay		= 5;
+        size               = 64;
+        delay              = 5;
+        blocksize          = 64;
+        readsize           = 256;
     ;
 
     memory "flash"
-        size            = 1024;
-	blocksize	= 128;
-	readsize	= 256;
-	delay		= 3;
-    ;
-
-    memory "signature"
-        size            = 3;
-    ;
-
-    memory "lock"
-        size            = 1;
-    ;
-
-    memory "calibration"
-        size            = 1;
+        size               = 1024;
+        delay              = 3;
+        blocksize          = 128;
+        readsize           = 256;
     ;
 
     memory "fuse"
-        size            = 1;
+        size               = 1;
+    ;
+
+    memory "lock"
+        size               = 1;
+    ;
+
+    memory "signature"
+        size               = 3;
+    ;
+
+    memory "calibration"
+        size               = 1;
     ;
 ;
 
@@ -1860,131 +2377,91 @@ part
 #------------------------------------------------------------
 
 part
-    id                  = "t12";
-    desc                = "ATtiny12";
-    stk500_devcode      = 0x12;
-    avr910_devcode      = 0x55;
-    signature           = 0x1e 0x90 0x05;
-    chip_erase_delay    = 20000;
-    pgm_enable          = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
-                          "x x x x  x x x x   x x x x  x x x x";
-
-    chip_erase          = "1 0 1 0  1 1 0 0   1 0 0 x  x x x x",
-                          "x x x x  x x x x   x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    hvsp_controlstack   =
-        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00,
+    desc                   = "ATtiny12";
+    id                     = "t12";
+    stk500_devcode         = 0x12;
+    avr910_devcode         = 0x55;
+    chip_erase_delay       = 20000;
+    signature              = 0x1e 0x90 0x05;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    hvsp_controlstack      =
+        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x00,
         0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
-        0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
+        0x78, 0x00, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
         0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
-    hventerstabdelay    = 100;
-    hvspcmdexedelay     = 0;
-    synchcycles         = 6;
-    latchcycles         = 1;
-    togglevtg           = 1;
-    poweroffdelay       = 25;
-    resetdelayms        = 0;
-    resetdelayus        = 50;
-    hvleavestabdelay    = 100;
-    resetdelay          = 25;
-    chiperasepolltimeout = 40;
-    chiperasetime       = 0;
+    hventerstabdelay       = 100;
+    latchcycles            = 1;
+    togglevtg              = 1;
+    poweroffdelay          = 25;
+    resetdelayus           = 50;
+    hvleavestabdelay       = 100;
+    resetdelay             = 25;
+    chiperasepolltimeout   = 40;
     programfusepolltimeout = 25;
     programlockpolltimeout = 25;
+    synchcycles            = 6;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        size            = 64;
-        min_write_delay = 9000;
-        max_write_delay = 20000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read            = "1  0  1  0   0  0  0  0    x x x x  x x x x",
-                          "x  x a5 a4  a3 a2 a1 a0    o o o o  o o o o";
-
-        write           = "1  1  0  0   0  0  0  0    x x x x  x x x x",
-                          "x  x a5 a4  a3 a2 a1 a0    i i i i  i i i i";
-
-	mode		= 0x04;
-	delay		= 8;
-	blocksize	= 64;
-	readsize	= 256;
+        size               = 64;
+        min_write_delay    = 9000;
+        max_write_delay    = 20000;
+        readback           = 0xff 0xff;
+        mode               = 4;
+        delay              = 8;
+        blocksize          = 64;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.xxxx--xxaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
     ;
 
     memory "flash"
-        size            = 1024;
-        min_write_delay = 4500;
-        max_write_delay = 20000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0  0  1  0   0  0  0  0",
-                          "  x  x  x  x   x  x  x a8",
-                          " a7 a6 a5 a4  a3 a2 a1 a0",
-                          "  o  o  o  o   o  o  o  o";
-
-        read_hi         = "  0  0  1  0   1  0  0  0",
-                          "  x  x  x  x   x  x  x a8",
-                          " a7 a6 a5 a4  a3 a2 a1 a0",
-                          "  o  o  o  o   o  o  o  o";
-
-        write_lo        = "  0  1  0  0   0  0  0  0",
-                          "  x  x  x  x   x  x  x a8",
-                          " a7 a6 a5 a4  a3 a2 a1 a0",
-                          "  i  i  i  i   i  i  i  i";
-
-        write_hi        = "  0  1  0  0   1  0  0  0",
-                          "  x  x  x  x   x  x  x a8",
-                          " a7 a6 a5 a4  a3 a2 a1 a0",
-                          "  i  i  i  i   i  i  i  i";
-
-	mode		= 0x04;
-	delay		= 5;
-	blocksize	= 128;
-	readsize	= 256;
-    ;
-
-    memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0    x x x x  x x x x",
-                          "0  0  0  0   0  0 a1 a0    o o o o  o o o o";
-    ;
-
-    memory "lock"
-        size            = 1;
-        read            = "0  1  0  1   1  0  0  0    x x x x  x x x x",
-                          "x  x  x  x   x  x  x  x    x x x x  x o o x";
-
-        write           = "1  0  1  0   1  1  0  0    1 1 1 1  1 i i 1",
-                          "x  x  x  x   x  x  x  x    x x x x  x x x x";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-    ;
-
-    memory "calibration"
-        size            = 1;
-        read            = "0  0  1  1   1  0  0  0    x x x x  x x x x",
-                          "0  0  0  0   0  0  0  0    o o o o  o o o o";
+        size               = 1024;
+        min_write_delay    = 4500;
+        max_write_delay    = 20000;
+        readback           = 0xff 0xff;
+        mode               = 4;
+        delay              = 5;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
+        write_lo           = "0100.0000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
+        write_hi           = "0100.1000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
     ;
 
     memory "fuse"
-        size            = 1;
-        read            = "0  1  0  1   0  0  0  0    x x x x  x x x x",
-                          "x  x  x  x   x  x  x  x    o o o o  o o o o";
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--xxxx.xxxx--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--101x.xxxx--xxxx.xxxx--iiii.iiii";
+    ;
 
-        write           = "1  0  1  0   1  1  0  0    1 0 1 x  x x x x",
-                          "x  x  x  x   x  x  x  x    i i i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--xxxx.xoox";
+        write              = "1010.1100--1111.1ii1--xxxx.xxxx--xxxx.xxxx";
+    ;
+
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--0000.00aa--oooo.oooo";
+    ;
+
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
     ;
 ;
 
@@ -1993,172 +2470,114 @@ part
 #------------------------------------------------------------
 
 part
-    id                  = "t13";
-    desc                = "ATtiny13";
-     has_debugwire = yes;
-     flash_instr   = 0xB4, 0x0E, 0x1E;
-     eeprom_instr  = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
-	             0xBC, 0x0E, 0xB4, 0x0E, 0xBA, 0x0D, 0xBB, 0xBC,
-	             0x99, 0xE1, 0xBB, 0xAC;
-    stk500_devcode      = 0x14;
-    signature           = 0x1e 0x90 0x07;
-    chip_erase_delay    = 4000;
-    pgm_enable          = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
-                          "x x x x  x x x x   x x x x  x x x x";
-
-    chip_erase          = "1 0 1 0  1 1 0 0   1 0 0 x  x x x x",
-                          "x x x x  x x x x   x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    hvsp_controlstack     =
-	0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
-        0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
-        0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
+    desc                   = "ATtiny13";
+    id                     = "t13";
+    stk500_devcode         = 0x14;
+    chip_erase_delay       = 4000;
+    signature              = 0x1e 0x90 0x07;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    hvsp_controlstack      =
+        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x66,
+        0x68, 0x78, 0x68, 0x68, 0x7a, 0x6a, 0x68, 0x78,
+        0x78, 0x7d, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
         0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    hvspcmdexedelay     = 0;
-    synchcycles         = 6;
-    latchcycles         = 1;
-    togglevtg           = 1;
-    poweroffdelay       = 25;
-    resetdelayms        = 0;
-    resetdelayus        = 90;
-    hvleavestabdelay    = 100;
-    resetdelay          = 25;
-    chiperasepolltimeout = 40;
-    chiperasetime       = 0;
+    flash_instr            =  0xb4, 0x0e, 0x1e;
+    eeprom_instr           =
+        0xbb, 0xfe, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
+        0xbc, 0x0e, 0xb4, 0x0e, 0xba, 0x0d, 0xbb, 0xbc,
+        0x99, 0xe1, 0xbb, 0xac;
+    hventerstabdelay       = 100;
+    latchcycles            = 1;
+    togglevtg              = 1;
+    poweroffdelay          = 25;
+    resetdelayus           = 90;
+    hvleavestabdelay       = 100;
+    resetdelay             = 25;
+    chiperasepolltimeout   = 40;
     programfusepolltimeout = 25;
     programlockpolltimeout = 25;
-
-    ocdrev              = 0;
+    synchcycles            = 6;
+    ocdrev                 = 0;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        size            = 64;
-        page_size       = 4;
-        min_write_delay = 4000;
-        max_write_delay = 4000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read            = "1  0  1  0   0  0  0  0    0 0 0 x  x x x x",
-                          "x  x a5 a4  a3 a2 a1 a0    o o o o  o o o o";
-
-        write           = "1  1  0  0   0  0  0  0    0 0 0 x  x x x x",
-                          "x  x a5 a4  a3 a2 a1 a0    i i i i  i i i i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x   x   x",
-			  "  x   x  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 5;
-	blocksize	= 4;
-	readsize	= 256;
+        size               = 64;
+        page_size          = 4;
+        min_write_delay    = 4000;
+        max_write_delay    = 4000;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 5;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--000x.xxxx--xxaa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.xxxx--xxaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxx--xxaa.aa00--xxxx.xxxx";
     ;
 
     memory "flash"
-        paged           = yes;
-        size            = 1024;
-        page_size       = 32;
-        num_pages       = 32;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0  0  1  0   0  0  0  0",
-                          "  0  0  0  0   0  0  0 a8",
-                          " a7 a6 a5 a4  a3 a2 a1 a0",
-                          "  o  o  o  o   o  o  o  o";
-
-        read_hi         = "  0  0  1  0   1  0  0  0",
-                          "  0  0  0  0   0  0  0 a8",
-                          " a7 a6 a5 a4  a3 a2 a1 a0",
-                          "  o  o  o  o   o  o  o  o";
-
-        loadpage_lo     = "  0  1  0  0   0  0  0  0",
-                          "  0  0  0  x   x  x  x  x",
-                          "  x  x  x  x  a3 a2 a1 a0",
-                          "  i  i  i  i   i  i  i  i";
-
-        loadpage_hi     = "  0  1  0  0   1  0  0  0",
-                          "  0  0  0  x   x  x  x  x",
-                          "  x  x  x  x  a3 a2 a1 a0",
-                          "  i  i  i  i   i  i  i  i";
-
-        writepage       = "  0  1  0  0   1  1  0  0",
-                          "  0  0  0  0   0  0  0 a8",
-                          " a7 a6 a5 a4   x  x  x  x",
-                          "  x  x  x  x   x  x  x  x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 32;
-	readsize	= 256;
-    ;
-
-    memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0    0 0 0 x  x x x x",
-                          "x  x  x  x   x  x a1 a0    o o o o  o o o o";
-    ;
-
-    memory "lock"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-
-	read            = "0  1  0  1   1  0  0  0    0 0 0 0  0 0 0 0",
-                          "x  x  x  x   x  x  x  x    o o o o  o o o o";
-
-        write           = "1  0  1  0   1  1  0  0    1 1 1 x  x x x x",
-                          "x  x  x  x   x  x  x  x    1 1 i i  i i i i";
-    ;
-
-    memory "calibration"
-        size            = 2;
-        read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
-                          "0  0  0  0   0  0  0 a0    o o o o  o o o o";
+        paged              = yes;
+        size               = 1024;
+        page_size          = 32;
+        num_pages          = 32;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 32;
+        readsize           = 256;
+        read_lo            = "0010.0000--0000.000a--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0000.000a--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xxxx.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xxxx.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0000.000a--aaaa.xxxx--xxxx.xxxx";
     ;
 
     memory "lfuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-      ;
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+
+    memory "calibration"
+        size               = 2;
+        read               = "0011.1000--000x.xxxx--0000.000a--oooo.oooo";
+    ;
 ;
 
 #------------------------------------------------------------
@@ -2166,140 +2585,101 @@ part
 #------------------------------------------------------------
 
 part parent "t13"
-    id               = "t13a";
-    desc             = "ATtiny13A";
-  ;
+    desc                   = "ATtiny13A";
+    id                     = "t13a";
+;
 
 #------------------------------------------------------------
 # ATtiny15
 #------------------------------------------------------------
 
 part
-    id                  = "t15";
-    desc                = "ATtiny15";
-    stk500_devcode      = 0x13;
-    avr910_devcode      = 0x56;
-    signature           = 0x1e 0x90 0x06;
-    chip_erase_delay    = 8200;
-    pgm_enable          = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
-                          "x x x x  x x x x   x x x x  x x x x";
-
-    chip_erase          = "1 0 1 0  1 1 0 0   1 0 0 x  x x x x",
-                          "x x x x  x x x x   x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    hvsp_controlstack   =
-        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00,
+    desc                   = "ATtiny15";
+    id                     = "t15";
+    stk500_devcode         = 0x13;
+    avr910_devcode         = 0x56;
+    chip_erase_delay       = 8200;
+    signature              = 0x1e 0x90 0x06;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    hvsp_controlstack      =
+        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x00,
         0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
-        0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
+        0x78, 0x00, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
         0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
-    hventerstabdelay    = 100;
-    hvspcmdexedelay     = 5;
-    synchcycles         = 6;
-    latchcycles         = 16;
-    togglevtg           = 1;
-    poweroffdelay       = 25;
-    resetdelayms        = 0;
-    resetdelayus        = 50;
-    hvleavestabdelay    = 100;
-    resetdelay          = 25;
-    chiperasepolltimeout = 40;
-    chiperasetime       = 0;
+    hventerstabdelay       = 100;
+    latchcycles            = 16;
+    togglevtg              = 1;
+    poweroffdelay          = 25;
+    resetdelayus           = 50;
+    hvleavestabdelay       = 100;
+    resetdelay             = 25;
+    chiperasepolltimeout   = 40;
     programfusepolltimeout = 25;
     programlockpolltimeout = 25;
+    synchcycles            = 6;
+    hvspcmdexedelay        = 5;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        size            = 64;
-        min_write_delay = 8200;
-        max_write_delay = 8200;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read            = "1  0  1  0   0  0  0  0    x x x x  x x x x",
-                          "x  x a5 a4  a3 a2 a1 a0    o o o o  o o o o";
-
-        write           = "1  1  0  0   0  0  0  0    x x x x  x x x x",
-                          "x  x a5 a4  a3 a2 a1 a0    i i i i  i i i i";
-
-	mode		= 0x04;
-	delay		= 10;
-	blocksize	= 64;
-	readsize	= 256;
+        size               = 64;
+        min_write_delay    = 8200;
+        max_write_delay    = 8200;
+        readback           = 0xff 0xff;
+        mode               = 4;
+        delay              = 10;
+        blocksize          = 64;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.xxxx--xxaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
     ;
 
     memory "flash"
-        size            = 1024;
-        min_write_delay = 4100;
-        max_write_delay = 4100;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0  0  1  0   0  0  0  0",
-                          "  x  x  x  x   x  x  x a8",
-                          " a7 a6 a5 a4  a3 a2 a1 a0",
-                          "  o  o  o  o   o  o  o  o";
-
-        read_hi         = "  0  0  1  0   1  0  0  0",
-                          "  x  x  x  x   x  x  x a8",
-                          " a7 a6 a5 a4  a3 a2 a1 a0",
-                          "  o  o  o  o   o  o  o  o";
-
-        write_lo        = "  0  1  0  0   0  0  0  0",
-                          "  x  x  x  x   x  x  x a8",
-                          " a7 a6 a5 a4  a3 a2 a1 a0",
-                          "  i  i  i  i   i  i  i  i";
-
-        write_hi        = "  0  1  0  0   1  0  0  0",
-                          "  x  x  x  x   x  x  x a8",
-                          " a7 a6 a5 a4  a3 a2 a1 a0",
-                          "  i  i  i  i   i  i  i  i";
-
-	mode		= 0x04;
-	delay		= 5;
-	blocksize	= 128;
-	readsize	= 256;
-    ;
-
-    memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0    x x x x  x x x x",
-                          "0  0  0  0   0  0 a1 a0    o o o o  o o o o";
-    ;
-
-    memory "lock"
-        size            = 1;
-        read            = "0  1  0  1   1  0  0  0    x x x x  x x x x",
-                          "x  x  x  x   x  x  x  x    x x x x  x o o x";
-
-        write           = "1  0  1  0   1  1  0  0    1 1 1 1  1 i i 1",
-                          "x  x  x  x   x  x  x  x    x x x x  x x x x";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-    ;
-
-    memory "calibration"
-        size            = 1;
-        read            = "0  0  1  1   1  0  0  0    x x x x  x x x x",
-                          "0  0  0  0   0  0  0  0    o o o o  o o o o";
+        size               = 1024;
+        min_write_delay    = 4100;
+        max_write_delay    = 4100;
+        readback           = 0xff 0xff;
+        mode               = 4;
+        delay              = 5;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
+        write_lo           = "0100.0000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
+        write_hi           = "0100.1000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
     ;
 
     memory "fuse"
-        size            = 1;
-        read            = "0  1  0  1   0  0  0  0    x x x x  x x x x",
-                          "x  x  x  x   x  x  x  x    o o o o  x x o o";
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--xxxx.xxxx--xxxx.xxxx--oooo.xxoo";
+        write              = "1010.1100--101x.xxxx--xxxx.xxxx--iiii.11ii";
+    ;
 
-        write           = "1  0  1  0   1  1  0  0    1 0 1 x  x x x x",
-                          "x  x  x  x   x  x  x  x    i i i i  1 1 i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--xxxx.xoox";
+        write              = "1010.1100--1111.1ii1--xxxx.xxxx--xxxx.xxxx";
+    ;
+
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--0000.00aa--oooo.oooo";
+    ;
+
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
     ;
 ;
 
@@ -2308,5081 +2688,3356 @@ part
 #------------------------------------------------------------
 
 part
-    id               = "1200";
-    desc             = "AT90S1200";
-    is_at90s1200     = yes;
-    stk500_devcode   = 0x33;
-    avr910_devcode   = 0x13;
-    signature        = 0x1e 0x90 0x01;
-    pagel            = 0xd7;
-    bs2              = 0xa0;
-    chip_erase_delay = 20000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 1;
-    bytedelay		= 0;
-    pollindex		= 0;
-    pollvalue		= 0xFF;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 0;
-    togglevtg           = 0;
-    poweroffdelay       = 0;
-    resetdelayms        = 0;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 15;
-    chiperasepolltimeout = 0;
-    programfusepulsewidth = 2;
-    programfusepolltimeout = 0;
-    programlockpulsewidth = 0;
+    desc                   = "AT90S1200";
+    id                     = "1200";
+    stk500_devcode         = 0x33;
+    avr910_devcode         = 0x13;
+    chip_erase_delay       = 20000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x90 0x01;
+    is_at90s1200           = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 1;
+    pollvalue              = 0xff;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    hvleavestabdelay       = 15;
+    chiperasepulsewidth    = 15;
+    programfusepulsewidth  = 2;
     programlockpolltimeout = 1;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        size            = 64;
-        min_write_delay = 4000;
-        max_write_delay = 9000;
-        readback_p1     = 0x00;
-        readback_p2     = 0xff;
-        read            = "1 0  1  0   0  0  0  0   x x x x  x x x x", 
-                          "x x a5 a4  a3 a2 a1 a0   o o o o  o o o o";
+        size               = 64;
+        min_write_delay    = 4000;
+        max_write_delay    = 9000;
+        readback           = 0x00 0xff;
+        mode               = 4;
+        delay              = 20;
+        blocksize          = 32;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.xxxx--xxaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+    ;
 
-        write           = "1 1  0  0   0  0  0  0   x x x x  x x x x",
-                          "x x a5 a4  a3 a2 a1 a0   i i i i  i i i i";
-
-	mode		= 0x04;
-	delay		= 20;
-	blocksize	= 32;
-	readsize	= 256;
-      ;
     memory "flash"
-        size            = 1024;
-        min_write_delay = 4000;
-        max_write_delay = 9000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0    0   0   0   0",
-                          "  x   x   x   x    x   x   x  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
+        size               = 1024;
+        min_write_delay    = 4000;
+        max_write_delay    = 9000;
+        readback           = 0xff 0xff;
+        mode               = 2;
+        delay              = 15;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
+        write_lo           = "0100.0000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
+        write_hi           = "0100.1000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
+    ;
 
-        read_hi         = "  0   0   1   0    1   0   0   0",
-                          "  x   x   x   x    x   x   x  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        write_lo        = "  0   1   0   0    0   0   0   0",
-                          "  x   x   x   x    x   x   x  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  i   i   i   i    i   i   i   i";
-
-        write_hi        = "  0   1   0   0    1   0   0   0",
-                          "  x   x   x   x    x   x   x  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  i   i   i   i    i   i   i   i";
-
-	mode		= 0x02;
-	delay		= 15;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
-    memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
     memory "fuse"
-        size            = 1;
-      ;
+        size               = 1;
+    ;
+
     memory "lock"
-        size            = 1;
-        min_write_delay = 9000;
-        max_write_delay = 20000;
-        write           = "1 0 1 0  1 1 0 0   1 1 1 1  1 i i 1",
-                          "x x x x  x x x x   x x x x  x x x x";
-      ;
-  ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 20000;
+        write              = "1010.1100--1111.1ii1--xxxx.xxxx--xxxx.xxxx";
+    ;
+
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # AT90s4414
 #------------------------------------------------------------
 
 part
-    id               = "4414";
-    desc             = "AT90S4414";
-    stk500_devcode   = 0x50;
-    avr910_devcode   = 0x28;
-    signature        = 0x1e 0x92 0x01;
-    chip_erase_delay = 20000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 0;
-    togglevtg           = 0;
-    poweroffdelay       = 0;
-    resetdelayms        = 0;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 15;
-    chiperasepolltimeout = 0;
-    programfusepulsewidth = 2;
-    programfusepolltimeout = 0;
-    programlockpulsewidth = 0;
+    desc                   = "AT90S4414";
+    id                     = "4414";
+    stk500_devcode         = 0x50;
+    avr910_devcode         = 0x28;
+    chip_erase_delay       = 20000;
+    signature              = 0x1e 0x92 0x01;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
+    hventerstabdelay       = 100;
+    hvleavestabdelay       = 15;
+    chiperasepulsewidth    = 15;
+    programfusepulsewidth  = 2;
     programlockpolltimeout = 1;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        size            = 256;
-        min_write_delay = 9000;
-        max_write_delay = 20000;
-        readback_p1     = 0x80;
-        readback_p2     = 0x7f;
-        read            = " 1  0  1  0   0  0  0  0  x x x x  x x x a8", 
-                          "a7 a6 a5 a4 a3 a2 a1 a0   o o o o  o o o o";
+        size               = 256;
+        min_write_delay    = 9000;
+        max_write_delay    = 20000;
+        readback           = 0x80 0x7f;
+        mode               = 4;
+        delay              = 12;
+        blocksize          = 64;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
+    ;
 
-        write           = " 1  1  0  0   0  0  0  0   x x x x  x x x a8",
-                          "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
-
-	mode		= 0x04;
-	delay		= 12;
-	blocksize	= 64;
-	readsize	= 256;
-      ;
     memory "flash"
-        size            = 4096;
-        min_write_delay = 9000;
-        max_write_delay = 20000;
-        readback_p1     = 0x7f;
-        readback_p2     = 0x7f;
-        read_lo         = "  0   0   1   0    0   0   0   0",
-                          "  x   x   x   x  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
+        size               = 4096;
+        min_write_delay    = 9000;
+        max_write_delay    = 20000;
+        readback           = 0x7f 0x7f;
+        mode               = 4;
+        delay              = 12;
+        blocksize          = 64;
+        readsize           = 256;
+        read_lo            = "0010.0000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
+        write_lo           = "0100.0000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
+        write_hi           = "0100.1000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
+    ;
 
-        read_hi         = "  0   0   1   0    1   0   0   0",
-                          "  x   x   x   x  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        write_lo        = "  0   1   0   0    0   0   0   0",
-                          "  x   x   x   x  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  i   i   i   i    i   i   i   i";
-
-        write_hi        = "  0   1   0   0    1   0   0   0",
-                          "  x   x   x   x  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  i   i   i   i    i   i   i   i";
-
-	mode		= 0x04;
-	delay		= 12;
-	blocksize	= 64;
-	readsize	= 256;
-      ;
-    memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
     memory "fuse"
-	size		= 1;
-      ;
+        size               = 1;
+    ;
+
     memory "lock"
-	size		= 1;
-	write		= "1  0  1  0   1  1  0  0   1  1  1  1   1  i  i  1",
-			  "x  x  x  x   x  x  x  x   x  x  x  x   x  x  x  x";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
-  ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        write              = "1010.1100--1111.1ii1--xxxx.xxxx--xxxx.xxxx";
+    ;
+
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # AT90s2313
 #------------------------------------------------------------
 
 part
-    id               = "2313";
-    desc             = "AT90S2313";
-    stk500_devcode   = 0x40;
-    avr910_devcode   = 0x20;
-    signature        = 0x1e 0x91 0x01;
-    chip_erase_delay = 20000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 0;
-    togglevtg           = 0;
-    poweroffdelay       = 0;
-    resetdelayms        = 0;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 15;
-    chiperasepolltimeout = 0;
-    programfusepulsewidth = 2;
-    programfusepolltimeout = 0;
-    programlockpulsewidth = 0;
+    desc                   = "AT90S2313";
+    id                     = "2313";
+    stk500_devcode         = 0x40;
+    avr910_devcode         = 0x20;
+    chip_erase_delay       = 20000;
+    signature              = 0x1e 0x91 0x01;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    hvleavestabdelay       = 15;
+    chiperasepulsewidth    = 15;
+    programfusepulsewidth  = 2;
     programlockpolltimeout = 1;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        size            = 128;
-        min_write_delay = 4000;
-        max_write_delay = 9000;
-        readback_p1     = 0x80;
-        readback_p2     = 0x7f;
-        read            = "1  0  1  0   0  0  0  0   x x x x  x x x x", 
-                          "x a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
+        size               = 128;
+        min_write_delay    = 4000;
+        max_write_delay    = 9000;
+        readback           = 0x80 0x7f;
+        mode               = 4;
+        delay              = 12;
+        blocksize          = 64;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.xxxx--xaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
+    ;
 
-        write           = "1  1  0  0   0  0  0  0   x x x x  x x x x",
-                          "x a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
-
-	mode		= 0x04;
-	delay		= 12;
-	blocksize	= 64;
-	readsize	= 256;
-      ;
     memory "flash"
-        size            = 2048;
-        min_write_delay = 4000;
-        max_write_delay = 9000;
-        readback_p1     = 0x7f;
-        readback_p2     = 0x7f;
-        read_lo         = "  0   0   1   0    0   0   0   0",
-                          "  x   x   x   x    x   x  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
+        size               = 2048;
+        min_write_delay    = 4000;
+        max_write_delay    = 9000;
+        readback           = 0x7f 0x7f;
+        mode               = 4;
+        delay              = 12;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--xxxx.xxaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--xxxx.xxaa--aaaa.aaaa--oooo.oooo";
+        write_lo           = "0100.0000--xxxx.xxaa--aaaa.aaaa--iiii.iiii";
+        write_hi           = "0100.1000--xxxx.xxaa--aaaa.aaaa--iiii.iiii";
+    ;
 
-        read_hi         = "  0   0   1   0    1   0   0   0",
-                          "  x   x   x   x    x   x  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        write_lo        = "  0   1   0   0    0   0   0   0",
-                          "  x   x   x   x    x   x  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  i   i   i   i    i   i   i   i";
-
-        write_hi        = "  0   1   0   0    1   0   0   0",
-                          "  x   x   x   x    x   x  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  i   i   i   i    i   i   i   i";
-
-	mode		= 0x04;
-	delay		= 12;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
-    memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
     memory "fuse"
-        size            = 1;
-      ;
+        size               = 1;
+    ;
+
     memory "lock"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 1 1 x  x i i x",
-                          "x x x x  x x x x  x x x x  x x x x";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
-  ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        write              = "1010.1100--111x.xiix--xxxx.xxxx--xxxx.xxxx";
+    ;
+
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # AT90s2333
 #------------------------------------------------------------
 
 part
-    id               = "2333";
 ##### WARNING: No XML file for device 'AT90S2333'! #####
-    desc             = "AT90S2333";
-    stk500_devcode   = 0x42;
-    avr910_devcode   = 0x34;
-    signature        = 0x1e 0x91 0x05;
-    chip_erase_delay = 20000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 0;
-    togglevtg           = 0;
-    poweroffdelay       = 0;
-    resetdelayms        = 0;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 15;
-    chiperasepolltimeout = 0;
-    programfusepulsewidth = 2;
-    programfusepolltimeout = 0;
-    programlockpulsewidth = 0;
+    desc                   = "AT90S2333";
+    id                     = "2333";
+    stk500_devcode         = 0x42;
+    avr910_devcode         = 0x34;
+    chip_erase_delay       = 20000;
+    signature              = 0x1e 0x91 0x05;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    hvleavestabdelay       = 15;
+    chiperasepulsewidth    = 15;
+    programfusepulsewidth  = 2;
     programlockpolltimeout = 1;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        size            = 128;
-        min_write_delay = 9000;
-        max_write_delay = 20000;
-        readback_p1     = 0x00;
-        readback_p2     = 0xff;
-        read            = "1  0  1  0   0  0  0  0   x x x x  x x x x", 
-                          "x a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
-
-        write           = "1  1  0  0   0  0  0  0   x x x x  x x x x",
-                          "x a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
-
-	mode		= 0x04;
-	delay		= 12;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
+        size               = 128;
+        min_write_delay    = 9000;
+        max_write_delay    = 20000;
+        readback           = 0x00 0xff;
+        mode               = 4;
+        delay              = 12;
+        blocksize          = 128;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.xxxx--xaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
+    ;
 
     memory "flash"
-        size            = 2048;
-        min_write_delay = 9000;
-        max_write_delay = 20000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0    0   0   0   0",
-                          "  x   x   x   x    x   x  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
+        size               = 2048;
+        min_write_delay    = 9000;
+        max_write_delay    = 20000;
+        readback           = 0xff 0xff;
+        mode               = 4;
+        delay              = 12;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--xxxx.xxaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--xxxx.xxaa--aaaa.aaaa--oooo.oooo";
+        write_lo           = "0100.0000--xxxx.xxaa--aaaa.aaaa--iiii.iiii";
+        write_hi           = "0100.1000--xxxx.xxaa--aaaa.aaaa--iiii.iiii";
+    ;
 
-        read_hi         = "  0   0   1   0    1   0   0   0",
-                          "  x   x   x   x    x   x  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
+    memory "fuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 20000;
+        pwroff_after_write = yes;
+        read               = "0101.0000--xxxx.xxxx--xxxx.xxxx--xxoo.oooo";
+        write              = "1010.1100--101i.iiii--xxxx.xxxx--xxxx.xxxx";
+    ;
 
-        write_lo        = "  0   1   0   0    0   0   0   0",
-                          "  x   x   x   x    x   x  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  i   i   i   i    i   i   i   i";
-
-        write_hi        = "  0   1   0   0    1   0   0   0",
-                          "  x   x   x   x    x   x  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  i   i   i   i    i   i   i   i";
-
-	mode		= 0x04;
-	delay		= 12;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 20000;
+        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--xxxx.xoox";
+        write              = "1010.1100--1111.1ii1--xxxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-    memory "fuse"
-        size            = 1;
-        min_write_delay = 9000;
-        max_write_delay = 20000;
-        pwroff_after_write = yes;
-        read            = "0 1 0 1  0 0 0 0   x x x x  x x x x",
-                          "x x x x  x x x x   x x o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 i  i i i i",
-                          "x x x x  x x x x   x x x x  x x x x";
-      ;
-    memory "lock"
-        size            = 1;
-        min_write_delay = 9000;
-        max_write_delay = 20000;
-        read            = "0 1 0 1  1 0 0 0   x x x x  x x x x",
-                          "x x x x  x x x x   x x x x  x o o x";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 1  1 i i 1",
-                          "x x x x  x x x x   x x x x  x x x x";
-      ;
-  ;
-
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # AT90s2343 (also AT90s2323 and ATtiny22)
 #------------------------------------------------------------
 
 part
-    id               = "2343";
-    desc             = "AT90S2343";
-    stk500_devcode   = 0x43;
-    avr910_devcode   = 0x4c;
-    signature        = 0x1e 0x91 0x03;
-    chip_erase_delay = 18000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    hvsp_controlstack   =
-        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00,
+    desc                   = "AT90S2343";
+    id                     = "2343";
+    stk500_devcode         = 0x43;
+    avr910_devcode         = 0x4c;
+    chip_erase_delay       = 18000;
+    signature              = 0x1e 0x91 0x03;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    hvsp_controlstack      =
+        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x00,
         0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
-        0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
+        0x78, 0x00, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
         0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
-    hventerstabdelay    = 100;
-    hvspcmdexedelay     = 0;
-    synchcycles         = 6;
-    latchcycles         = 1;
-    togglevtg           = 0;
-    poweroffdelay       = 25;
-    resetdelayms        = 0;
-    resetdelayus        = 50;
-    hvleavestabdelay    = 100;
-    resetdelay          = 25;
-    chiperasepolltimeout = 40;
-    chiperasetime       = 0;
+    hventerstabdelay       = 100;
+    latchcycles            = 1;
+    poweroffdelay          = 25;
+    resetdelayus           = 50;
+    hvleavestabdelay       = 100;
+    resetdelay             = 25;
+    chiperasepolltimeout   = 40;
     programfusepolltimeout = 25;
     programlockpolltimeout = 25;
+    synchcycles            = 6;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        size            = 128;
-        min_write_delay = 9000;
-        max_write_delay = 20000;
-        readback_p1     = 0x00;
-        readback_p2     = 0xff;
-        read            = "1  0  1  0   0  0  0  0   0 0 0 0  0 0 0 0", 
-                          "x a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
+        size               = 128;
+        min_write_delay    = 9000;
+        max_write_delay    = 20000;
+        readback           = 0x00 0xff;
+        mode               = 4;
+        delay              = 12;
+        blocksize          = 64;
+        readsize           = 256;
+        read               = "1010.0000--0000.0000--xaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--0000.0000--xaaa.aaaa--iiii.iiii";
+    ;
 
-        write           = "1  1  0  0   0  0  0  0   0 0 0 0  0 0 0 0",
-                          "x a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
-
-	mode		= 0x04;
-	delay		= 12;
-	blocksize	= 64;
-	readsize	= 256;
-      ;
     memory "flash"
-        size            = 2048;
-        min_write_delay = 9000;
-        max_write_delay = 20000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0    0   0   0   0",
-                          "  x   x   x   x    x   x  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
+        size               = 2048;
+        min_write_delay    = 9000;
+        max_write_delay    = 20000;
+        readback           = 0xff 0xff;
+        mode               = 4;
+        delay              = 12;
+        blocksize          = 128;
+        readsize           = 128;
+        read_lo            = "0010.0000--xxxx.xxaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--xxxx.xxaa--aaaa.aaaa--oooo.oooo";
+        write_lo           = "0100.0000--xxxx.xxaa--aaaa.aaaa--iiii.iiii";
+        write_hi           = "0100.1000--xxxx.xxaa--aaaa.aaaa--iiii.iiii";
+    ;
 
-        read_hi         = "  0   0   1   0    1   0   0   0",
-                          "  x   x   x   x    x   x  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        write_lo        = "  0   1   0   0    0   0   0   0",
-                          "  x   x   x   x    x   x  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  i   i   i   i    i   i   i   i";
-
-        write_hi        = "  0   1   0   0    1   0   0   0",
-                          "  x   x   x   x    x   x  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  i   i   i   i    i   i   i   i";
-
-	mode		= 0x04;
-	delay		= 12;
-	blocksize	= 128;
-	readsize	= 128;
-      ;
-    memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
     memory "fuse"
-        size            = 1;
-        min_write_delay = 9000;
-        max_write_delay = 20000;
-        read            = "0 1 0 1  1 0 0 0   x x x x  x x x x",
-                          "x x x x  x x x x   o o o x  x x x o";
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 20000;
+        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--ooox.xxxo";
+        write              = "1010.1100--1011.111i--xxxx.xxxx--xxxx.xxxx";
+    ;
 
-        write           = "1 0 1 0  1 1 0 0   1 0 1 1  1 1 1 i",
-                          "x x x x  x x x x   x x x x  x x x x";
-      ;
     memory "lock"
-        size            = 1;
-        min_write_delay = 9000;
-        max_write_delay = 20000;
-        read            = "0 1 0 1  1 0 0 0   x x x x  x x x x",
-                          "x x x x  x x x x   o o o x  x x x o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 1  1 i i 1",
-                          "x x x x  x x x x   x x x x  x x x x";
-      ;
-  ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 20000;
+        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--ooox.xxxo";
+        write              = "1010.1100--1111.1ii1--xxxx.xxxx--xxxx.xxxx";
+    ;
 
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # AT90s4433
 #------------------------------------------------------------
 
 part
-    id               = "4433";
-    desc             = "AT90S4433";
-    stk500_devcode   = 0x51;
-    avr910_devcode   = 0x30;
-    signature        = 0x1e 0x92 0x03;
-    chip_erase_delay = 20000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 0;
-    togglevtg           = 0;
-    poweroffdelay       = 0;
-    resetdelayms        = 0;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 15;
-    chiperasepolltimeout = 0;
-    programfusepulsewidth = 2;
-    programfusepolltimeout = 0;
-    programlockpulsewidth = 0;
+    desc                   = "AT90S4433";
+    id                     = "4433";
+    stk500_devcode         = 0x51;
+    avr910_devcode         = 0x30;
+    chip_erase_delay       = 20000;
+    signature              = 0x1e 0x92 0x03;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    hvleavestabdelay       = 15;
+    chiperasepulsewidth    = 15;
+    programfusepulsewidth  = 2;
     programlockpolltimeout = 1;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        size            = 256;
-        min_write_delay = 9000;
-        max_write_delay = 20000;
-        readback_p1     = 0x00;
-        readback_p2     = 0xff;
-        read            = " 1  0  1  0   0  0  0  0   x x x x  x x x x", 
-                          "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
+        size               = 256;
+        min_write_delay    = 9000;
+        max_write_delay    = 20000;
+        readback           = 0x00 0xff;
+        mode               = 4;
+        delay              = 12;
+        blocksize          = 128;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.xxxx--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xxxx--aaaa.aaaa--iiii.iiii";
+    ;
 
-        write           = " 1  1  0  0   0  0  0  0   x x x x  x x x x",
-                          "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
-
-	mode		= 0x04;
-	delay		= 12;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
     memory "flash"
-        size            = 4096;
-        min_write_delay = 9000;
-        max_write_delay = 20000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0    0   0   0   0",
-                          "  x   x   x   x    x a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
+        size               = 4096;
+        min_write_delay    = 9000;
+        max_write_delay    = 20000;
+        readback           = 0xff 0xff;
+        mode               = 4;
+        delay              = 12;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--xxxx.xaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--xxxx.xaaa--aaaa.aaaa--oooo.oooo";
+        write_lo           = "0100.0000--xxxx.xaaa--aaaa.aaaa--iiii.iiii";
+        write_hi           = "0100.1000--xxxx.xaaa--aaaa.aaaa--iiii.iiii";
+    ;
 
-        read_hi         = "  0   0   1   0    1   0   0   0",
-                          "  x   x   x   x    x a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        write_lo        = "  0   1   0   0    0   0   0   0",
-                          "  x   x   x   x    x a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  i   i   i   i    i   i   i   i";
-
-        write_hi        = "  0   1   0   0    1   0   0   0",
-                          "  x   x   x   x    x a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  i   i   i   i    i   i   i   i";
-
-	mode		= 0x04;
-	delay		= 12;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
-    memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
     memory "fuse"
-        size            = 1;
-        min_write_delay = 9000;
-        max_write_delay = 20000;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 20000;
         pwroff_after_write = yes;
-        read            = "0 1 0 1  0 0 0 0   x x x x  x x x x",
-                          "x x x x  x x x x   x x o o  o o o o";
+        read               = "0101.0000--xxxx.xxxx--xxxx.xxxx--xxoo.oooo";
+        write              = "1010.1100--101i.iiii--xxxx.xxxx--xxxx.xxxx";
+    ;
 
-        write           = "1 0 1 0  1 1 0 0   1 0 1 i  i i i i",
-                          "x x x x  x x x x   x x x x  x x x x";
-      ;
     memory "lock"
-        size            = 1;
-        min_write_delay = 9000;
-        max_write_delay = 20000;
-        read            = "0 1 0 1  1 0 0 0   x x x x  x x x x",
-                          "x x x x  x x x x   x x x x  x o o x";
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 20000;
+        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--xxxx.xoox";
+        write              = "1010.1100--1111.1ii1--xxxx.xxxx--xxxx.xxxx";
+    ;
 
-        write           = "1 0 1 0  1 1 0 0   1 1 1 1  1 i i 1",
-                          "x x x x  x x x x   x x x x  x x x x";
-      ;
-  ;
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # AT90s4434
 #------------------------------------------------------------
 
 part
-    id               = "4434";
 ##### WARNING: No XML file for device 'AT90S4434'! #####
-    desc             = "AT90S4434";
-    stk500_devcode   = 0x52;
-    avr910_devcode   = 0x6c;
-    signature        = 0x1e 0x92 0x02;
-    chip_erase_delay = 20000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
+    desc                   = "AT90S4434";
+    id                     = "4434";
+    stk500_devcode         = 0x52;
+    avr910_devcode         = 0x6c;
+    chip_erase_delay       = 20000;
+    signature              = 0x1e 0x92 0x02;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        size            = 256;
-        min_write_delay = 9000;
-        max_write_delay = 20000;
-        readback_p1     = 0x00;
-        readback_p2     = 0xff;
-        read            = " 1  0  1  0   0  0  0  0   x x x x  x x x x", 
-                          "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
+        size               = 256;
+        min_write_delay    = 9000;
+        max_write_delay    = 20000;
+        readback           = 0x00 0xff;
+        read               = "1010.0000--xxxx.xxxx--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xxxx--aaaa.aaaa--iiii.iiii";
+    ;
 
-        write           = " 1  1  0  0   0  0  0  0   x x x x  x x x x",
-                          "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
-      ;
     memory "flash"
-        size            = 4096;
-        min_write_delay = 9000;
-        max_write_delay = 20000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0    0   0   0   0",
-                          "  x   x   x   x    x a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
+        size               = 4096;
+        min_write_delay    = 9000;
+        max_write_delay    = 20000;
+        readback           = 0xff 0xff;
+        read_lo            = "0010.0000--xxxx.xaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--xxxx.xaaa--aaaa.aaaa--oooo.oooo";
+        write_lo           = "0100.0000--xxxx.xaaa--aaaa.aaaa--iiii.iiii";
+        write_hi           = "0100.1000--xxxx.xaaa--aaaa.aaaa--iiii.iiii";
+    ;
 
-        read_hi         = "  0   0   1   0    1   0   0   0",
-                          "  x   x   x   x    x a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        write_lo        = "  0   1   0   0    0   0   0   0",
-                          "  x   x   x   x    x a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  i   i   i   i    i   i   i   i";
-
-        write_hi        = "  0   1   0   0    1   0   0   0",
-                          "  x   x   x   x    x a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  i   i   i   i    i   i   i   i";
-      ;
-    memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
     memory "fuse"
-        size            = 1;
-        min_write_delay = 9000;
-        max_write_delay = 20000;
-        read            = "0 1 0 1  0 0 0 0   x x x x  x x x x",
-                          "x x x x  x x x x   x x o o  o o o o";
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 20000;
+        read               = "0101.0000--xxxx.xxxx--xxxx.xxxx--xxoo.oooo";
+        write              = "1010.1100--101i.iiii--xxxx.xxxx--xxxx.xxxx";
+    ;
 
-        write           = "1 0 1 0  1 1 0 0   1 0 1 i  i i i i",
-                          "x x x x  x x x x   x x x x  x x x x";
-      ;
     memory "lock"
-        size            = 1;
-        min_write_delay = 9000;
-        max_write_delay = 20000;
-        read            = "0 1 0 1  1 0 0 0   x x x x  x x x x",
-                          "x x x x  x x x x   x x x x  x o o x";
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 20000;
+        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--xxxx.xoox";
+        write              = "1010.1100--1111.1ii1--xxxx.xxxx--xxxx.xxxx";
+    ;
 
-        write           = "1 0 1 0  1 1 0 0   1 1 1 1  1 i i 1",
-                          "x x x x  x x x x   x x x x  x x x x";
-      ;
-  ;
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # AT90s8515
 #------------------------------------------------------------
 
 part
-    id               = "8515";
-    desc             = "AT90S8515";
-    stk500_devcode   = 0x60;
-    avr910_devcode   = 0x38;
-    signature        = 0x1e 0x93 0x01;
-    chip_erase_delay = 20000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 0;
-    togglevtg           = 0;
-    poweroffdelay       = 0;
-    resetdelayms        = 0;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    resetdelay          = 15;
-    chiperasepulsewidth = 15;
-    chiperasepolltimeout = 0;
-    programfusepulsewidth = 2;
-    programfusepolltimeout = 0;
-    programlockpulsewidth = 0;
+    desc                   = "AT90S8515";
+    id                     = "8515";
+    stk500_devcode         = 0x60;
+    avr910_devcode         = 0x38;
+    chip_erase_delay       = 20000;
+    signature              = 0x1e 0x93 0x01;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    hvleavestabdelay       = 15;
+    resetdelay             = 15;
+    chiperasepulsewidth    = 15;
+    programfusepulsewidth  = 2;
     programlockpolltimeout = 1;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        size            = 512;
-        min_write_delay = 4000;
-        max_write_delay = 9000;
-        readback_p1     = 0x80;
-        readback_p2     = 0x7f;
-        read            = " 1  0  1  0   0  0  0  0  x x x x  x x x a8", 
-                          "a7 a6 a5 a4 a3 a2 a1 a0   o o o o  o o o o";
+        size               = 512;
+        min_write_delay    = 4000;
+        max_write_delay    = 9000;
+        readback           = 0x80 0x7f;
+        mode               = 4;
+        delay              = 12;
+        blocksize          = 128;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
+    ;
 
-        write           = " 1  1  0  0   0  0  0  0   x x x x  x x x a8",
-                          "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
-
-	mode		= 0x04;
-	delay		= 12;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
     memory "flash"
-        size            = 8192;
-        min_write_delay = 4000;
-        max_write_delay = 9000;
-        readback_p1     = 0x7f;
-        readback_p2     = 0x7f;
-        read_lo         = "  0   0   1   0    0   0   0   0",
-                          "  x   x   x   x  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
+        size               = 8192;
+        min_write_delay    = 4000;
+        max_write_delay    = 9000;
+        readback           = 0x7f 0x7f;
+        mode               = 4;
+        delay              = 12;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
+        write_lo           = "0100.0000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
+        write_hi           = "0100.1000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
+    ;
 
-        read_hi         = "  0   0   1   0    1   0   0   0",
-                          "  x   x   x   x  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        write_lo        = "  0   1   0   0    0   0   0   0",
-                          "  x   x   x   x  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  i   i   i   i    i   i   i   i";
-
-        write_hi        = "  0   1   0   0    1   0   0   0",
-                          "  x   x   x   x  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  i   i   i   i    i   i   i   i";
-
-	mode		= 0x04;
-	delay		= 12;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
-    memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
     memory "fuse"
-	size		= 1;
-      ;
+        size               = 1;
+    ;
+
     memory "lock"
-	size		= 1;
-	write		= "1  0  1  0   1  1  0  0   1  1  1  1   1  i  i  1",
-			  "x  x  x  x   x  x  x  x   x  x  x  x   x  x  x  x";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
-  ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        write              = "1010.1100--1111.1ii1--xxxx.xxxx--xxxx.xxxx";
+    ;
+
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # AT90s8535
 #------------------------------------------------------------
 
 part
-    id               = "8535";
-    desc             = "AT90S8535";
-    stk500_devcode   = 0x61;
-    avr910_devcode   = 0x68;
-    signature        = 0x1e 0x93 0x03;
-    chip_erase_delay = 20000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 0;
-    togglevtg           = 0;
-    poweroffdelay       = 0;
-    resetdelayms        = 0;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 15;
-    chiperasepolltimeout = 0;
-    programfusepulsewidth = 2;
-    programfusepolltimeout = 0;
-    programlockpulsewidth = 0;
+    desc                   = "AT90S8535";
+    id                     = "8535";
+    stk500_devcode         = 0x61;
+    avr910_devcode         = 0x68;
+    chip_erase_delay       = 20000;
+    signature              = 0x1e 0x93 0x03;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    hvleavestabdelay       = 15;
+    chiperasepulsewidth    = 15;
+    programfusepulsewidth  = 2;
     programlockpolltimeout = 1;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        size            = 512;
-        min_write_delay = 9000;
-        max_write_delay = 20000;
-        readback_p1     = 0x00;
-        readback_p2     = 0xff;
-        read            = " 1  0  1  0   0  0  0  0   x x x x  x x x a8", 
-                          "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
+        size               = 512;
+        min_write_delay    = 9000;
+        max_write_delay    = 20000;
+        readback           = 0x00 0xff;
+        mode               = 4;
+        delay              = 12;
+        blocksize          = 128;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
+    ;
 
-        write           = " 1  1  0  0   0  0  0  0   x x x x  x x x a8",
-                          "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
-
-	mode		= 0x04;
-	delay		= 12;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
     memory "flash"
-        size            = 8192;
-        min_write_delay = 9000;
-        max_write_delay = 20000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0    0   0   0   0",
-                          "  x   x   x   x  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
+        size               = 8192;
+        min_write_delay    = 9000;
+        max_write_delay    = 20000;
+        readback           = 0xff 0xff;
+        mode               = 4;
+        delay              = 12;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
+        write_lo           = "0100.0000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
+        write_hi           = "0100.1000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
+    ;
 
-        read_hi         = "  0   0   1   0    1   0   0   0",
-                          "  x   x   x   x  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        write_lo        = "  0   1   0   0    0   0   0   0",
-                          "  x   x   x   x  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  i   i   i   i    i   i   i   i";
-
-        write_hi        = "  0   1   0   0    1   0   0   0",
-                          "  x   x   x   x  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  i   i   i   i    i   i   i   i";
-
-	mode		= 0x04;
-	delay		= 12;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
-    memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
     memory "fuse"
-	size		= 1;
-	read		= "0  1  0  1   1  0  0  0   x  x  x  x   x  x  x  x",
-			  "x  x  x  x   x  x  x  x   x  x  x  x   x  x  x  o";
-	write		= "1  0  1  0   1  1  0  0   1  0  1  1   1  1  1  i",
-			  "x  x  x  x   x  x  x  x   x  x  x  x   x  x  x  x";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--xxxx.xxxo";
+        write              = "1010.1100--1011.111i--xxxx.xxxx--xxxx.xxxx";
+    ;
+
     memory "lock"
-	size		= 1;
-	read		= "0  1  0  1   1  0  0  0   x  x  x  x   x  x  x  x",
-			  "x  x  x  x   x  x  x  x   o  o  x  x   x  x  x  x";
-	write		= "1  0  1  0   1  1  0  0   1  1  1  1   1  i  i  1",
-			  "x  x  x  x   x  x  x  x   x  x  x  x   x  x  x  x";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
-  ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--ooxx.xxxx";
+        write              = "1010.1100--1111.1ii1--xxxx.xxxx--xxxx.xxxx";
+    ;
+
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega103
 #------------------------------------------------------------
 
 part
-    id               = "m103";
-    desc             = "ATmega103";
-    stk500_devcode   = 0xB1;
-    avr910_devcode   = 0x41;
-    signature        = 0x1e 0x97 0x01;
-    chip_erase_delay = 112000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x8E, 0x9E, 0x2E, 0x3E, 0xAE, 0xBE,
-        0x4E, 0x5E, 0xCE, 0xDE, 0x6E, 0x7E, 0xEE, 0xDE,
-        0x66, 0x76, 0xE6, 0xF6, 0x6A, 0x7A, 0xEA, 0x7A,
-        0x7F, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 0;
-    togglevtg           = 0;
-    poweroffdelay       = 0;
-    resetdelayms        = 0;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 15;
-    chiperasepolltimeout = 0;
-    programfusepulsewidth = 2;
-    programfusepolltimeout = 0;
-    programlockpulsewidth = 0;
+    desc                   = "ATmega103";
+    id                     = "m103";
+    stk500_devcode         = 0xb1;
+    avr910_devcode         = 0x41;
+    chip_erase_delay       = 112000;
+    signature              = 0x1e 0x97 0x01;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x8e, 0x9e, 0x2e, 0x3e, 0xae, 0xbe,
+        0x4e, 0x5e, 0xce, 0xde, 0x6e, 0x7e, 0xee, 0xde,
+        0x66, 0x76, 0xe6, 0xf6, 0x6a, 0x7a, 0xea, 0x7a,
+        0x7f, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    hvleavestabdelay       = 15;
+    chiperasepulsewidth    = 15;
+    programfusepulsewidth  = 2;
     programlockpolltimeout = 10;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        size            = 4096;
-        min_write_delay = 4000;
-        max_write_delay = 9000;
-        readback_p1     = 0x80;
-        readback_p2     = 0x7f;
-	read            = "  1   0   1   0      0   0   0   0",
-                          "  x   x   x   x    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-	write           = "  1   1   0   0      0   0   0   0",
-                          "  x   x   x   x    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0", 
-                          "  i   i   i   i      i   i   i   i";
-
-	mode		= 0x04;
-	delay		= 12;
-	blocksize	= 64;
-	readsize	= 256;
-      ;
+        size               = 4096;
+        min_write_delay    = 4000;
+        max_write_delay    = 9000;
+        readback           = 0x80 0x7f;
+        mode               = 4;
+        delay              = 12;
+        blocksize          = 64;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 131072;
-        page_size       = 256;
-        num_pages       = 512;
-        min_write_delay = 22000;
-        max_write_delay = 56000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7   x   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x11;
-	delay		= 70;
-	blocksize	= 256;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 0x20000;
+        page_size          = 256;
+        num_pages          = 512;
+        min_write_delay    = 22000;
+        max_write_delay    = 56000;
+        readback           = 0xff 0xff;
+        mode               = 17;
+        delay              = 70;
+        blocksize          = 256;
+        readsize           = 256;
+        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "fuse"
-        size            = 1;
-        read            = "0 1 0 1  0 0 0 0  x x x x  x x x x",
-                          "x x x x  x x x x  x x o x  o 1 o o";
-
-        write           = "1 0 1 0  1 1 0 0  1 0 1 1  i 1 i i",
-                          "x x x x  x x x x  x x x x  x x x x";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--xxxx.xxxx--xxxx.xxxx--xxox.o1oo";
+        write              = "1010.1100--1011.i1ii--xxxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   x x x x  x x x x",
-                          "x x x x  x x x x   x x x x  x o o x";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 1  1 i i 1",
-                          "x x x x  x x x x   x x x x  x x x x";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--xxxx.xoox";
+        write              = "1010.1100--1111.1ii1--xxxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
-
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega64
 #------------------------------------------------------------
 
 part
-    id               = "m64";
-    desc             = "ATmega64";
-    has_jtag         = yes;
-    stk500_devcode   = 0xA0;
-    avr910_devcode   = 0x45;
-    signature        = 0x1e 0x96 0x02;
-    chip_erase_delay = 9000;
-    pagel            = 0xD7;
-    bs2              = 0xA0;
-    reset            = dedicated;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 6;
-    togglevtg           = 0;
-    poweroffdelay       = 0;
-    resetdelayms        = 0;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
-    programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
-    programlockpolltimeout = 5;
-
-    idr                 = 0x22;
-    spmcr               = 0x68;
+    desc                   = "ATmega64";
+    id                     = "m64";
+    stk500_devcode         = 0xa0;
+    avr910_devcode         = 0x45;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x96 0x02;
+    reset                  = io;
+    has_jtag               = yes;
     allowfullpagebitstream = yes;
-
-    ocdrev              = 2;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 6;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
+    programfusepolltimeout = 5;
+    programlockpolltimeout = 5;
+    idr                    = 0x22;
+    spmcr                  = 0x68;
+    ocdrev                 = 2;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 8;  /* for parallel programming */
-        size            = 2048;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read            = "  1   0   1   0      0   0   0   0",
-                          "  x   x   x   x    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        write           = "  1   1   0   0      0   0   0   0",
-                          "  x   x   x   x    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0", 
-                          "  i   i   i   i      i   i   i   i";
-
-	mode		= 0x04;
-	delay		= 20;
-	blocksize	= 64;
-	readsize	= 256;
-      ;
+        size               = 2048;
+        page_size          = 8;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        readback           = 0xff 0xff;
+        mode               = 4;
+        delay              = 20;
+        blocksize          = 64;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 65536;
-        page_size       = 256;
-        num_pages       = 256;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "  x a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "  x a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  x a14 a13 a12    a11 a10  a9  a8",
-                          " a7   x   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x21;
-	delay		= 6;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 0x10000;
+        page_size          = 256;
+        num_pages          = 256;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 33;
+        delay              = 6;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--xaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--xaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--xaaa.aaaa--axxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  x x x x  x x i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxii";
+    ;
 
     memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
-
-    memory "calibration"
-        size            = 4;
-        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
-                          "0 0 0 0  0 0 a1 a0  o o o o  o o o o";
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+
+    memory "calibration"
+        size               = 4;
+        read               = "0011.1000--xxxx.xxxx--0000.00aa--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega64A
 #------------------------------------------------------------
 
 part parent "m64"
-    id               = "m64a";
-    desc             = "ATmega64A";
-  ;
+    desc                   = "ATmega64A";
+    id                     = "m64a";
+;
 
 #------------------------------------------------------------
 # ATmega128
 #------------------------------------------------------------
 
 part
-    id               = "m128";
-    desc             = "ATmega128";
-    has_jtag         = yes;
-    stk500_devcode   = 0xB2;
-    avr910_devcode   = 0x43;
-    signature        = 0x1e 0x97 0x02;
-    chip_erase_delay = 9000;
-    pagel            = 0xD7;
-    bs2              = 0xA0;
-    reset            = dedicated;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 6;
-    togglevtg           = 0;
-    poweroffdelay       = 0;
-    resetdelayms        = 0;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
-    programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
-    programlockpolltimeout = 5;
-
-    idr                 = 0x22;
-    spmcr               = 0x68;
-    rampz               = 0x3b;
+    desc                   = "ATmega128";
+    id                     = "m128";
+    stk500_devcode         = 0xb2;
+    avr910_devcode         = 0x43;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x97 0x02;
+    reset                  = io;
+    has_jtag               = yes;
     allowfullpagebitstream = yes;
-
-    ocdrev              = 1;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 6;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
+    programfusepolltimeout = 5;
+    programlockpolltimeout = 5;
+    idr                    = 0x22;
+    rampz                  = 0x3b;
+    spmcr                  = 0x68;
+    ocdrev                 = 1;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 8;  /* for parallel programming */
-        size            = 4096;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read            = "  1   0   1   0      0   0   0   0",
-                          "  x   x   x   x    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        write           = "  1   1   0   0      0   0   0   0",
-                          "  x   x   x   x    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0", 
-                          "  i   i   i   i      i   i   i   i";
-
-	mode		= 0x04;
-	delay		= 12;
-	blocksize	= 64;
-	readsize	= 256;
-      ;
+        size               = 4096;
+        page_size          = 8;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        readback           = 0xff 0xff;
+        mode               = 4;
+        delay              = 12;
+        blocksize          = 64;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 131072;
-        page_size       = 256;
-        num_pages       = 512;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7   x   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x21;
-	delay		= 6;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 0x20000;
+        page_size          = 256;
+        num_pages          = 512;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 33;
+        delay              = 6;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  x x x x  x x i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxii";
+    ;
 
     memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
-
-    memory "calibration"
-        size            = 4;
-        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
-                          "0 0 0 0  0 0 a1 a0  o o o o  o o o o";
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+
+    memory "calibration"
+        size               = 4;
+        read               = "0011.1000--xxxx.xxxx--0000.00aa--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega128A
 #------------------------------------------------------------
 
 part parent "m128"
-    id               = "m128a";
-    desc             = "ATmega128A";
-  ;
+    desc                   = "ATmega128A";
+    id                     = "m128a";
+;
 
 #------------------------------------------------------------
 # AT90CAN128
 #------------------------------------------------------------
 
 part
-    id               = "c128";
-    desc             = "AT90CAN128";
-    has_jtag         = yes;
-    stk500_devcode   = 0xB3;
-#    avr910_devcode   = 0x43;
-    signature        = 0x1e 0x97 0x81;
-    chip_erase_delay = 9000;
-    pagel            = 0xD7;
-    bs2              = 0xA0;
-    reset            = dedicated;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 6;
-    togglevtg           = 0;
-    poweroffdelay       = 0;
-    resetdelayms        = 0;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "AT90CAN128";
+    id                     = "c128";
+    stk500_devcode         = 0xb3;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+#   avr910_devcode         = 0x43;
+    signature              = 0x1e 0x97 0x81;
+    reset                  = io;
+    has_jtag               = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
+    hventerstabdelay       = 100;
+    latchcycles            = 6;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    idr                 = 0x31;
-    spmcr               = 0x57;
-    rampz               = 0x3b;
-    eecr                = 0x3f;
-    allowfullpagebitstream = no;
-
-    ocdrev              = 3;
+    idr                    = 0x31;
+    rampz                  = 0x3b;
+    spmcr                  = 0x57;
+    eecr                   = 0x3f;
+    ocdrev                 = 3;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 8;  /* for parallel programming */
-        size            = 4096;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-	read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   0   x    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-	write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   0   x    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0", 
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0  a2  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x    a11 a10  a9  a8",
-			  " a7  a6  a5  a4     a3   0   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-
-	mode		= 0x41;
-	delay		= 20;
-	blocksize	= 8;
-	readsize	= 256;
-      ;
+        size               = 4096;
+        page_size          = 8;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 20;
+        blocksize          = 8;
+        readsize           = 256;
+        read               = "1010.0000--000x.aaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.aaaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
+        writepage          = "1100.0010--00xx.aaaa--aaaa.a000--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 131072;
-        page_size       = 256;
-        num_pages       = 512;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  0   0   0   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  0   0   0   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7   x   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 256;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 0x20000;
+        page_size          = 256;
+        num_pages          = 512;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 256;
+        readsize           = 256;
+        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xaaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xaaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  x x x x  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.iiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
-
-    memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1  1 0 0 0  0 0 0 x  x x x x",
-                          "0 0 0 0  0 0 0 0  o o o o  o o o o";
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # AT90CAN64
 #------------------------------------------------------------
 
 part
-    id               = "c64";
-    desc             = "AT90CAN64";
-    has_jtag         = yes;
-    stk500_devcode   = 0xB3;
-#    avr910_devcode   = 0x43;
-    signature        = 0x1e 0x96 0x81;
-    chip_erase_delay = 9000;
-    pagel            = 0xD7;
-    bs2              = 0xA0;
-    reset            = dedicated;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 6;
-    togglevtg           = 0;
-    poweroffdelay       = 0;
-    resetdelayms        = 0;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "AT90CAN64";
+    id                     = "c64";
+    stk500_devcode         = 0xb3;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+#   avr910_devcode         = 0x43;
+    signature              = 0x1e 0x96 0x81;
+    reset                  = io;
+    has_jtag               = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
+    hventerstabdelay       = 100;
+    latchcycles            = 6;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    idr                 = 0x31;
-    spmcr               = 0x57;
-    rampz               = 0x3b;
-    eecr                = 0x3f;
-    allowfullpagebitstream = no;
-
-    ocdrev              = 3;
+    idr                    = 0x31;
+    rampz                  = 0x3b;
+    spmcr                  = 0x57;
+    eecr                   = 0x3f;
+    ocdrev                 = 3;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 8;  /* for parallel programming */
-        size            = 2048;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-	read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   0   x      x a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-	write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   0   x      x a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0  a2  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x a10  a9  a8",
-			  " a7  a6  a5  a4     a3   0   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-
-	mode		= 0x41;
-	delay		= 20;
-	blocksize	= 8;
-	readsize	= 256;
-      ;
+        size               = 2048;
+        page_size          = 8;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 20;
+        blocksize          = 8;
+        readsize           = 256;
+        read               = "1010.0000--000x.xaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.xaaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xaaa--aaaa.a000--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 65536;
-        page_size       = 256;
-        num_pages       = 256;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  0   0   0   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  0   0   0   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7   x   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 256;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 0x10000;
+        page_size          = 256;
+        num_pages          = 256;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 256;
+        readsize           = 256;
+        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xaaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xaaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  x x x x  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.iiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
-
-    memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1  1 0 0 0  0 0 0 x  x x x x",
-                          "0 0 0 0  0 0 0 0  o o o o  o o o o";
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # AT90CAN32
 #------------------------------------------------------------
 
 part
-    id               = "c32";
-    desc             = "AT90CAN32";
-    has_jtag         = yes;
-    stk500_devcode   = 0xB3;
-#    avr910_devcode   = 0x43;
-    signature        = 0x1e 0x95 0x81;
-    chip_erase_delay = 9000;
-    pagel            = 0xD7;
-    bs2              = 0xA0;
-    reset            = dedicated;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 6;
-    togglevtg           = 0;
-    poweroffdelay       = 0;
-    resetdelayms        = 0;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "AT90CAN32";
+    id                     = "c32";
+    stk500_devcode         = 0xb3;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+#   avr910_devcode         = 0x43;
+    signature              = 0x1e 0x95 0x81;
+    reset                  = io;
+    has_jtag               = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
+    hventerstabdelay       = 100;
+    latchcycles            = 6;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    idr                 = 0x31;
-    spmcr               = 0x57;
-    rampz               = 0x3b;
-    eecr                = 0x3f;
-    allowfullpagebitstream = no;
-
-    ocdrev              = 3;
+    idr                    = 0x31;
+    rampz                  = 0x3b;
+    spmcr                  = 0x57;
+    eecr                   = 0x3f;
+    ocdrev                 = 3;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 8;  /* for parallel programming */
-        size            = 1024;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-	read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   0   x      x   x  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-	write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   0   x      x   x  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0  a2  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x  a9  a8",
-			  " a7  a6  a5  a4     a3   0   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-
-	mode		= 0x41;
-	delay		= 20;
-	blocksize	= 8;
-	readsize	= 256;
-      ;
+        size               = 1024;
+        page_size          = 8;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 20;
+        blocksize          = 8;
+        readsize           = 256;
+        read               = "1010.0000--000x.xxaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.xxaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxaa--aaaa.a000--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 32768;
-        page_size       = 256;
-        num_pages       = 128;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  0   0   0   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  0   0   0   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7   x   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 256;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 0x8000;
+        page_size          = 256;
+        num_pages          = 128;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 256;
+        readsize           = 256;
+        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xaaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xaaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  x x x x  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.iiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
-
-    memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1  1 0 0 0  0 0 0 x  x x x x",
-                          "0 0 0 0  0 0 0 0  o o o o  o o o o";
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega16
 #------------------------------------------------------------
 
 part
-    id               = "m16";
-    desc             = "ATmega16";
-    has_jtag         = yes;
-    stk500_devcode   = 0x82;
-    avr910_devcode   = 0x74;
-    signature        = 0x1e 0x94 0x03;
-    pagel            = 0xd7;
-    bs2              = 0xa0;
-    chip_erase_delay = 9000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 100;
-    latchcycles         = 6;
-    togglevtg           = 0;
-    poweroffdelay       = 0;
-    resetdelayms        = 0;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    resetdelay          = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
-    programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
-    programlockpolltimeout = 5;
-
-    idr                 = 0x31;
-    spmcr               = 0x57;
+    desc                   = "ATmega16";
+    id                     = "m16";
+    stk500_devcode         = 0x82;
+    avr910_devcode         = 0x74;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x94 0x03;
+    reset                  = io;
+    has_jtag               = yes;
     allowfullpagebitstream = yes;
-
-    ocdrev              = 2;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    progmodedelay          = 100;
+    latchcycles            = 6;
+    hvleavestabdelay       = 15;
+    resetdelay             = 15;
+    chiperasepolltimeout   = 10;
+    programfusepolltimeout = 5;
+    programlockpolltimeout = 5;
+    idr                    = 0x31;
+    spmcr                  = 0x57;
+    ocdrev                 = 2;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 4;  /* for parallel programming */
-        size            = 512;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-	read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   x   x      x   x  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-	write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   x   x      x   x  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0", 
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x  a9  a8",
-			  " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x04;
-	delay		= 10;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
+        size               = 512;
+        page_size          = 4;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        readback           = 0xff 0xff;
+        mode               = 4;
+        delay              = 10;
+        blocksize          = 128;
+        readsize           = 256;
+        read               = "1010.0000--00xx.xxaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--00xx.xxaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxaa--aaaa.aa00--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 16384;
-        page_size       = 128;
-        num_pages       = 128;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "  0   0 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "  0   0 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  0   0   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  0   0   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  0   0 a13 a12    a11 a10  a9  a8",
-                          " a7  a6   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x21;
-	delay		= 6;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
-
-    memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        paged              = yes;
+        size               = 0x4000;
+        page_size          = 128;
+        num_pages          = 128;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 33;
+        delay              = 6;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--00xx.xxxx--xxaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--00xx.xxxx--xxaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--00aa.aaaa--aaxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
+
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-    memory "calibration"
-        size            = 4;
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
-        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
-                          "0 0 0 0  0 0 a1 a0 o o o o  o o o o";
-        ;
-  ;
+    memory "calibration"
+        size               = 4;
+        read               = "0011.1000--000x.xxxx--0000.00aa--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega16A
 #------------------------------------------------------------
 
 part parent "m16"
-    id               = "m16a";
-    desc             = "ATmega16A";
-  ;
+    desc                   = "ATmega16A";
+    id                     = "m16a";
+;
 
 #------------------------------------------------------------
 # ATmega324P
 #------------------------------------------------------------
 
 part
-    id               = "m324p";
-    desc             = "ATmega324P";
-    has_jtag         = yes;
-    stk500_devcode   = 0x82; # no STK500v1 support, use the ATmega16 one
-    avr910_devcode   = 0x74;
-    signature        = 0x1e 0x95 0x08;
-    pagel            = 0xd7;
-    bs2              = 0xa0;
-    chip_erase_delay = 55000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega324P";
+    id                     = "m324p";
+    stk500_devcode         = 0x82; # no STK500v1 support, use the ATmega16 one
+    avr910_devcode         = 0x74;
+    chip_erase_delay       = 55000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x95 0x08;
+    reset                  = io;
+    has_jtag               = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    idr                 = 0x31;
-    spmcr               = 0x57;
-    allowfullpagebitstream = no;
-
-    ocdrev              = 3;
+    idr                    = 0x31;
+    spmcr                  = 0x57;
+    ocdrev                 = 3;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 4;  /* for parallel programming */
-        size            = 1024;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-	read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   x   x      x a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-	write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   x   x      x a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0", 
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x a10  a9  a8",
-			  " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 10;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
+        size               = 1024;
+        page_size          = 4;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 128;
+        readsize           = 256;
+        read               = "1010.0000--00xx.xaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--00xx.xaaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xaaa--aaaa.aa00--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 32768;
-        page_size       = 128;
-        num_pages       = 256;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "  0 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "  0 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  0   0   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  0   0   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  0 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x21;
-	delay		= 6;
-	blocksize	= 256;
-	readsize	= 256;
-      ;
-
-    memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        paged              = yes;
+        size               = 0x8000;
+        page_size          = 128;
+        num_pages          = 256;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 33;
+        delay              = 6;
+        blocksize          = 256;
+        readsize           = 256;
+        read_lo            = "0010.0000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--00xx.xxxx--xxaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--00xx.xxxx--xxaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0aaa.aaaa--aaxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--1111.1iii";
+    ;
 
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  1 1 1 1  1 i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
     memory "calibration"
-        size            = 1;
-
-        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
-                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
-        ;
-  ;
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega164P
 #------------------------------------------------------------
 
 part parent "m324p"
-    id               = "m164p";
-    desc             = "ATmega164P";
-    signature        = 0x1e 0x94 0x0a;
+    desc                   = "ATmega164P";
+    id                     = "m164p";
+    signature              = 0x1e 0x94 0x0a;
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        size            = 512;
-        page_size       = 4;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-	read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   x   x      x a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-	write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   x   x      x a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0", 
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x a10  a9  a8",
-			  " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 10;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
+        size               = 512;
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 16384;
-        page_size       = 128;
-        num_pages       = 128;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "  0 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "  0 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  0   0   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  0   0   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  0 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x21;
-	delay		= 6;
-	blocksize	= 256;
-	readsize	= 256;
-        ;
-
-  ;
+        size               = 0x4000;
+        num_pages          = 128;
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega164PA
 #------------------------------------------------------------
 
 part parent "m164p"
-    id               = "m164pa";
-    desc             = "ATmega164PA";
-  ;
+    desc                   = "ATmega164PA";
+    id                     = "m164pa";
+;
 
 #------------------------------------------------------------
 # ATmega164A
 #------------------------------------------------------------
 
 part parent "m164p"
-    id               = "m164a";
-    desc             = "ATmega164A";
-    signature        = 0x1e 0x94 0x0f;
-  ;
+    desc                   = "ATmega164A";
+    id                     = "m164a";
+    signature              = 0x1e 0x94 0x0f;
+;
 
 #------------------------------------------------------------
 # ATmega324PB
 #------------------------------------------------------------
 
 part parent "m324p"
-    id               = "m324pb";
-    desc             = "ATmega324PB";
-    signature        = 0x1e 0x95 0x17;
-  ;
+    desc                   = "ATmega324PB";
+    id                     = "m324pb";
+    signature              = 0x1e 0x95 0x17;
+;
 
 #------------------------------------------------------------
 # ATmega324PA
 #------------------------------------------------------------
 
 part parent "m324p"
-    id               = "m324pa";
-    desc             = "ATmega324PA";
-    signature        = 0x1e 0x95 0x11;
-  ;
+    desc                   = "ATmega324PA";
+    id                     = "m324pa";
+    signature              = 0x1e 0x95 0x11;
+;
 
 #------------------------------------------------------------
 # ATmega324A
 #------------------------------------------------------------
 
 part parent "m324p"
-    id               = "m324a";
-    desc             = "ATmega324A";
-    signature        = 0x1e 0x95 0x15;
-  ;
+    desc                   = "ATmega324A";
+    id                     = "m324a";
+    signature              = 0x1e 0x95 0x15;
+;
 
 #------------------------------------------------------------
 # ATmega644
 #------------------------------------------------------------
 
 part
-    id               = "m644";
-    desc             = "ATmega644";
-    has_jtag         = yes;
-    stk500_devcode   = 0x82; # no STK500v1 support, use the ATmega16 one
-    avr910_devcode   = 0x74;
-    signature        = 0x1e 0x96 0x09;
-    pagel            = 0xd7;
-    bs2              = 0xa0;
-    chip_erase_delay = 55000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 6;
-    togglevtg           = 0;
-    poweroffdelay       = 0;
-    resetdelayms        = 0;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega644";
+    id                     = "m644";
+    stk500_devcode         = 0x82; # no STK500v1 support, use the ATmega16 one
+    avr910_devcode         = 0x74;
+    chip_erase_delay       = 55000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x96 0x09;
+    reset                  = io;
+    has_jtag               = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
+    hventerstabdelay       = 100;
+    latchcycles            = 6;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    idr                 = 0x31;
-    spmcr               = 0x57;
-    allowfullpagebitstream = no;
-
-    ocdrev              = 3;
+    idr                    = 0x31;
+    spmcr                  = 0x57;
+    ocdrev                 = 3;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 8;  /* for parallel programming */
-        size            = 2048;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-	read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   x   x    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-	write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   x   x    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0", 
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0  a2  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x    a11 a10  a9  a8",
-			  " a7  a6  a5  a4     a3   0   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 10;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
+        size               = 2048;
+        page_size          = 8;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 128;
+        readsize           = 256;
+        read               = "1010.0000--00xx.aaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--00xx.aaaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
+        writepage          = "1100.0010--00xx.aaaa--aaaa.a000--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 65536;
-        page_size       = 256;
-        num_pages       = 256;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  0   0   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  0   0   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7   x   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x21;
-	delay		= 6;
-	blocksize	= 256;
-	readsize	= 256;
-      ;
-
-    memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        paged              = yes;
+        size               = 0x10000;
+        page_size          = 256;
+        num_pages          = 256;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 33;
+        delay              = 6;
+        blocksize          = 256;
+        readsize           = 256;
+        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--00xx.xxxx--xaaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--00xx.xxxx--xaaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--1111.1iii";
+    ;
 
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  1 1 1 1  1 i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
     memory "calibration"
-        size            = 1;
-
-        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
-                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
-        ;
-  ;
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega644A
 #------------------------------------------------------------
 
 part parent "m644"
-    id               = "m644a";
-    desc             = "ATmega644A";
-  ;
+    desc                   = "ATmega644A";
+    id                     = "m644a";
+;
 
 #------------------------------------------------------------
 # ATmega644P
 #------------------------------------------------------------
 
 part parent "m644"
-    id               = "m644p";
-    desc             = "ATmega644P";
-    signature        = 0x1e 0x96 0x0a;
-  ;
+    desc                   = "ATmega644P";
+    id                     = "m644p";
+    signature              = 0x1e 0x96 0x0a;
+;
 
 #------------------------------------------------------------
 # ATmega644PA
 #------------------------------------------------------------
 
 part parent "m644"
-    id               = "m644pa";
-    desc             = "ATmega644PA";
-    signature        = 0x1e 0x96 0x0a;
-  ;
+    desc                   = "ATmega644PA";
+    id                     = "m644pa";
+    signature              = 0x1e 0x96 0x0a;
+;
 
 #------------------------------------------------------------
 # ATmega1284
 #------------------------------------------------------------
 
 part
-    id               = "m1284";
-    desc             = "ATmega1284";
-    has_jtag         = yes;
-    stk500_devcode   = 0x82; # no STK500v1 support, use the ATmega16 one
-    avr910_devcode   = 0x74;
-    signature        = 0x1e 0x97 0x06;
-    pagel            = 0xd7;
-    bs2              = 0xa0;
-    chip_erase_delay = 55000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 6;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega1284";
+    id                     = "m1284";
+    stk500_devcode         = 0x82; # no STK500v1 support, use the ATmega16 one
+    avr910_devcode         = 0x74;
+    chip_erase_delay       = 55000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x97 0x06;
+    reset                  = io;
+    has_jtag               = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
+    hventerstabdelay       = 100;
+    latchcycles            = 6;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    idr                 = 0x31;
-    spmcr               = 0x57;
-    allowfullpagebitstream = no;
-
-    ocdrev              = 3;
+    idr                    = 0x31;
+    spmcr                  = 0x57;
+    ocdrev                 = 3;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 8;  /* for parallel programming */
-        size            = 4096;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-	read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   x   x    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-	write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   x   x    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0", 
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0  a2  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x    a11 a10  a9  a8",
-			  " a7  a6  a5  a4     a3   0   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 10;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
+        size               = 4096;
+        page_size          = 8;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 128;
+        readsize           = 256;
+        read               = "1010.0000--00xx.aaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--00xx.aaaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
+        writepage          = "1100.0010--00xx.aaaa--aaaa.a000--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 131072;
-        page_size       = 256;
-        num_pages       = 512;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  0   0   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  0   0   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7   x   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 10;
-	blocksize	= 256;
-	readsize	= 256;
-      ;
-
-    memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        paged              = yes;
+        size               = 0x20000;
+        page_size          = 256;
+        num_pages          = 512;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 256;
+        readsize           = 256;
+        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--00xx.xxxx--xaaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--00xx.xxxx--xaaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--1111.1iii";
+    ;
 
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  1 1 1 1  1 i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
     memory "calibration"
-        size            = 1;
-
-        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
-                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
-        ;
-  ;
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega1284P
 #------------------------------------------------------------
 
 part parent "m1284"
-    id               = "m1284p";
-    desc             = "ATmega1284P";
-    signature        = 0x1e 0x97 0x05;
-  ;
+    desc                   = "ATmega1284P";
+    id                     = "m1284p";
+    signature              = 0x1e 0x97 0x05;
+;
 
 #------------------------------------------------------------
 # ATmega162
 #------------------------------------------------------------
 
 part
-    id               = "m162";
-    desc             = "ATmega162";
-    has_jtag         = yes;
-    stk500_devcode   = 0x83;
-    avr910_devcode   = 0x63;
-    signature        = 0x1e 0x94 0x04;
-    chip_erase_delay = 9000;
-    pagel            = 0xd7;
-    bs2              = 0xa0;
-
-    idr              = 0x04;
-    spmcr            = 0x57;
+    desc                   = "ATmega162";
+    id                     = "m162";
+    stk500_devcode         = 0x83;
+    avr910_devcode         = 0x63;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x94 0x04;
+    reset                  = io;
+    has_jtag               = yes;
     allowfullpagebitstream = yes;
-
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    ocdrev              = 2;
-
-    memory "flash"
-        paged           = yes;
-        size            = 16384;
-        page_size       = 128;
-        num_pages       = 128;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "  0   0 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "  0   0 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  0   0   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  0   0   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  0   0 a13 a12    a11 a10  a9  a8",
-                          " a7  a6   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-       mode        = 0x41;
-    delay       = 10;
-    blocksize   = 128;
-    readsize    = 256;  
-
-        ;
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 6;
-    togglevtg           = 0;
-    poweroffdelay       = 0;
-    resetdelayms        = 0;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 6;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
+    idr                    = 0x04;
+    spmcr                  = 0x57;
+    ocdrev                 = 2;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 4;  /* for parallel programming */
-        size            = 512;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
+        size               = 512;
+        page_size          = 4;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 20;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--00xx.xxaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--00xx.xxaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxaa--aaaa.aa00--xxxx.xxxx";
+    ;
 
-                read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   x   x      x   x  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-                write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   x   x      x   x  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x  a9  a8",
-			  " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 20;
-	blocksize	= 4;
-	readsize	= 256;
-        ;
+    memory "flash"
+        paged              = yes;
+        size               = 0x4000;
+        page_size          = 128;
+        num_pages          = 128;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--00xx.xxxx--xxaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--00xx.xxxx--xxaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--00aa.aaaa--aaxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        min_write_delay = 16000;
-        max_write_delay = 16000;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-        ;
+        size               = 1;
+        min_write_delay    = 16000;
+        max_write_delay    = 16000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        min_write_delay = 16000;
-        max_write_delay = 16000;
-
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-        ;
+        size               = 1;
+        min_write_delay    = 16000;
+        max_write_delay    = 16000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        min_write_delay = 16000;
-        max_write_delay = 16000;
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  1 1 1 1  1 i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 16000;
+        max_write_delay    = 16000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--1111.1iii";
+    ;
 
     memory "lock"
-        size            = 1;
-        min_write_delay = 16000;
-        max_write_delay = 16000;
-
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-        ;
+        size               = 1;
+        min_write_delay    = 16000;
+        max_write_delay    = 16000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-
-        read            = "0  0  1  1   0  0  0  0   0  0  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-        ;
+        size               = 3;
+        read               = "0011.0000--00xx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
     memory "calibration"
-        size            = 1;
-
-        read            = "0 0 1 1  1 0 0 0   0 0 x x  x x x x",
-                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
-        ;
+        size               = 1;
+        read               = "0011.1000--00xx.xxxx--0000.0000--oooo.oooo";
+    ;
 ;
 
-
-
 #------------------------------------------------------------
 # ATmega163
 #------------------------------------------------------------
 
 part
-    id               = "m163";
-    desc             = "ATmega163";
-    stk500_devcode   = 0x81;
-    avr910_devcode   = 0x64;
-    signature        = 0x1e 0x94 0x02;
-    chip_erase_delay = 32000;
-    pagel            = 0xd7;
-    bs2              = 0xa0;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout             = 200;
-    stabdelay           = 100;
-    cmdexedelay         = 25;
-    synchloops          = 32;
-    bytedelay           = 0;
-    pollindex           = 3;
-    pollvalue           = 0x53;
-    predelay            = 1;
-    postdelay           = 1;
-    pollmethod          = 0;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 0;
-    togglevtg           = 0;
-    poweroffdelay       = 0;
-    resetdelayms        = 0;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 30;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega163";
+    id                     = "m163";
+    stk500_devcode         = 0x81;
+    avr910_devcode         = 0x64;
+    chip_erase_delay       = 32000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x94 0x02;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 30;
     programfusepolltimeout = 2;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 2;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
-
-   memory "eeprom"
-        size            = 512;
-        min_write_delay = 4000;
-        max_write_delay = 4000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-	read            = "  1   0   1   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-	write           = "  1   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-        mode            = 0x41;
-        delay           = 20;
-        blocksize       = 4;
-        readsize        = 256;
-      ;
+    memory "eeprom"
+        size               = 512;
+        min_write_delay    = 4000;
+        max_write_delay    = 4000;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 20;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 16384;
-        page_size       = 128;
-        num_pages       = 128;
-        min_write_delay = 16000;
-        max_write_delay = 16000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "  x   x   x a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "  x   x   x a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  x   x   x a12    a11 a10  a9  a8",
-                          " a7  a6   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x11;
-	delay		= 20;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 0x4000;
+        page_size          = 128;
+        num_pages          = 128;
+        min_write_delay    = 16000;
+        max_write_delay    = 16000;
+        readback           = 0xff 0xff;
+        mode               = 17;
+        delay              = 20;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--xxxa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--xxxa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--xxxa.aaaa--aaxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        min_write_delay = 2000;
-        max_write_delay = 2000;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o x x  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x   i i 1 1  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 2000;
+        max_write_delay    = 2000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--ooxx.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--ii11.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        min_write_delay = 2000;
-        max_write_delay = 2000;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   x x x x  1 o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x   1 1 1 1  1 i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 2000;
+        max_write_delay    = 2000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--xxxx.1ooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--1111.1iii";
+    ;
 
     memory "lock"
-        size            = 1;
-        min_write_delay = 2000;
-        max_write_delay = 2000;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  0 x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 2000;
+        max_write_delay    = 2000;
+        read               = "0101.1000--0000.0000--xxxx.0xxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
     memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1  1 0 0 0   x x x x  x x x x",
-                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
-      ;
-  ;
+        size               = 1;
+        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega169
 #------------------------------------------------------------
 
 part
-    id               = "m169";
-    desc             = "ATmega169";
-    has_jtag         = yes;
-    stk500_devcode   = 0x85;
-    avr910_devcode   = 0x78;
-    signature        = 0x1e 0x94 0x05;
-    chip_erase_delay = 9000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega169";
+    id                     = "m169";
+    stk500_devcode         = 0x85;
+    avr910_devcode         = 0x78;
+    chip_erase_delay       = 9000;
+    signature              = 0x1e 0x94 0x05;
+    has_jtag               = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
+    idr                    = 0x31;
+    spmcr                  = 0x57;
+    ocdrev                 = 2;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
-    idr                 = 0x31;
-    spmcr               = 0x57;
-
-    ocdrev              = 2;
-
-   memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 4;  /* for parallel programming */
-        size            = 512;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-	read            = "  1   0   1   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-	write           = "  1   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0", 
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x   x  a8",
-			  " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 20;
-	blocksize	= 4;
-	readsize	= 256;
-      ;
+    memory "eeprom"
+        size               = 512;
+        page_size          = 4;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 20;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 16384;
-        page_size       = 128;
-        num_pages       = 128;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "  x   x   x a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "  x   x   x a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  x   x   x a12    a11 a10  a9  a8",
-                          " a7  a6   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 0x4000;
+        page_size          = 128;
+        num_pages          = 128;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--xxxa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--xxxa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--xxxa.aaaa--aaxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        min_write_delay = 2000;
-        max_write_delay = 2000;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 2000;
+        max_write_delay    = 2000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        min_write_delay = 2000;
-        max_write_delay = 2000;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 2000;
+        max_write_delay    = 2000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        min_write_delay = 2000;
-        max_write_delay = 2000;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  x x x x  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-      ;
+        size               = 1;
+        min_write_delay    = 2000;
+        max_write_delay    = 2000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.iiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        min_write_delay = 2000;
-        max_write_delay = 2000;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 2000;
+        max_write_delay    = 2000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
     memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
-                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
-      ;
-  ;
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega169A
 #------------------------------------------------------------
 
 part parent "m169"
-    id               = "m169a";
-    desc             = "ATmega169A";
-    signature        = 0x1E 0x94 0x11;
-  ;
+    desc                   = "ATmega169A";
+    id                     = "m169a";
+    signature              = 0x1e 0x94 0x11;
+    reset                  = io;
+;
 
 #------------------------------------------------------------
 # ATmega169P
 #------------------------------------------------------------
 
 part parent "m169"
-    id               = "m169p";
-    desc             = "ATmega169P";
-    signature        = 0x1E 0x94 0x05;
-  ;
+    desc                   = "ATmega169P";
+    id                     = "m169p";
+    reset                  = io;
+;
 
 #------------------------------------------------------------
 # ATmega169PA
 #------------------------------------------------------------
 
 part parent "m169"
-    id               = "m169pa";
-    desc             = "ATmega169PA";
-    signature        = 0x1E 0x94 0x05;
-  ;
+    desc                   = "ATmega169PA";
+    id                     = "m169pa";
+    reset                  = io;
+;
 
 #------------------------------------------------------------
 # ATmega329
 #------------------------------------------------------------
 
 part
-    id               = "m329";
-    desc             = "ATmega329";
-    has_jtag         = yes;
-#    stk500_devcode   = 0x85; # no STK500 support, only STK500v2
-#    avr910_devcode   = 0x?;  # try the ATmega169 one:
-    avr910_devcode   = 0x75;
-    signature        = 0x1e 0x95 0x03;
-    chip_erase_delay = 9000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega329";
+    id                     = "m329";
+#   stk500_devcode         = 0x85; # no STK500 support, only STK500v2
+#   avr910_devcode         = 0x?;  # try the ATmega169 one:
+    avr910_devcode         = 0x75;
+    chip_erase_delay       = 9000;
+    signature              = 0x1e 0x95 0x03;
+    reset                  = io;
+    has_jtag               = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
+    idr                    = 0x31;
+    spmcr                  = 0x57;
+    ocdrev                 = 3;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
-    idr                 = 0x31;
-    spmcr               = 0x57;
-
-    ocdrev              = 3;
-
-   memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 4;  /* for parallel programming */
-        size            = 1024;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-	read            = "  1   0   1   0      0   0   0   0",
-                          "  x   x   x   x      x   x  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-	write           = "  1   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x  a9  a8",
-			  " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 20;
-	blocksize	= 8;
-	readsize	= 256;
-      ;
+    memory "eeprom"
+        size               = 1024;
+        page_size          = 4;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 20;
+        blocksize          = 8;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.xxaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xxaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxaa--aaaa.aa00--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 32768;
-        page_size       = 128;
-        num_pages       = 256;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "  x a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "  x a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  x a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 256;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 0x8000;
+        page_size          = 128;
+        num_pages          = 256;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 256;
+        readsize           = 256;
+        read_lo            = "0010.0000--xaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--xaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--xaaa.aaaa--aaxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x   x x x x  x i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
     memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
-                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
-      ;
-  ;
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega329A
 #------------------------------------------------------------
 
 part parent "m329"
-    id               = "m329a";
-    desc             = "ATmega329A";
-  ;
+    desc                   = "ATmega329A";
+    id                     = "m329a";
+;
 
 #------------------------------------------------------------
 # ATmega329P
 #------------------------------------------------------------
 
 part parent "m329"
-    id               = "m329p";
-    desc             = "ATmega329P";
-    signature        = 0x1e 0x95 0x0b;
-  ;
+    desc                   = "ATmega329P";
+    id                     = "m329p";
+    signature              = 0x1e 0x95 0x0b;
+;
 
 #------------------------------------------------------------
 # ATmega329PA
 #------------------------------------------------------------
 
 part parent "m329"
-    id               = "m329pa";
-    desc             = "ATmega329PA";
-    signature        = 0x1e 0x95 0x0b;
-  ;
+    desc                   = "ATmega329PA";
+    id                     = "m329pa";
+    signature              = 0x1e 0x95 0x0b;
+;
 
 #------------------------------------------------------------
 # ATmega3290
 #------------------------------------------------------------
 
 part parent "m329"
-    id               = "m3290";
-    desc             = "ATmega3290";
-    signature        = 0x1e 0x95 0x04;
-  ;
+    desc                   = "ATmega3290";
+    id                     = "m3290";
+    signature              = 0x1e 0x95 0x04;
+;
 
 #------------------------------------------------------------
 # ATmega3290A
 #------------------------------------------------------------
 
 part parent "m329"
-    id               = "m3290a";
-    desc             = "ATmega3290A";
-    signature        = 0x1e 0x95 0x04;
-  ;
+    desc                   = "ATmega3290A";
+    id                     = "m3290a";
+    signature              = 0x1e 0x95 0x04;
+;
 
 #------------------------------------------------------------
 # ATmega3290P
 #------------------------------------------------------------
 
 part parent "m329"
-    id               = "m3290p";
-    desc             = "ATmega3290P";
-    signature        = 0x1e 0x95 0x0c;
-  ;
+    desc                   = "ATmega3290P";
+    id                     = "m3290p";
+    signature              = 0x1e 0x95 0x0c;
+;
 
 #------------------------------------------------------------
 # ATmega3290PA
 #------------------------------------------------------------
 
 part parent "m329"
-    id               = "m3290pa";
-    desc             = "ATmega3290PA";
-    signature        = 0x1e 0x95 0x0c;
-  ;
+    desc                   = "ATmega3290PA";
+    id                     = "m3290pa";
+    signature              = 0x1e 0x95 0x0c;
+;
 
 #------------------------------------------------------------
 # ATmega649
 #------------------------------------------------------------
 
 part
-    id               = "m649";
-    desc             = "ATmega649";
-    has_jtag         = yes;
-#    stk500_devcode   = 0x85; # no STK500 support, only STK500v2
-#    avr910_devcode   = 0x?;  # try the ATmega169 one:
-    avr910_devcode   = 0x75;
-    signature        = 0x1e 0x96 0x03;
-    chip_erase_delay = 9000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega649";
+    id                     = "m649";
+#   stk500_devcode         = 0x85; # no STK500 support, only STK500v2
+#   avr910_devcode         = 0x?;  # try the ATmega169 one:
+    avr910_devcode         = 0x75;
+    chip_erase_delay       = 9000;
+    signature              = 0x1e 0x96 0x03;
+    reset                  = io;
+    has_jtag               = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
+    idr                    = 0x31;
+    spmcr                  = 0x57;
+    ocdrev                 = 3;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
-    idr                 = 0x31;
-    spmcr               = 0x57;
-
-    ocdrev              = 3;
-
-   memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 8;  /* for parallel programming */
-        size            = 2048;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-	read            = "  1   0   1   0      0   0   0   0",
-                          "  x   x   x   x      x a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-	write           = "  1   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0  a2  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x a10  a9  a8",
-			  " a7  a6  a5  a4     a3   0   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 20;
-	blocksize	= 8;
-	readsize	= 256;
-      ;
+    memory "eeprom"
+        size               = 2048;
+        page_size          = 8;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 20;
+        blocksize          = 8;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.xaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xaaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xaaa--aaaa.a000--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 65536;
-        page_size       = 256;
-        num_pages       = 256;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7   x   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 256;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 0x10000;
+        page_size          = 256;
+        num_pages          = 256;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 256;
+        readsize           = 256;
+        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x   x x x x  x i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
     memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
-                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
-      ;
-  ;
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega649A
 #------------------------------------------------------------
 
 part parent "m649"
-    id               = "m649a";
-    desc             = "ATmega649A";
-  ;
+    desc                   = "ATmega649A";
+    id                     = "m649a";
+;
 
 #------------------------------------------------------------
 # ATmega649P
 #------------------------------------------------------------
 
 part parent "m649"
-    id               = "m649p";
-    desc             = "ATmega649P";
-    signature        = 0x1e 0x96 0x0b;
-  ;
+    desc                   = "ATmega649P";
+    id                     = "m649p";
+    signature              = 0x1e 0x96 0x0b;
+;
 
 #------------------------------------------------------------
 # ATmega6490
 #------------------------------------------------------------
 
 part parent "m649"
-    id               = "m6490";
-    desc             = "ATmega6490";
-    signature        = 0x1e 0x96 0x04;
-  ;
+    desc                   = "ATmega6490";
+    id                     = "m6490";
+    signature              = 0x1e 0x96 0x04;
+;
 
 #------------------------------------------------------------
 # ATmega6490A
 #------------------------------------------------------------
 
 part parent "m649"
-    id               = "m6490a";
-    desc             = "ATmega6490A";
-    signature        = 0x1e 0x96 0x04;
-  ;
+    desc                   = "ATmega6490A";
+    id                     = "m6490a";
+    signature              = 0x1e 0x96 0x04;
+;
 
 #------------------------------------------------------------
 # ATmega6490P
 #------------------------------------------------------------
 
 part parent "m649"
-    id               = "m6490p";
-    desc             = "ATmega6490P";
-    signature        = 0x1e 0x96 0x0C;
-  ;
+    desc                   = "ATmega6490P";
+    id                     = "m6490p";
+    signature              = 0x1e 0x96 0x0c;
+;
 
 #------------------------------------------------------------
 # ATmega32
 #------------------------------------------------------------
 
 part
-    id               = "m32";
-    desc             = "ATmega32";
-    has_jtag         = yes;
-    stk500_devcode   = 0x91;
-    avr910_devcode   = 0x72;
-    signature        = 0x1e 0x95 0x02;
-    chip_erase_delay = 9000;
-    pagel            = 0xd7;
-    bs2              = 0xa0;
-    reset            = dedicated;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 6;
-    togglevtg           = 0;
-    poweroffdelay       = 0;
-    resetdelayms        = 0;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
-    programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
-    programlockpolltimeout = 5;
-
-    idr                 = 0x31;
-    spmcr               = 0x57;
+    desc                   = "ATmega32";
+    id                     = "m32";
+    stk500_devcode         = 0x91;
+    avr910_devcode         = 0x72;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x95 0x02;
+    reset                  = io;
+    has_jtag               = yes;
     allowfullpagebitstream = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 6;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
+    programfusepolltimeout = 5;
+    programlockpolltimeout = 5;
+    idr                    = 0x31;
+    spmcr                  = 0x57;
+    ocdrev                 = 2;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
-    ocdrev              = 2;
-
-   memory "eeprom"
-        paged           = no;   /* leave this "no" */
-        page_size       = 4;    /* for parallel programming */
-        size            = 1024;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   x   x      x   x  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   x   x      x   x  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x  a9  a8",
-			  " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x04;
-	delay		= 10;
-	blocksize	= 64;
-	readsize	= 256;
-      ;
+    memory "eeprom"
+        size               = 1024;
+        page_size          = 4;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        readback           = 0xff 0xff;
+        mode               = 4;
+        delay              = 10;
+        blocksize          = 64;
+        readsize           = 256;
+        read               = "1010.0000--00xx.xxaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--00xx.xxaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxaa--aaaa.aa00--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 32768;
-        page_size       = 128;
-        num_pages       = 256;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "  0   0 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "  0   0 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  0   0   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  0   0   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  0   0 a13 a12    a11 a10  a9  a8",
-                          " a7  a6   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x21;
-	delay		= 6;
-	blocksize	= 64;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 0x8000;
+        page_size          = 128;
+        num_pages          = 256;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 33;
+        delay              = 6;
+        blocksize          = 64;
+        readsize           = 256;
+        read_lo            = "0010.0000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--00xx.xxxx--xxaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--00xx.xxxx--xxaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--00aa.aaaa--aaxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        min_write_delay = 2000;
-        max_write_delay = 2000;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 2000;
+        max_write_delay    = 2000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        min_write_delay = 2000;
-        max_write_delay = 2000;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 2000;
+        max_write_delay    = 2000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        min_write_delay = 2000;
-        max_write_delay = 2000;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 2000;
+        max_write_delay    = 2000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o o";
-      ;
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
     memory "calibration"
-        size            = 4;
-        read            = "0 0 1 1  1 0 0 0    0 0 x x  x x x x",
-                          "0 0 0 0  0 0 a1 a0  o o o o  o o o o";
-      ;
-  ;
+        size               = 4;
+        read               = "0011.1000--00xx.xxxx--0000.00aa--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega161
 #------------------------------------------------------------
 
 part
-    id               = "m161";
-    desc             = "ATmega161";
-    stk500_devcode   = 0x80;
-    avr910_devcode   = 0x60;
-    signature        = 0x1e 0x94 0x01;
-    chip_erase_delay = 28000;
-    pagel            = 0xd7;
-    bs2              = 0xa0;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 0;
-    togglevtg           = 0;
-    poweroffdelay       = 0;
-    resetdelayms        = 0;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 30;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega161";
+    id                     = "m161";
+    stk500_devcode         = 0x80;
+    avr910_devcode         = 0x60;
+    chip_erase_delay       = 28000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x94 0x01;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 30;
     programfusepolltimeout = 2;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 2;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
-   memory "eeprom"
-        size            = 512;
-        min_write_delay = 3400;
-        max_write_delay = 3400;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-	read            = "  1   0   1   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-	write           = "  1   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-	mode		= 0x04;
-	delay		= 5;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
+    memory "eeprom"
+        size               = 512;
+        min_write_delay    = 3400;
+        max_write_delay    = 3400;
+        readback           = 0xff 0xff;
+        mode               = 4;
+        delay              = 5;
+        blocksize          = 128;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 16384;
-        page_size       = 128;
-        num_pages       = 128;
-        min_write_delay = 14000;
-        max_write_delay = 14000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "  x   x   x a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "  x   x   x a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  x   x   x a12    a11 a10  a9  a8",
-                          " a7  a6   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x21;
-	delay		= 16;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 0x4000;
+        page_size          = 128;
+        num_pages          = 128;
+        min_write_delay    = 14000;
+        max_write_delay    = 14000;
+        readback           = 0xff 0xff;
+        mode               = 33;
+        delay              = 16;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--xxxa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--xxxa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--xxxa.aaaa--aaxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "fuse"
-        size            = 1;
-        min_write_delay = 2000;
-        max_write_delay = 2000;
-        read            = "0 1 0 1  0 0 0 0   x x x x  x x x x",
-                          "x x x x  x x x x   x o x o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 x  x x x x",
-                          "x x x x  x x x x   1 i 1 i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 2000;
+        max_write_delay    = 2000;
+        read               = "0101.0000--xxxx.xxxx--xxxx.xxxx--xoxo.oooo";
+        write              = "1010.1100--101x.xxxx--xxxx.xxxx--1i1i.iiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        min_write_delay = 2000;
-        max_write_delay = 2000;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
+        size               = 1;
+        min_write_delay    = 2000;
+        max_write_delay    = 2000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-      ;
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega32A
 #------------------------------------------------------------
 
 part parent "m32"
-    id               = "m32a";
-    desc             = "ATmega32A";
-  ;
+    desc                   = "ATmega32A";
+    id                     = "m32a";
+;
 
 #------------------------------------------------------------
 # ATmega8
 #------------------------------------------------------------
 
 part
-    id               = "m8";
-    desc             = "ATmega8";
-    stk500_devcode   = 0x70;
-    avr910_devcode   = 0x76;
-    signature        = 0x1e 0x93 0x07;
-    pagel            = 0xd7;
-    bs2              = 0xc2;
-    chip_erase_delay = 10000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 2;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    resetdelay          = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega8";
+    id                     = "m8";
+    stk500_devcode         = 0x70;
+    avr910_devcode         = 0x76;
+    chip_erase_delay       = 10000;
+    pagel                  = 0xd7;
+    bs2                    = 0xc2;
+    signature              = 0x1e 0x93 0x07;
+    reset                  = io;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 2;
+    hvleavestabdelay       = 15;
+    resetdelay             = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        size            = 512;
-        page_size       = 4;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-	read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   x   x      x   x   x  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
+        size               = 512;
+        page_size          = 4;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        readback           = 0xff 0xff;
+        mode               = 4;
+        delay              = 20;
+        blocksize          = 128;
+        readsize           = 256;
+        read               = "1010.0000--00xx.xxxa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--00xx.xxxa--aaaa.aaaa--iiii.iiii";
+    ;
 
-	write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   x   x      x   x   x  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0", 
-                          "  i   i   i   i      i   i   i   i";
-
-	mode		= 0x04;
-	delay		= 20;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
     memory "flash"
-        paged           = yes;
-        size            = 8192;
-        page_size       = 64;
-        num_pages       = 128;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0x00;
-        read_lo         = "  0   0   1   0    0   0   0   0",
-                          "  0   0   0   0  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        read_hi         = "  0   0   1   0    1   0   0   0",
-                          "  0   0   0   0  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  0   0   0   0      x   x   x   x",
-                          "  x   x   x  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  0   0   0   0      x   x   x   x",
-                          "  x   x   x  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  0   0   0   0    a11 a10  a9  a8",
-                          " a7  a6  a5   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x21;
-	delay		= 10;
-	blocksize	= 64;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 8192;
+        page_size          = 64;
+        num_pages          = 128;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0x00;
+        mode               = 33;
+        delay              = 10;
+        blocksize          = 64;
+        readsize           = 256;
+        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--0000.xxxx--xxxa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--0000.xxxx--xxxa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0000.aaaa--aaax.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        min_write_delay = 2000;
-        max_write_delay = 2000;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 2000;
+        max_write_delay    = 2000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        min_write_delay = 2000;
-        max_write_delay = 2000;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 2000;
+        max_write_delay    = 2000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        min_write_delay = 2000;
-        max_write_delay = 2000;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-      ;
-
-    memory "calibration"
-        size            = 4;
-        read            = "0  0  1  1   1  0  0  0   0  0  x  x   x  x  x  x",
-                          "0  0  0  0   0  0 a1 a0   o  o  o  o   o  o  o  o";
-      ;
+        size               = 1;
+        min_write_delay    = 2000;
+        max_write_delay    = 2000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
-
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
+    memory "calibration"
+        size               = 4;
+        read               = "0011.1000--00xx.xxxx--0000.00aa--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega8A
 #------------------------------------------------------------
 
 part parent "m8"
-    id               = "m8a";
-    desc             = "ATmega8A";
-    ;
+    desc                   = "ATmega8A";
+    id                     = "m8a";
+;
 
 #------------------------------------------------------------
 # ATmega8515
 #------------------------------------------------------------
 
 part
-    id               = "m8515";
-    desc             = "ATmega8515";
-    stk500_devcode   = 0x63;
-    avr910_devcode   = 0x3A;
-    signature        = 0x1e 0x93 0x06;
-    chip_erase_delay = 9000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 6;
-    togglevtg           = 0;
-    poweroffdelay       = 0;
-    resetdelayms        = 0;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega8515";
+    id                     = "m8515";
+    stk500_devcode         = 0x63;
+    avr910_devcode         = 0x3a;
+    chip_erase_delay       = 9000;
+    signature              = 0x1e 0x93 0x06;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 6;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        size            = 512;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
- read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   x   x      x   x   x  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
+        size               = 512;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        readback           = 0xff 0xff;
+        mode               = 4;
+        delay              = 20;
+        blocksize          = 128;
+        readsize           = 256;
+        read               = "1010.0000--00xx.xxxa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--00xx.xxxa--aaaa.aaaa--iiii.iiii";
+    ;
 
- write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   x   x      x   x   x  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-	mode		= 0x04;
-	delay		= 20;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
     memory "flash"
-        paged           = yes;
-        size            = 8192;
-        page_size       = 64;
-        num_pages       = 128;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0    0   0   0   0",
-                          "  0   0   0   0  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        read_hi         = "  0   0   1   0    1   0   0   0",
-                          "  0   0   0   0  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  0   0   0   0      x   x   x   x",
-                          "  x   x   x  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  0   0   0   0      x   x   x   x",
-                          "  x   x   x  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  0   0   0   0    a11 a10  a9  a8",
-                          " a7  a6  a5   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x21;
-	delay		= 6;
-	blocksize	= 64;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 8192;
+        page_size          = 64;
+        num_pages          = 128;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 33;
+        delay              = 6;
+        blocksize          = 64;
+        readsize           = 256;
+        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--0000.xxxx--xxxa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--0000.xxxx--xxxa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0000.aaaa--aaax.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-      ;
-
-    memory "calibration"
-        size            = 4;
-        read            = "0 0 1 1  1 0 0 0     0 0 x x  x x x x",
-                          "0 0 0 0  0 0 a1 a0   o o o o  o o o o";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
-
-
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
+    memory "calibration"
+        size               = 4;
+        read               = "0011.1000--00xx.xxxx--0000.00aa--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega8535
 #------------------------------------------------------------
 
 part
-    id               = "m8535";
-    desc             = "ATmega8535";
-    stk500_devcode   = 0x64;
-    avr910_devcode   = 0x69;
-    signature        = 0x1e 0x93 0x08;
-    pagel            = 0xd7;
-    bs2              = 0xa0;
-    chip_erase_delay = 9000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 6;
-    togglevtg           = 0;
-    poweroffdelay       = 0;
-    resetdelayms        = 0;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega8535";
+    id                     = "m8535";
+    stk500_devcode         = 0x64;
+    avr910_devcode         = 0x69;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x93 0x08;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 6;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        size            = 512;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-	read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   x   x      x   x   x  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
+        size               = 512;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        readback           = 0xff 0xff;
+        mode               = 4;
+        delay              = 20;
+        blocksize          = 128;
+        readsize           = 256;
+        read               = "1010.0000--00xx.xxxa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--00xx.xxxa--aaaa.aaaa--iiii.iiii";
+    ;
 
-	write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   x   x      x   x   x  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-	mode		= 0x04;
-	delay		= 20;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
     memory "flash"
-        paged           = yes;
-        size            = 8192;
-        page_size       = 64;
-        num_pages       = 128;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0    0   0   0   0",
-                          "  0   0   0   0  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        read_hi         = "  0   0   1   0    1   0   0   0",
-                          "  0   0   0   0  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  0   0   0   0      x   x   x   x",
-                          "  x   x   x  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  0   0   0   0      x   x   x   x",
-                          "  x   x   x  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  0   0   0   0    a11 a10  a9  a8",
-                          " a7  a6  a5   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x21;
-	delay		= 6;
-	blocksize	= 64;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 8192;
+        page_size          = 64;
+        num_pages          = 128;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 33;
+        delay              = 6;
+        blocksize          = 64;
+        readsize           = 256;
+        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--0000.xxxx--xxxa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--0000.xxxx--xxxa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0000.aaaa--aaax.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        min_write_delay = 2000;
-        max_write_delay = 2000;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 2000;
+        max_write_delay    = 2000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        min_write_delay = 2000;
-        max_write_delay = 2000;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 2000;
+        max_write_delay    = 2000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        min_write_delay = 2000;
-        max_write_delay = 2000;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-      ;
-
-    memory "calibration"
-        size            = 4;
-        read            = "0 0 1 1  1 0 0 0   0 0 x x  x x x x",
-                          "0 0 0 0  0 0 a1 a0 o o o o  o o o o";
-      ;
+        size               = 1;
+        min_write_delay    = 2000;
+        max_write_delay    = 2000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
+    memory "calibration"
+        size               = 4;
+        read               = "0011.1000--00xx.xxxx--0000.00aa--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATtiny26
 #------------------------------------------------------------
 
 part
-    id                  = "t26";
-    desc                = "ATtiny26";
-    stk500_devcode      = 0x21;
-    avr910_devcode      = 0x5e;
-    signature           = 0x1e 0x91 0x09;
-    pagel               = 0xb3;
-    bs2                 = 0xb2;
-    chip_erase_delay    = 9000;
-    pgm_enable          = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
-                          "x x x x  x x x x   x x x x  x x x x";
-
-    chip_erase          = "1 0 1 0  1 1 0 0   1 0 0 x  x x x x",
-                          "x x x x  x x x x   x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-        0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC,
-        0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC,
-        0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C,
-        0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 2;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATtiny26";
+    id                     = "t26";
+    stk500_devcode         = 0x21;
+    avr910_devcode         = 0x5e;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xb3;
+    bs2                    = 0xb2;
+    signature              = 0x1e 0x91 0x09;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0xc4, 0xe4, 0xc4, 0xe4, 0xcc, 0xec, 0xcc, 0xec,
+        0xd4, 0xf4, 0xd4, 0xf4, 0xdc, 0xfc, 0xdc, 0xfc,
+        0xc8, 0xe8, 0xd8, 0xf8, 0x4c, 0x6c, 0x5c, 0x7c,
+        0xec, 0xbc, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 2;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        size            = 128;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read            = "1  0  1  0   0  0  0  0    x x x x  x x x x",
-                          "x a6 a5 a4  a3 a2 a1 a0    o o o o  o o o o";
-
-        write           = "1  1  0  0   0  0  0  0    x x x x  x x x x",
-                          "x a6 a5 a4  a3 a2 a1 a0    i i i i  i i i i";
-
-	mode		= 0x04;
-	delay		= 10;
-	blocksize	= 64;
-	readsize	= 256;
+        size               = 128;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        readback           = 0xff 0xff;
+        mode               = 4;
+        delay              = 10;
+        blocksize          = 64;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.xxxx--xaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
     ;
 
     memory "flash"
-        paged           = yes;
-        size            = 2048;
-        page_size       = 32;
-        num_pages       = 64;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0  0  1  0   0  0  0  0",
-                          "  x  x  x  x   x  x a9 a8",
-                          " a7 a6 a5 a4  a3 a2 a1 a0",
-                          "  o  o  o  o   o  o  o  o";
-
-        read_hi         = "  0  0  1  0   1  0  0  0",
-                          "  x  x  x  x   x  x a9 a8",
-                          " a7 a6 a5 a4  a3 a2 a1 a0",
-                          "  o  o  o  o   o  o  o  o";
-
-        loadpage_lo     = "  0  1  0  0   0  0  0  0",
-                          "  x  x  x  x   x  x  x  x",
-                          "  x  x  x  x  a3 a2 a1 a0",
-                          "  i  i  i  i   i  i  i  i";
-
-        loadpage_hi     = "  0  1  0  0   1  0  0  0",
-                          "  x  x  x  x   x  x  x  x",
-                          "  x  x  x  x  a3 a2 a1 a0",
-                          "  i  i  i  i   i  i  i  i";
-
-        writepage       = "  0  1  0  0   1  1  0  0",
-                          "  x  x  x  x   x  x a9 a8",
-                          " a7 a6 a5 a4   x  x  x  x",
-                          "  x  x  x  x   x  x  x  x";
-
-	mode		= 0x21;
-	delay		= 6;
-	blocksize	= 16;
-	readsize	= 256;
-    ;
-
-    memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0    x x x x  x x x x",
-                          "0  0  0  0   0  0 a1 a0    o o o o  o o o o";
-    ;
-
-    memory "lock"
-        size            = 1;
-        read            = "0  1  0  1   1  0  0  0    x x x x  x x x x",
-                          "x  x  x  x   x  x  x  x    x x x x  x x o o";
-
-        write           = "1  0  1  0   1  1  0  0    1 1 1 1  1 1 i i",
-                          "x  x  x  x   x  x  x  x    x x x x  x x x x";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
+        paged              = yes;
+        size               = 2048;
+        page_size          = 32;
+        num_pages          = 64;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 33;
+        delay              = 6;
+        blocksize          = 16;
+        readsize           = 256;
+        read_lo            = "0010.0000--xxxx.xxaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--xxxx.xxaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xxxx.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xxxx.aaaa--iiii.iiii";
+        writepage          = "0100.1100--xxxx.xxaa--aaaa.xxxx--xxxx.xxxx";
     ;
 
     memory "lfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  x x x i  i i i i";
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--xxxi.iiii";
+    ;
 
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--xxxx.xxoo";
+        write              = "1010.1100--1111.11ii--xxxx.xxxx--xxxx.xxxx";
+    ;
+
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--0000.00aa--oooo.oooo";
+    ;
 
     memory "calibration"
-        size            = 4;
-        read            = "0  0  1  1   1  0  0  0    x x x x  x x x x",
-                          "0  0  0  0   0  0 a1 a0    o o o o  o o o o";
+        size               = 4;
+        read               = "0011.1000--xxxx.xxxx--0000.00aa--oooo.oooo";
     ;
 ;
 
@@ -7391,186 +6046,122 @@ part
 #------------------------------------------------------------
 
 part
-    id                  = "t261";
-    desc                = "ATtiny261";
-     has_debugwire = yes;
-     flash_instr   = 0xB4, 0x00, 0x10;
-     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
-	             0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC,
-	             0x99, 0xE1, 0xBB, 0xAC;
-#    stk500_devcode      = 0x21;
-#    avr910_devcode      = 0x5e;
-    signature           = 0x1e 0x91 0x0c;
-    pagel               = 0xb3;
-    bs2                 = 0xb2;
-    chip_erase_delay    = 4000;
-
-    pgm_enable          = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
-                          "x x x x  x x x x   x x x x  x x x x";
-
-    chip_erase          = "1 0 1 0  1 1 0 0   1 0 0 x  x x x x",
-                          "x x x x  x x x x   x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-        0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC,
-        0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC,
-        0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C,
-        0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 2;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATtiny261";
+    id                     = "t261";
+    chip_erase_delay       = 4000;
+    pagel                  = 0xb3;
+    bs2                    = 0xb2;
+#   stk500_devcode         = 0x21;
+#   avr910_devcode         = 0x5e;
+    signature              = 0x1e 0x91 0x0c;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0xc4, 0xe4, 0xc4, 0xe4, 0xcc, 0xec, 0xcc, 0xec,
+        0xd4, 0xf4, 0xd4, 0xf4, 0xdc, 0xfc, 0xdc, 0xfc,
+        0xc8, 0xe8, 0xd8, 0xf8, 0x4c, 0x6c, 0x5c, 0x7c,
+        0xec, 0xbc, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
+    flash_instr            =  0xb4, 0x00, 0x10;
+    eeprom_instr           =
+        0xbb, 0xff, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
+        0xbc, 0x00, 0xb4, 0x00, 0xba, 0x0d, 0xbb, 0xbc,
+        0x99, 0xe1, 0xbb, 0xac;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 2;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    ocdrev              = 1;
+    ocdrev                 = 1;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no;
-        size            = 128;
-        page_size       = 4;
-        num_pages       = 32;
-        min_write_delay = 4000;
-        max_write_delay = 4000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-
-        read            = "1  0  1  0   0  0  0  0    x x x x  x x x x",
-                          "x a6 a5 a4  a3 a2 a1 a0    o o o o  o o o o";
-
-        write           = "1  1  0  0   0  0  0  0    x x x x  x x x x",
-                          "x a6 a5 a4  a3 a2 a1 a0    i i i i  i i i i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x   x   x",
-			  "  x  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 10;
-	blocksize	= 4;
-	readsize	= 256;
+        size               = 128;
+        page_size          = 4;
+        num_pages          = 32;
+        min_write_delay    = 4000;
+        max_write_delay    = 4000;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.xxxx--xaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxx--xaaa.aa00--xxxx.xxxx";
     ;
 
     memory "flash"
-        paged           = yes;
-        size            = 2048;
-        page_size       = 32;
-        num_pages       = 64;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-
-        read_lo         = "  0  0  1  0   0  0  0  0",
-                          "  x  x  x  x   x  x a9 a8",
-                          " a7 a6 a5 a4  a3 a2 a1 a0",
-                          "  o  o  o  o   o  o  o  o";
-
-        read_hi         = "  0  0  1  0   1  0  0  0",
-                          "  x  x  x  x   x  x a9 a8",
-                          " a7 a6 a5 a4  a3 a2 a1 a0",
-                          "  o  o  o  o   o  o  o  o";
-
-        loadpage_lo     = "  0  1  0  0   0  0  0  0",
-                          "  x  x  x  x   x  x  x  x",
-                          "  x  x  x  x  a3 a2 a1 a0",
-                          "  i  i  i  i   i  i  i  i";
-
-        loadpage_hi     = "  0  1  0  0   1  0  0  0",
-                          "  x  x  x  x   x  x  x  x",
-                          "  x  x  x  x  a3 a2 a1 a0",
-                          "  i  i  i  i   i  i  i  i";
-
-        writepage       = "  0  1  0  0   1  1  0  0",
-                          "  x  x  x  x   x  x a9 a8",
-                          " a7 a6 a5 a4   x  x  x  x",
-                          "  x  x  x  x   x  x  x  x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 32;
-	readsize	= 256;
-    ;
-
-    memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0    x x x x  x x x x",
-                          "0  0  0  0   0  0 a1 a0    o o o o  o o o o";
-    ;
-
-    memory "lock"
-        size            = 1;
-        read            = "0  1  0  1   1  0  0  0    x x x x  x x x x",
-                          "x  x  x  x   x  x  x  x    x x x x  x x o o";
-
-        write           = "1  0  1  0   1  1  0  0    1 1 1 1  1 1 i i",
-                          "x  x  x  x   x  x  x  x    x x x x  x x x x";
-        min_write_delay = 4500;
-        max_write_delay = 4500;
+        paged              = yes;
+        size               = 2048;
+        page_size          = 32;
+        num_pages          = 64;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 32;
+        readsize           = 256;
+        read_lo            = "0010.0000--xxxx.xxaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--xxxx.xxaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xxxx.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xxxx.aaaa--iiii.iiii";
+        writepage          = "0100.1100--xxxx.xxaa--aaaa.xxxx--xxxx.xxxx";
     ;
 
     memory "lfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x   x x x x  x x x i";
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
+    ;
 
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-      ;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--xxxx.xxoo";
+        write              = "1010.1100--1111.11ii--xxxx.xxxx--xxxx.xxxx";
+    ;
+
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--0000.00aa--oooo.oooo";
+    ;
 
     memory "calibration"
-        size            = 1;
-        read            = "0  0  1  1   1  0  0  0    x x x x  x x x x",
-                          "0  0  0  0   0  0  0  0    o o o o  o o o o";
+        size               = 1;
+        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
     ;
 ;
 
@@ -7579,195 +6170,131 @@ part
 #------------------------------------------------------------
 
 part parent "t261"
-    id               = "t261a";
-    desc             = "ATtiny261A";
-  ;
+    desc                   = "ATtiny261A";
+    id                     = "t261a";
+;
 
 #------------------------------------------------------------
 # ATtiny461
 #------------------------------------------------------------
 
 part
-    id                  = "t461";
-    desc                = "ATtiny461";
-     has_debugwire = yes;
-     flash_instr   = 0xB4, 0x00, 0x10;
-     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
-	             0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC,
-	             0x99, 0xE1, 0xBB, 0xAC;
-#    stk500_devcode      = 0x21;
-#    avr910_devcode      = 0x5e;
-    signature           = 0x1e 0x92 0x08;
-    pagel               = 0xb3;
-    bs2                 = 0xb2;
-    chip_erase_delay    = 4000;
-
-    pgm_enable          = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
-                          "x x x x  x x x x   x x x x  x x x x";
-
-    chip_erase          = "1 0 1 0  1 1 0 0   1 0 0 x  x x x x",
-                          "x x x x  x x x x   x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-        0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC,
-        0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC,
-        0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C,
-        0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 2;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATtiny461";
+    id                     = "t461";
+    chip_erase_delay       = 4000;
+    pagel                  = 0xb3;
+    bs2                    = 0xb2;
+#   stk500_devcode         = 0x21;
+#   avr910_devcode         = 0x5e;
+    signature              = 0x1e 0x92 0x08;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0xc4, 0xe4, 0xc4, 0xe4, 0xcc, 0xec, 0xcc, 0xec,
+        0xd4, 0xf4, 0xd4, 0xf4, 0xdc, 0xfc, 0xdc, 0xfc,
+        0xc8, 0xe8, 0xd8, 0xf8, 0x4c, 0x6c, 0x5c, 0x7c,
+        0xec, 0xbc, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
+    flash_instr            =  0xb4, 0x00, 0x10;
+    eeprom_instr           =
+        0xbb, 0xff, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
+        0xbc, 0x00, 0xb4, 0x00, 0xba, 0x0d, 0xbb, 0xbc,
+        0x99, 0xe1, 0xbb, 0xac;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 2;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    ocdrev              = 1;
+    ocdrev                 = 1;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no;
-        size            = 256;
-        page_size       = 4;
-        num_pages       = 64;
-        min_write_delay = 4000;
-        max_write_delay = 4000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-
-        read            = " 1  0  1  0   0  0  0  0    x x x x  x x x x",
-                          "a7 a6 a5 a4  a3 a2 a1 a0    o o o o  o o o o";
-
-        write           = " 1  1  0  0   0  0  0  0    x x x x  x x x x",
-                          "a7 a6 a5 a4  a3 a2 a1 a0    i i i i  i i i i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x   x   x",
-			  " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 10;
-	blocksize	= 4;
-	readsize	= 256;
+        size               = 256;
+        page_size          = 4;
+        num_pages          = 64;
+        min_write_delay    = 4000;
+        max_write_delay    = 4000;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.xxxx--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xxxx--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxx--aaaa.aa00--xxxx.xxxx";
     ;
 
     memory "flash"
-        paged           = yes;
-        size            = 4096;
-        page_size       = 64;
-        num_pages       = 64;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-
-        read_lo         = "  0  0  1  0   0   0  0  0",
-                          "  x  x  x  x   x a10 a9 a8",
-                          " a7 a6 a5 a4  a3  a2 a1 a0",
-                          "  o  o  o  o   o   o  o  o";
-
-        read_hi         = "  0  0  1  0   1   0  0  0",
-                          "  x  x  x  x   x a10 a9 a8",
-                          " a7 a6 a5 a4  a3  a2 a1 a0",
-                          "  o  o  o  o   o   o  o  o";
-
-        loadpage_lo     = "  0  1  0  0   0  0  0  0",
-                          "  x  x  x  x   x  x  x  x",
-                          "  x  x  x a4  a3 a2 a1 a0",
-                          "  i  i  i  i   i  i  i  i";
-
-        loadpage_hi     = "  0  1  0  0   1  0  0  0",
-                          "  x  x  x  x   x  x  x  x",
-                          "  x  x  x a4  a3 a2 a1 a0",
-                          "  i  i  i  i   i  i  i  i";
-
-        writepage       = "  0  1  0  0   1   1  0  0",
-                          "  x  x  x  x   x a10 a9 a8",
-                          " a7 a6 a5  x   x   x  x  x",
-                          "  x  x  x  x   x   x  x  x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 64;
-	readsize	= 256;
-    ;
-
-    memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0    x x x x  x x x x",
-                          "0  0  0  0   0  0 a1 a0    o o o o  o o o o";
-    ;
-
-    memory "lock"
-        size            = 1;
-        read            = "0  1  0  1   1  0  0  0    x x x x  x x x x",
-                          "x  x  x  x   x  x  x  x    x x x x  x x o o";
-
-        write           = "1  0  1  0   1  1  0  0    1 1 1 1  1 1 i i",
-                          "x  x  x  x   x  x  x  x    x x x x  x x x x";
-        min_write_delay = 4500;
-        max_write_delay = 4500;
+        paged              = yes;
+        size               = 4096;
+        page_size          = 64;
+        num_pages          = 64;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 64;
+        readsize           = 256;
+        read_lo            = "0010.0000--xxxx.xaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--xxxx.xaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xxxa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xxxa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--xxxx.xaaa--aaax.xxxx--xxxx.xxxx";
     ;
 
     memory "lfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x   x x x x  x x x i";
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
+    ;
 
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-      ;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--xxxx.xxoo";
+        write              = "1010.1100--1111.11ii--xxxx.xxxx--xxxx.xxxx";
+    ;
+
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--0000.00aa--oooo.oooo";
+    ;
 
     memory "calibration"
-        size            = 1;
-        read            = "0  0  1  1   1  0  0  0    x x x x  x x x x",
-                          "0  0  0  0   0  0  0  0    o o o o  o o o o";
+        size               = 1;
+        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
     ;
 ;
 
@@ -7776,195 +6303,131 @@ part
 #------------------------------------------------------------
 
 part parent "t461"
-    id               = "t461a";
-    desc             = "ATtiny461A";
-  ;
+    desc                   = "ATtiny461A";
+    id                     = "t461a";
+;
 
 #------------------------------------------------------------
 # ATtiny861
 #------------------------------------------------------------
 
 part
-    id                  = "t861";
-    desc                = "ATtiny861";
-     has_debugwire = yes;
-     flash_instr   = 0xB4, 0x00, 0x10;
-     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
-	             0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC,
-	             0x99, 0xE1, 0xBB, 0xAC;
-#    stk500_devcode      = 0x21;
-#    avr910_devcode      = 0x5e;
-    signature           = 0x1e 0x93 0x0d;
-    pagel               = 0xb3;
-    bs2                 = 0xb2;
-    chip_erase_delay    = 4000;
-
-    pgm_enable          = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
-                          "x x x x  x x x x   x x x x  x x x x";
-
-    chip_erase          = "1 0 1 0  1 1 0 0   1 0 0 x  x x x x",
-                          "x x x x  x x x x   x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 0;
-
-    pp_controlstack     =
-        0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC,
-        0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC,
-        0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C,
-        0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 2;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATtiny861";
+    id                     = "t861";
+    chip_erase_delay       = 4000;
+    pagel                  = 0xb3;
+    bs2                    = 0xb2;
+#   stk500_devcode         = 0x21;
+#   avr910_devcode         = 0x5e;
+    signature              = 0x1e 0x93 0x0d;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0xc4, 0xe4, 0xc4, 0xe4, 0xcc, 0xec, 0xcc, 0xec,
+        0xd4, 0xf4, 0xd4, 0xf4, 0xdc, 0xfc, 0xdc, 0xfc,
+        0xc8, 0xe8, 0xd8, 0xf8, 0x4c, 0x6c, 0x5c, 0x7c,
+        0xec, 0xbc, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
+    flash_instr            =  0xb4, 0x00, 0x10;
+    eeprom_instr           =
+        0xbb, 0xff, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
+        0xbc, 0x00, 0xb4, 0x00, 0xba, 0x0d, 0xbb, 0xbc,
+        0x99, 0xe1, 0xbb, 0xac;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 2;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    ocdrev              = 1;
+    ocdrev                 = 1;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no;
-        size            = 512;
-        num_pages       = 128;
-        page_size       = 4;
-        min_write_delay = 4000;
-        max_write_delay = 4000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-
-        read            = " 1  0  1  0   0  0  0  0    x x x x  x x x a8",
-                          "a7 a6 a5 a4  a3 a2 a1 a0    o o o o  o o o  o";
-
-        write           = " 1  1  0  0   0  0  0  0    x x x x  x x x a8",
-                          "a7 a6 a5 a4  a3 a2 a1 a0    i i i i  i i i  i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x   x  a8",
-			  " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 10;
-	blocksize	= 4;
-	readsize	= 256;
+        size               = 512;
+        page_size          = 4;
+        num_pages          = 128;
+        min_write_delay    = 4000;
+        max_write_delay    = 4000;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
     ;
 
     memory "flash"
-        paged           = yes;
-        size            = 8192;
-        page_size       = 64;
-        num_pages       = 128;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-
-        read_lo         = "  0  0  1  0   0   0  0  0",
-                          "  x  x  x  x a11 a10 a9 a8",
-                          " a7 a6 a5 a4  a3  a2 a1 a0",
-                          "  o  o  o  o   o   o  o  o";
-
-        read_hi         = "  0  0  1  0   1   0  0  0",
-                          "  x  x  x  x a11 a10 a9 a8",
-                          " a7 a6 a5 a4  a3  a2 a1 a0",
-                          "  o  o  o  o   o   o  o  o";
-
-        loadpage_lo     = "  0  1  0  0   0  0  0  0",
-                          "  x  x  x  x   x  x  x  x",
-                          "  x  x  x a4  a3 a2 a1 a0",
-                          "  i  i  i  i   i  i  i  i";
-
-        loadpage_hi     = "  0  1  0  0   1  0  0  0",
-                          "  x  x  x  x   x  x  x  x",
-                          "  x  x  x a4  a3 a2 a1 a0",
-                          "  i  i  i  i   i  i  i  i";
-
-        writepage       = "  0  1  0  0   1   1  0  0",
-                          "  x  x  x  x a11 a10 a9 a8",
-                          " a7 a6 a5  x   x   x  x  x",
-                          "  x  x  x  x   x   x  x  x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 64;
-	readsize	= 256;
-    ;
-
-    memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0    x x x x  x x x x",
-                          "0  0  0  0   0  0 a1 a0    o o o o  o o o o";
-    ;
-
-    memory "lock"
-        size            = 1;
-        read            = "0  1  0  1   1  0  0  0    x x x x  x x x x",
-                          "x  x  x  x   x  x  x  x    x x x x  x x o o";
-
-        write           = "1  0  1  0   1  1  0  0    1 1 1 1  1 1 i i",
-                          "x  x  x  x   x  x  x  x    x x x x  x x x x";
-        min_write_delay = 4500;
-        max_write_delay = 4500;
+        paged              = yes;
+        size               = 8192;
+        page_size          = 64;
+        num_pages          = 128;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 64;
+        readsize           = 256;
+        read_lo            = "0010.0000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xxxa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xxxa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--xxxx.aaaa--aaax.xxxx--xxxx.xxxx";
     ;
 
     memory "lfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x   x x x x  x x x i";
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
+    ;
 
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-      ;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--xxxx.xxoo";
+        write              = "1010.1100--1111.11ii--xxxx.xxxx--xxxx.xxxx";
+    ;
+
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--0000.00aa--oooo.oooo";
+    ;
 
     memory "calibration"
-        size            = 1;
-        read            = "0  0  1  1   1  0  0  0    x x x x  x x x x",
-                          "0  0  0  0   0  0  0  0    o o o o  o o o o";
+        size               = 1;
+        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
     ;
 ;
 
@@ -7973,9 +6436,9 @@ part
 #------------------------------------------------------------
 
 part parent "t861"
-    id               = "t861a";
-    desc             = "ATtiny861A";
-  ;
+    desc                   = "ATtiny861A";
+    id                     = "t861a";
+;
 
 #------------------------------------------------------------
 # ATtiny28
@@ -7984,703 +6447,503 @@ part parent "t861"
 # This is an HVPP-only device.
 
 part
-    id                  = "t28";
-    desc                = "ATtiny28";
-    stk500_devcode      = 0x22;
-    avr910_devcode      = 0x5c;
-    signature           = 0x1e 0x91 0x07;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 0;
-    togglevtg           = 0;
-    poweroffdelay       = 0;
-    resetdelayms        = 0;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    resetdelay          = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATtiny28";
+    id                     = "t28";
+    stk500_devcode         = 0x22;
+    avr910_devcode         = 0x5c;
+    signature              = 0x1e 0x91 0x07;
+    serial                 = no;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    hvleavestabdelay       = 15;
+    resetdelay             = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
 
     memory "flash"
-        size            = 2048;
-        page_size       = 2;
-        readsize        = 256;
-        delay           = 5;
-    ;
-
-    memory "signature"
-        size            = 3;
-    ;
-
-    memory "lock"
-        size            = 1;
-    ;
-
-    memory "calibration"
-        size            = 1;
+        size               = 2048;
+        page_size          = 2;
+        delay              = 5;
+        readsize           = 256;
     ;
 
     memory "fuse"
-        size            = 1;
+        size               = 1;
+    ;
+
+    memory "lock"
+        size               = 1;
+    ;
+
+    memory "signature"
+        size               = 3;
+    ;
+
+    memory "calibration"
+        size               = 1;
     ;
 ;
 
-
-
 #------------------------------------------------------------
 # ATmega48
 #------------------------------------------------------------
 
 part
-    id               = "m48";
-    desc             = "ATmega48";
-     has_debugwire = yes;
-     flash_instr   = 0xB6, 0x01, 0x11;
-     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
-	             0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
-	             0x99, 0xF9, 0xBB, 0xAF;
-    stk500_devcode   = 0x59;
-#    avr910_devcode   = 0x;
-    signature        = 0x1e 0x92 0x05;
-    pagel            = 0xd7;
-    bs2              = 0xc2;
-    chip_erase_delay = 45000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    pp_controlstack     =
-	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    resetdelay          = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega48";
+    id                     = "m48";
+    stk500_devcode         = 0x59;
+    chip_erase_delay       = 45000;
+    pagel                  = 0xd7;
+    bs2                    = 0xc2;
+#   avr910_devcode         = 0x??;
+    signature              = 0x1e 0x92 0x05;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    flash_instr            =  0xb6, 0x01, 0x11;
+    eeprom_instr           =
+        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
+        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
+        0x99, 0xf9, 0xbb, 0xaf;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    resetdelay             = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    ocdrev              = 1;
+    ocdrev                 = 1;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no;
-        page_size       = 4;
-        size            = 256;
-        min_write_delay = 3600;
-        max_write_delay = 3600;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-	read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   0   x      x   x   x   x",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
+        size               = 256;
+        page_size          = 4;
+        min_write_delay    = 3600;
+        max_write_delay    = 3600;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 20;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--000x.xxxx--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.xxxx--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxx--aaaa.aa00--xxxx.xxxx";
+    ;
 
-	write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   0   x      x   x   x   x",
-                          " a7  a6  a5  a4     a3  a2  a1  a0", 
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x   x   x",
-			  " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 20;
-	blocksize	= 4;
-	readsize	= 256;
-      ;
     memory "flash"
-        paged           = yes;
-        size            = 4096;
-        page_size       = 64;
-        num_pages       = 64;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read_lo         = "  0   0   1   0    0   0   0   0",
-                          "  0   0   0   0    0 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        read_hi         = "  0   0   1   0    1   0   0   0",
-                          "  0   0   0   0    0 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  0   0   0   x      x   x   x   x",
-                          "  x   x   x  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  0   0   0   x      x   x   x   x",
-                          "  x   x   x  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  0   0   0   0      0 a10  a9  a8",
-                          " a7  a6  a5   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 64;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 4096;
+        page_size          = 64;
+        num_pages          = 64;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 64;
+        readsize           = 256;
+        read_lo            = "0010.0000--0000.0aaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0000.0aaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0000.0aaa--aaax.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x   x x x x  x x x i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
+    ;
 
     memory "lock"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-      ;
-
-    memory "calibration"
-        size            = 1;
-        read            = "0  0  1  1   1  0  0  0   0  0  0  x   x  x  x  x",
-                          "0  0  0  0   0  0  0  0   o  o  o  o   o  o  o  o";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega48A
 #------------------------------------------------------------
 
 part parent "m48"
-    id               = "m48a";
-    desc             = "ATmega48A";
-  ;
+    desc                   = "ATmega48A";
+    id                     = "m48a";
+;
 
 #------------------------------------------------------------
 # ATmega48P
 #------------------------------------------------------------
 
 part parent "m48"
-    id               = "m48p";
-    desc             = "ATmega48P";
-    signature        = 0x1e 0x92 0x0a;
-  ;
+    desc                   = "ATmega48P";
+    id                     = "m48p";
+    signature              = 0x1e 0x92 0x0a;
+;
 
 #------------------------------------------------------------
 # ATmega48PA
 #------------------------------------------------------------
 
 part parent "m48"
-    id               = "m48pa";
-    desc             = "ATmega48PA";
-    signature        = 0x1e 0x92 0x0a;
-  ;
+    desc                   = "ATmega48PA";
+    id                     = "m48pa";
+    signature              = 0x1e 0x92 0x0a;
+;
 
 #------------------------------------------------------------
 # ATmega48PB
 #------------------------------------------------------------
 
 part parent "m48"
-    id               = "m48pb";
-    desc             = "ATmega48PB";
-    signature        = 0x1e 0x92 0x10;
-    chip_erase_delay = 10500;
-  ;
+    desc                   = "ATmega48PB";
+    id                     = "m48pb";
+    chip_erase_delay       = 10500;
+    signature              = 0x1e 0x92 0x10;
+;
 
 #------------------------------------------------------------
 # ATmega88
 #------------------------------------------------------------
 
 part
-    id               = "m88";
-    desc             = "ATmega88";
-     has_debugwire = yes;
-     flash_instr   = 0xB6, 0x01, 0x11;
-     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
-	             0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
-	             0x99, 0xF9, 0xBB, 0xAF;
-    stk500_devcode   = 0x73;
-#    avr910_devcode   = 0x;
-    signature        = 0x1e 0x93 0x0a;
-    pagel            = 0xd7;
-    bs2              = 0xc2;
-    chip_erase_delay = 9000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    pp_controlstack     =
-	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    resetdelay          = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega88";
+    id                     = "m88";
+    stk500_devcode         = 0x73;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xc2;
+#   avr910_devcode         = 0x??;
+    signature              = 0x1e 0x93 0x0a;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    flash_instr            =  0xb6, 0x01, 0x11;
+    eeprom_instr           =
+        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
+        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
+        0x99, 0xf9, 0xbb, 0xaf;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    resetdelay             = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    ocdrev              = 1;
+    ocdrev                 = 1;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no;
-        page_size       = 4;
-        size            = 512;
-        min_write_delay = 3600;
-        max_write_delay = 3600;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-	read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   0   x      x   x   x  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
+        size               = 512;
+        page_size          = 4;
+        min_write_delay    = 3600;
+        max_write_delay    = 3600;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 20;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--000x.xxxa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.xxxa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
+    ;
 
-	write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   0   x      x   x   x  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0", 
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x   x  a8",
-			  " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 20;
-	blocksize	= 4;
-	readsize	= 256;
-      ;
     memory "flash"
-        paged           = yes;
-        size            = 8192;
-        page_size       = 64;
-        num_pages       = 128;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0    0   0   0   0",
-                          "  0   0   0   0  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        read_hi         = "  0   0   1   0    1   0   0   0",
-                          "  0   0   0   0  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  0   0   0   x      x   x   x   x",
-                          "  x   x   x  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  0   0   0   x      x   x   x   x",
-                          "  x   x   x  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  0   0   0   0    a11 a10  a9  a8",
-                          " a7  a6  a5   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 64;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 8192;
+        page_size          = 64;
+        num_pages          = 128;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 64;
+        readsize           = 256;
+        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0000.aaaa--aaax.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x   x x x x  x i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-      ;
-
-    memory "calibration"
-        size            = 1;
-        read            = "0  0  1  1   1  0  0  0   0  0  0  x   x  x  x  x",
-                          "0  0  0  0   0  0  0  0   o  o  o  o   o  o  o  o";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega88A
 #------------------------------------------------------------
 
 part parent "m88"
-    id               = "m88a";
-    desc             = "ATmega88A";
-  ;
+    desc                   = "ATmega88A";
+    id                     = "m88a";
+;
 
 #------------------------------------------------------------
 # ATmega88P
 #------------------------------------------------------------
 
 part parent "m88"
-    id               = "m88p";
-    desc             = "ATmega88P";
-    signature        = 0x1e 0x93 0x0f;
-  ;
+    desc                   = "ATmega88P";
+    id                     = "m88p";
+    signature              = 0x1e 0x93 0x0f;
+;
 
 #------------------------------------------------------------
 # ATmega88PA
 #------------------------------------------------------------
 
 part parent "m88"
-    id               = "m88pa";
-    desc             = "ATmega88PA";
-    signature        = 0x1e 0x93 0x0f;
-  ;
+    desc                   = "ATmega88PA";
+    id                     = "m88pa";
+    signature              = 0x1e 0x93 0x0f;
+;
 
 #------------------------------------------------------------
 # ATmega88PB
 #------------------------------------------------------------
 
 part parent "m88"
-    id               = "m88pb";
-    desc             = "ATmega88PB";
-    signature        = 0x1e 0x93 0x16;
-    chip_erase_delay = 10500;
-  ;
+    desc                   = "ATmega88PB";
+    id                     = "m88pb";
+    chip_erase_delay       = 10500;
+    signature              = 0x1e 0x93 0x16;
+;
 
 #------------------------------------------------------------
 # ATmega168
 #------------------------------------------------------------
 
 part
-    id              = "m168";
-    desc            = "ATmega168";
-     has_debugwire = yes;
-     flash_instr   = 0xB6, 0x01, 0x11;
-     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
-	             0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
-	             0x99, 0xF9, 0xBB, 0xAF;
-    stk500_devcode  = 0x86;
-    # avr910_devcode = 0x;
-    signature       = 0x1e 0x94 0x06;
-    pagel           = 0xd7;
-    bs2             = 0xc2;
-    chip_erase_delay = 9000;
-    pgm_enable       = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
-                       "x x x x x x x x x x x x x x x x";
-
-    chip_erase       = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
-                       "x x x x x x x x x x x x x x x x";
-
-    timeout         = 200;
-    stabdelay       = 100;
-    cmdexedelay     = 25;
-    synchloops      = 32;
-    bytedelay       = 0;
-    pollindex       = 3;
-    pollvalue       = 0x53;
-    predelay        = 1;
-    postdelay       = 1;
-    pollmethod      = 1;
-
-    pp_controlstack     =
-	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    resetdelay          = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega168";
+    id                     = "m168";
+    stk500_devcode         = 0x86;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xc2;
+#   avr910_devcode         = 0x??;
+    signature              = 0x1e 0x94 0x06;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    flash_instr            =  0xb6, 0x01, 0x11;
+    eeprom_instr           =
+        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
+        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
+        0x99, 0xf9, 0xbb, 0xaf;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    resetdelay             = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    ocdrev              = 1;
+    ocdrev                 = 1;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no;
-        page_size       = 4;
-        size            = 512;
-        min_write_delay = 3600;
-        max_write_delay = 3600;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read            = " 1 0 1 0 0 0 0 0",
-                          " 0 0 0 x x x x a8",
-                          " a7 a6 a5 a4 a3 a2 a1 a0",
-                          " o o o o o o o o";
-    
-        write           = " 1 1 0 0 0 0 0 0",
-                          " 0 0 0 x x x x a8",
-                          " a7 a6 a5 a4 a3 a2 a1 a0",
-                          " i i i i i i i i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x   x  a8",
-			  " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 20;
-	blocksize	= 4;
-	readsize	= 256;
-        ;
+        size               = 512;
+        page_size          = 4;
+        min_write_delay    = 3600;
+        max_write_delay    = 3600;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 20;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--000x.xxxa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.xxxa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 16384;
-        page_size       = 128;
-        num_pages       = 128;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = " 0 0 1 0 0 0 0 0",
-                          " 0 0 0 a12 a11 a10 a9 a8",
-                          " a7 a6 a5 a4 a3 a2 a1 a0",
-                          " o o o o o o o o";
-        
-        read_hi          = " 0 0 1 0 1 0 0 0",
-                           " 0 0 0 a12 a11 a10 a9 a8",
-                           " a7 a6 a5 a4 a3 a2 a1 a0",
-                           " o o o o o o o o";
-        
-        loadpage_lo     = " 0 1 0 0 0 0 0 0",
-                          " 0 0 0 x x x x x",
-                          " x x a5 a4 a3 a2 a1 a0",
-                          " i i i i i i i i";
-        
-        loadpage_hi     = " 0 1 0 0 1 0 0 0",
-                          " 0 0 0 x x x x x",
-                          " x x a5 a4 a3 a2 a1 a0",
-                          " i i i i i i i i";
-        
-        writepage       = " 0 1 0 0 1 1 0 0",
-                          " 0 0 0 a12 a11 a10 a9 a8",
-                          " a7 a6 x x x x x x",
-                          " x x x x x x x x";
+        paged              = yes;
+        size               = 0x4000;
+        page_size          = 128;
+        num_pages          = 128;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--000a.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--000a.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xxaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xxaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--000a.aaaa--aaxx.xxxx--xxxx.xxxx";
+    ;
 
-        mode        = 0x41;
-        delay       = 6;
-        blocksize   = 128;
-        readsize    = 256;
-
-        ;
-        
     memory "lfuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
-                          "x x x x x x x x o o o o o o o o";
-        
-        write           = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
-                          "x x x x x x x x i i i i i i i i";
-        ;
-    
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
+
     memory "hfuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
-                          "x x x x x x x x o o o o o o o o";
-        
-        write           = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
-                          "x x x x x x x x i i i i i i i i";
-        ;
-    
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
+
     memory "efuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
-                          "x x x x x x x x o o o o o o o o";
-        
-        write           = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
-                          "x x x x x x x x x x x x x i i i";
-        ;
-    
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xiii";
+    ;
+
     memory "lock"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
-                          "x x x x x x x x o o o o o o o o";
-        
-        write           = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
-                          "x x x x x x x x 1 1 i i i i i i";
-        ;
-    
-    memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
-                          "0 0 0 0 0 0 0 0 o o o o o o o o";
-        ;
-    
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
+
     memory "signature"
-        size            = 3;
-        read            = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
-                          "x x x x x x a1 a0 o o o o o o o o";
-        ;
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
+    ;
 ;
 
 #------------------------------------------------------------
@@ -8688,227 +6951,164 @@ part
 #------------------------------------------------------------
 
 part parent "m168"
-    id               = "m168a";
-    desc             = "ATmega168A";
-  ;
+    desc                   = "ATmega168A";
+    id                     = "m168a";
+;
 
 #------------------------------------------------------------
 # ATmega168P
 #------------------------------------------------------------
 
 part parent "m168"
-    id              = "m168p";
-    desc            = "ATmega168P";
-    signature       = 0x1e 0x94 0x0b;
-  ;
+    desc                   = "ATmega168P";
+    id                     = "m168p";
+    signature              = 0x1e 0x94 0x0b;
+;
 
 #------------------------------------------------------------
 # ATmega168PA
 #------------------------------------------------------------
 
 part parent "m168"
-    id              = "m168pa";
-    desc            = "ATmega168PA";
-    signature       = 0x1e 0x94 0x0b;
-  ;
+    desc                   = "ATmega168PA";
+    id                     = "m168pa";
+    signature              = 0x1e 0x94 0x0b;
+;
 
 #------------------------------------------------------------
 # ATmega168PB
 #------------------------------------------------------------
 
 part parent "m168"
-    id              = "m168pb";
-    desc            = "ATmega168PB";
-    signature       = 0x1e 0x94 0x15;
-    chip_erase_delay = 10500;
-  ;
+    desc                   = "ATmega168PB";
+    id                     = "m168pb";
+    chip_erase_delay       = 10500;
+    signature              = 0x1e 0x94 0x15;
+;
 
 #------------------------------------------------------------
 # ATtiny828
 #------------------------------------------------------------
 
 part
-    id              = "t828";
-    desc            = "ATtiny828";
-     has_debugwire = yes;
-     flash_instr   = 0xB6, 0x01, 0x11;
-     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
-                0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
-                0x99, 0xF9, 0xBB, 0xAF;
-    stk500_devcode  = 0x86;
-    # avr910_devcode = 0x;
-    signature       = 0x1e 0x93 0x14;
-    pagel           = 0xd7;
-    bs2             = 0xc2;
-    chip_erase_delay = 15000;
-    pgm_enable       = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
-                       "x x x x x x x x x x x x x x x x";
-
-    chip_erase       = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
-                       "x x x x x x x x x x x x x x x x";
-
-    timeout         = 200;
-    stabdelay       = 100;
-    cmdexedelay     = 25;
-    synchloops      = 32;
-    bytedelay       = 0;
-    pollindex       = 3;
-    pollvalue       = 0x53;
-    predelay        = 1;
-    postdelay       = 1;
-    pollmethod      = 1;
-
-    pp_controlstack     =
-   0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-   0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-   0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-   0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    resetdelay          = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATtiny828";
+    id                     = "t828";
+    stk500_devcode         = 0x86;
+    chip_erase_delay       = 15000;
+    pagel                  = 0xd7;
+    bs2                    = 0xc2;
+#   avr910_devcode         = 0x??;
+    signature              = 0x1e 0x93 0x14;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    flash_instr            =  0xb6, 0x01, 0x11;
+    eeprom_instr           =
+        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
+        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
+        0x99, 0xf9, 0xbb, 0xaf;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    resetdelay             = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no;
-        page_size       = 4;
-        size            = 256;
-        min_write_delay = 3600;
-        max_write_delay = 3600;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read            = " 1 0 1 0 0 0 0 0",
-                          " 0 0 0 x x x x a8",
-                          " a7 a6 a5 a4 a3 a2 a1 a0",
-                          " o o o o o o o o";
-
-        write           = " 1 1 0 0 0 0 0 0",
-                          " 0 0 0 x x x x a8",
-                          " a7 a6 a5 a4 a3 a2 a1 a0",
-                          " i i i i i i i i";
-
-   loadpage_lo   = "  1   1   0   0      0   0   0   1",
-                   "  0   0   0   0      0   0   0   0",
-                   "  0   0   0   0      0   0  a1  a0",
-                   "  i   i   i   i      i   i   i   i";
-
-writepage   = "  1   1   0   0      0   0   1   0",
-              "  0   0   x   x      x   x   x  a8",
-              " a7  a6  a5  a4     a3  a2   0   0",
-              "  x   x   x   x      x   x   x   x";
-
-   mode      = 0x41;
-   delay      = 5;
-   blocksize   = 4;
-   readsize   = 256;
-        ;
+        size               = 256;
+        page_size          = 4;
+        min_write_delay    = 3600;
+        max_write_delay    = 3600;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 5;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--000x.xxxa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.xxxa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 8192;
-        page_size       = 64;
-        num_pages       = 128;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = " 0 0 1 0 0 0 0 0",
-                          " 0 0 0 0 a11 a10 a9 a8",
-                          " a7 a6 a5 a4 a3 a2 a1 a0",
-                          " o o o o o o o o";
-
-        read_hi          = " 0 0 1 0 1 0 0 0",
-                           " 0 0 0 0 a11 a10 a9 a8",
-                           " a7 a6 a5 a4 a3 a2 a1 a0",
-                           " o o o o o o o o";
-
-        loadpage_lo     = " 0 1 0 0 0 0 0 0",
-                          " 0 0 0 x x x x x",
-                          " x x x a4 a3 a2 a1 a0",
-                          " i i i i i i i i";
-
-        loadpage_hi     = " 0 1 0 0 1 0 0 0",
-                          " 0 0 0 x x x x x",
-                          " x x x a4 a3 a2 a1 a0",
-                          " i i i i i i i i";
-
-        writepage       = " 0 1 0 0 1 1 0 0",
-                          " 0 0 0 0 a11 a10 a9 a8",
-                          " a7 a6 a5 x x x x x",
-                          " x x x x x x x x";
-
-        mode        = 0x41;
-        delay       = 6;
-        blocksize   = 128;
-        readsize    = 256;
-
-        ;
+        paged              = yes;
+        size               = 8192;
+        page_size          = 64;
+        num_pages          = 128;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0000.aaaa--aaax.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
-                          "x x x x x x x x o o o o o o o o";
-
-        write           = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
-                          "x x x x x x x x i i i i i i i i";
-        ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
-                          "x x x x x x x x o o o o o o o o";
-
-        write           = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
-                          "x x x x x x x x i i i i i i i i";
-        ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
-                          "x x x x x x x x o o o o o o o o";
-
-        write           = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
-                          "x x x x x x x x 1 1 1 i i i i i";
-        ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--111i.iiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
-                          "x x x x x x x x o o o o o o o o";
-
-        write           = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
-                          "x x x x x x x x 1 1 i i i i i i";
-        ;
-
-    memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
-                          "0 0 0 0 0 0 0 0 o o o o o o o o";
-        ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
-                          "x x x x x x a1 a0 o o o o o o o o";
-        ;
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
+    ;
 ;
 
 #------------------------------------------------------------
@@ -8916,946 +7116,634 @@ writepage   = "  1   1   0   0      0   0   1   0",
 #------------------------------------------------------------
 
 part parent "t828"
-    id              = "t828r";
-    desc            = "ATtiny828R";
-  ;
+    desc                   = "ATtiny828R";
+    id                     = "t828r";
+;
 
 #------------------------------------------------------------
 # ATtiny87
 #------------------------------------------------------------
 
 part
-     id            = "t87";
-     desc          = "ATtiny87";
-     has_debugwire = yes;
-     flash_instr   = 0xB6, 0x01, 0x11;
-     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4,
-               0x00, 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB,
-               0xBF, 0x99, 0xF9, 0xBB, 0xAF;
-## no STK500 devcode in XML file, use the ATtiny45 one
-     stk500_devcode   = 0x14;
-##  Try the AT90S2313 devcode:
-     avr910_devcode   = 0x20;
-     signature        = 0x1e 0x93 0x87;
-     reset            = io;
-     chip_erase_delay = 15000;
-
-     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-    timeout         = 200;
-    stabdelay       = 100;
-    cmdexedelay     = 25;
-    synchloops      = 32;
-    bytedelay       = 0;
-    pollindex       = 3;
-    pollvalue       = 0x53;
-    predelay        = 1;
-    postdelay       = 1;
-    pollmethod      = 0;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0E, 0x1E, 0x2E, 0x3E, 0x2E, 0x3E,
-        0x4E, 0x5E, 0x4E, 0x5E, 0x6E, 0x7E, 0x6E, 0x7E,
-        0x06, 0x16, 0x46, 0x56, 0x0A, 0x1A, 0x4A, 0x5A,
-        0x1E, 0x7C, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 20;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATtiny87";
+    id                     = "t87";
+#   no STK500 devcode in XML file, use the ATtiny45 one
+    stk500_devcode         = 0x14;
+#   Try the AT90S2313 devcode:
+    avr910_devcode         = 0x20;
+    chip_erase_delay       = 15000;
+    signature              = 0x1e 0x93 0x87;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0e, 0x1e, 0x2e, 0x3e, 0x2e, 0x3e,
+        0x4e, 0x5e, 0x4e, 0x5e, 0x6e, 0x7e, 0x6e, 0x7e,
+        0x06, 0x16, 0x46, 0x56, 0x0a, 0x1a, 0x4a, 0x5a,
+        0x1e, 0x7c, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    flash_instr            =  0xb6, 0x01, 0x11;
+    eeprom_instr           =
+        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
+        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
+        0x99, 0xf9, 0xbb, 0xaf;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 20;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
+    spmcr                  = 0x57;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
-    idr                 = 0x00;
-    spmcr               = 0x57;
-    allowfullpagebitstream = no;
+    memory "eeprom"
+        size               = 512;
+        page_size          = 4;
+        min_write_delay    = 4000;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--00xx.xxxa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--00xx.xxxa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
+    ;
 
-     memory "eeprom"
-         size            = 512;
-        paged           = no;
-        page_size       = 4;
-         min_write_delay = 4000;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read            = "1  0  1  0   0  0  0  0    0 0 x x  x x x a8",
-                           "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
+    memory "flash"
+        paged              = yes;
+        size               = 8192;
+        page_size          = 128;
+        num_pages          = 64;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 64;
+        readsize           = 256;
+        read_lo            = "0010.0000--000a.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--000a.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xxaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xxaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0000.aaaa--aaax.xxxx--xxxx.xxxx";
+    ;
 
-         write           = "1  1  0  0   0  0  0  0    0 0 x x  x x x a8",
-                           "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
+    memory "lfuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
-  loadpage_lo   = "  1   1   0   0      0   0   0   1",
-        "  0   0   0   0      0   0   0   0",
-        "  0   0   0   0      0   0  a1  a0",
-        "  i   i   i   i      i   i   i   i";
+    memory "hfuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
-  writepage = "  1   1   0   0      0   0   1   0",
-        "  0   0   x   x      x   x   x  a8",
-        " a7  a6  a5  a4     a3  a2   0   0",
-        "  x   x   x   x      x   x   x   x";
+    memory "efuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
+    ;
 
-  mode      = 0x41;
-  delay     = 10;
-  blocksize = 4;
-  readsize  = 256;
-       ;
-     memory "flash"
-         paged           = yes;
-         size            = 8192;
-         page_size       = 128;
-         num_pages       = 64;
-         min_write_delay = 4500;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read_lo         = "  0   0   1   0    0   0   0   0",
-                           "  0   0   0  a12  a11 a10  a9  a8",
-                           " a7  a6  a5  a4   a3  a2   a1  a0",
-                           "  o   o   o   o    o   o   o   o";
-
-         read_hi         = "  0   0   1   0    1   0   0   0",
-                           "  0   0   0  a12  a11 a10  a9  a8",
-                           " a7  a6  a5  a4   a3  a2   a1  a0",
-                           "  o   o   o   o    o   o   o   o";
-
-         loadpage_lo     = "  0   1   0   0    0   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x  a5  a4   a3  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         loadpage_hi     = "  0   1   0   0    1   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x  a5  a4   a3  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         writepage       = "  0  1  0  0   1   1   0  0",
-                           "  0  0  0  0  a11 a10 a9 a8",
-                           " a7 a6 a5  x   x  x  x  x",
-                           "  x  x  x  x   x  x  x  x";
-
-  mode      = 0x41;
-  delay     = 10;
-  blocksize = 64;
-  readsize  = 256;
-       ;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--0000.0000--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--xxxx.xxii";
+    ;
 #   ATtiny87 has Signature Bytes: 0x1E 0x93 0x87.
-     memory "signature"
-         size            = 3;
-         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-       ;
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
-     memory "lock"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
-                           "x x x x  x x x x  x x x x  x x i i";
-         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
-                           "0 0 0 0  0 0 0 0  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "lfuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "hfuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "efuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                           "x x x x  x x x x  x x x x  x x x i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-     ;
-
-     memory "calibration"
-         size            = 1;
-         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
-                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
-     ;
-  ;
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.000a--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATtiny167
 #------------------------------------------------------------
 
 part
-     id            = "t167";
-     desc          = "ATtiny167";
-     has_debugwire = yes;
-     flash_instr   = 0xB6, 0x01, 0x11;
-     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4,
-               0x00, 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB,
-               0xBF, 0x99, 0xF9, 0xBB, 0xAF;
-## no STK500 devcode in XML file, use the ATtiny45 one
-     stk500_devcode   = 0x14;
-##  avr910_devcode   = ?;
-##  Try the AT90S2313 devcode:
-     avr910_devcode   = 0x20;
-     signature        = 0x1e 0x94 0x87;
-     reset            = io;
-     chip_erase_delay = 15000;
-
-     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-    timeout     = 200;
-    stabdelay       = 100;
-    cmdexedelay     = 25;
-    synchloops      = 32;
-    bytedelay       = 0;
-    pollindex       = 3;
-    pollvalue       = 0x53;
-    predelay        = 1;
-    postdelay       = 1;
-    pollmethod      = 0;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0E, 0x1E, 0x2E, 0x3E, 0x2E, 0x3E,
-        0x4E, 0x5E, 0x4E, 0x5E, 0x6E, 0x7E, 0x6E, 0x7E,
-        0x06, 0x16, 0x46, 0x56, 0x0A, 0x1A, 0x4A, 0x5A,
-        0x1E, 0x7C, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 20;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATtiny167";
+    id                     = "t167";
+#   no STK500 devcode in XML file, use the ATtiny45 one
+    stk500_devcode         = 0x14;
+#   avr910_devcode         = 0x??;
+#   Try the AT90S2313 devcode:
+    avr910_devcode         = 0x20;
+    chip_erase_delay       = 15000;
+    signature              = 0x1e 0x94 0x87;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0e, 0x1e, 0x2e, 0x3e, 0x2e, 0x3e,
+        0x4e, 0x5e, 0x4e, 0x5e, 0x6e, 0x7e, 0x6e, 0x7e,
+        0x06, 0x16, 0x46, 0x56, 0x0a, 0x1a, 0x4a, 0x5a,
+        0x1e, 0x7c, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    flash_instr            =  0xb6, 0x01, 0x11;
+    eeprom_instr           =
+        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
+        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
+        0x99, 0xf9, 0xbb, 0xaf;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 20;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
+    spmcr                  = 0x57;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
-    idr                 = 0x00;
-    spmcr               = 0x57;
-    allowfullpagebitstream = no;
+    memory "eeprom"
+        size               = 512;
+        page_size          = 4;
+        min_write_delay    = 4000;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--00xx.xxxa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--00xx.xxxa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
+    ;
 
-     memory "eeprom"
-         size            = 512;
-        paged           = no;
-        page_size       = 4;
-         min_write_delay = 4000;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read            = "1  0  1  0   0  0  0  0    0 0 x x  x x x a8",
-                           "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
+    memory "flash"
+        paged              = yes;
+        size               = 0x4000;
+        page_size          = 128;
+        num_pages          = 128;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 64;
+        readsize           = 256;
+        read_lo            = "0010.0000--000a.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--000a.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xxaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xxaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--000a.aaaa--aaxx.xxxx--xxxx.xxxx";
+    ;
 
-         write           = "1  1  0  0   0  0  0  0    0 0 x x  x x x a8",
-                           "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
+    memory "lfuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
-  loadpage_lo   = "  1   1   0   0      0   0   0   1",
-        "  0   0   0   0      0   0   0   0",
-        "  0   0   0   0      0   0  a1  a0",
-        "  i   i   i   i      i   i   i   i";
+    memory "hfuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
-  writepage = "  1   1   0   0      0   0   1   0",
-        "  0   0   x   x      x   x   x  a8",
-        " a7  a6  a5  a4     a3  a2   0   0",
-        "  x   x   x   x      x   x   x   x";
+    memory "efuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
+    ;
 
-  mode      = 0x41;
-  delay     = 10;
-  blocksize = 4;
-  readsize  = 256;
-       ;
-     memory "flash"
-         paged           = yes;
-         size            = 16384;
-         page_size       = 128;
-         num_pages       = 128;
-         min_write_delay = 4500;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read_lo         = "  0   0   1   0    0   0   0   0",
-                           "  0   0   0  a12  a11 a10  a9  a8",
-                           " a7  a6  a5  a4   a3  a2   a1  a0",
-                           "  o   o   o   o    o   o   o   o";
-
-         read_hi         = "  0   0   1   0    1   0   0   0",
-                           "  0   0   0  a12  a11 a10  a9  a8",
-                           " a7  a6  a5  a4   a3  a2   a1  a0",
-                           "  o   o   o   o    o   o   o   o";
-
-         loadpage_lo     = "  0   1   0   0    0   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x  a5  a4   a3  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         loadpage_hi     = "  0   1   0   0    1   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x  a5  a4   a3  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-          writepage       = "  0  1  0  0   1   1   0  0",
-                           "  0  0  0  a12  a11 a10 a9 a8",
-                           " a7 a6 x  x   x  x  x  x",
-                           "  x  x  x  x   x  x  x  x";
-
-  mode      = 0x41;
-  delay     = 10;
-  blocksize = 64;
-  readsize  = 256;
-       ;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--0000.0000--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--xxxx.xxii";
+    ;
 #   ATtiny167 has Signature Bytes: 0x1E 0x94 0x87.
-     memory "signature"
-         size            = 3;
-         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-       ;
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
-     memory "lock"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
-                           "x x x x  x x x x  x x x x  x x i i";
-         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
-                           "0 0 0 0  0 0 0 0  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "lfuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "hfuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "efuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                           "x x x x  x x x x  x x x x  x x x i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-     ;
-
-     memory "calibration"
-         size            = 1;
-         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
-                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
-     ;
-  ;
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.000a--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATtiny48
 #------------------------------------------------------------
 
 part
-    id               = "t48";
-    desc             = "ATtiny48";
-     has_debugwire = yes;
-     flash_instr   = 0xB6, 0x01, 0x11;
-     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
-                     0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
-                     0x99, 0xF9, 0xBB, 0xAF;
-    stk500_devcode   = 0x73;
-#    avr910_devcode   = 0x;
-    signature        = 0x1e 0x92 0x09;
-    pagel            = 0xd7;
-    bs2              = 0xc2;
-    chip_erase_delay = 15000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout             = 200;
-    stabdelay           = 100;
-    cmdexedelay         = 25;
-    synchloops          = 32;
-    bytedelay           = 0;
-    pollindex           = 3;
-    pollvalue           = 0x53;
-    predelay            = 1;
-    postdelay           = 1;
-    pollmethod          = 1;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    resetdelay          = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATtiny48";
+    id                     = "t48";
+    stk500_devcode         = 0x73;
+    chip_erase_delay       = 15000;
+    pagel                  = 0xd7;
+    bs2                    = 0xc2;
+#   avr910_devcode         = 0x??;
+    signature              = 0x1e 0x92 0x09;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    flash_instr            =  0xb6, 0x01, 0x11;
+    eeprom_instr           =
+        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
+        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
+        0x99, 0xf9, 0xbb, 0xaf;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    resetdelay             = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    ocdrev              = 1;
+    ocdrev                 = 1;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no;
-        page_size       = 4;
-        size            = 64;
-        min_write_delay = 3600;
-        max_write_delay = 3600;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   0   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
+        size               = 64;
+        page_size          = 4;
+        min_write_delay    = 3600;
+        max_write_delay    = 3600;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 20;
+        blocksize          = 4;
+        readsize           = 64;
+        read               = "1010.0000--000x.xxxx--xaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.xxxx--xaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxx--xaaa.aa00--xxxx.xxxx";
+    ;
 
-        write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   0   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_lo     = "  1   1   0   0      0   0   0   1",
-                          "  0   0   0   0      0   0   0   0",
-                          "  0   0   0   0      0   0  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  1   1   0   0      0   0   1   0",
-                          "  0   0   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2   0   0",
-                          "  x   x   x   x      x   x   x   x";
-
-        mode            = 0x41;
-        delay           = 20;
-        blocksize       = 4;
-        readsize        = 64;
-      ;
     memory "flash"
-        paged           = yes;
-        size            = 4096;
-        page_size       = 64;
-        num_pages       = 64;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0    0   0   0   0",
-                          "  0   0   0   0  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        read_hi         = "  0   0   1   0    1   0   0   0",
-                          "  0   0   0   0  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  0   0   0   x      x   x   x   x",
-                          "  x   x   x  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  0   0   0   x      x   x   x   x",
-                          "  x   x   x  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  0   0   0   0    a11 a10  a9  a8",
-                          " a7  a6  a5   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-        mode            = 0x41;
-        delay           = 6;
-        blocksize       = 64;
-        readsize        = 256;
-      ;
+        paged              = yes;
+        size               = 4096;
+        page_size          = 64;
+        num_pages          = 64;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 64;
+        readsize           = 256;
+        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0000.aaaa--aaax.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x   1 1 1 1  1 1 1 i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--1111.111i";
+    ;
 
     memory "lock"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-      ;
-
-    memory "calibration"
-        size            = 1;
-        read            = "0  0  1  1   1  0  0  0   0  0  0  x   x  x  x  x",
-                          "0  0  0  0   0  0  0  0   o  o  o  o   o  o  o  o";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATtiny88
 #------------------------------------------------------------
 
 part
-    id               = "t88";
-    desc             = "ATtiny88";
-     has_debugwire = yes;
-     flash_instr   = 0xB6, 0x01, 0x11;
-     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
-	             0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
-	             0x99, 0xF9, 0xBB, 0xAF;
-    stk500_devcode   = 0x73;
-#    avr910_devcode   = 0x;
-    signature        = 0x1e 0x93 0x11;
-    pagel            = 0xd7;
-    bs2              = 0xc2;
-    chip_erase_delay = 9000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    pp_controlstack     =
-	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    resetdelay          = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATtiny88";
+    id                     = "t88";
+    stk500_devcode         = 0x73;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xc2;
+#   avr910_devcode         = 0x??;
+    signature              = 0x1e 0x93 0x11;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    flash_instr            =  0xb6, 0x01, 0x11;
+    eeprom_instr           =
+        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
+        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
+        0x99, 0xf9, 0xbb, 0xaf;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    resetdelay             = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    ocdrev              = 1;
+    ocdrev                 = 1;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no;
-        page_size       = 4;
-        size            = 64;
-        min_write_delay = 3600;
-        max_write_delay = 3600;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-	read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   0   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
+        size               = 64;
+        page_size          = 4;
+        min_write_delay    = 3600;
+        max_write_delay    = 3600;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 20;
+        blocksize          = 4;
+        readsize           = 64;
+        read               = "1010.0000--000x.xxxx--xaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.xxxx--xaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxx--xaaa.aa00--xxxx.xxxx";
+    ;
 
-	write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   0   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x   x   x",
-			  "  x  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 20;
-	blocksize	= 4;
-	readsize	= 64;
-      ;
     memory "flash"
-        paged           = yes;
-        size            = 8192;
-        page_size       = 64;
-        num_pages       = 128;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0    0   0   0   0",
-                          "  0   0   0   0  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        read_hi         = "  0   0   1   0    1   0   0   0",
-                          "  0   0   0   0  a11 a10  a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  0   0   0   x      x   x   x   x",
-                          "  x   x   x  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  0   0   0   x      x   x   x   x",
-                          "  x   x   x  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  0   0   0   0    a11 a10  a9  a8",
-                          " a7  a6  a5   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 64;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 8192;
+        page_size          = 64;
+        num_pages          = 128;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 64;
+        readsize           = 256;
+        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0000.aaaa--aaax.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x   x x x x  x x x i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
+    ;
 
     memory "lock"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-      ;
-
-    memory "calibration"
-        size            = 1;
-        read            = "0  0  1  1   1  0  0  0   0  0  0  x   x  x  x  x",
-                          "0  0  0  0   0  0  0  0   o  o  o  o   o  o  o  o";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega328
 #------------------------------------------------------------
 
 part
-    id			= "m328";
-    desc		= "ATmega328";
-    has_debugwire	= yes;
-    flash_instr		= 0xB6, 0x01, 0x11;
-    eeprom_instr	= 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
-			  0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
-			  0x99, 0xF9, 0xBB, 0xAF;
-    stk500_devcode	= 0x86;
-    # avr910_devcode	= 0x;
-    signature		= 0x1e 0x95 0x14;
-    pagel		= 0xd7;
-    bs2			= 0xc2;
-    chip_erase_delay	= 9000;
-    pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
-		 "x x x x x x x x x x x x x x x x";
-
-    chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
-		 "x x x x x x x x x x x x x x x x";
-
-    timeout	= 200;
-    stabdelay	= 100;
-    cmdexedelay	= 25;
-    synchloops	= 32;
-    bytedelay	= 0;
-    pollindex	= 3;
-    pollvalue	= 0x53;
-    predelay	= 1;
-    postdelay	= 1;
-    pollmethod	= 1;
-
-    pp_controlstack =
-	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay	= 100;
-    progmodedelay	= 0;
-    latchcycles		= 5;
-    togglevtg		= 1;
-    poweroffdelay	= 15;
-    resetdelayms	= 1;
-    resetdelayus	= 0;
-    hvleavestabdelay	= 15;
-    resetdelay		= 15;
-    chiperasepulsewidth	= 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega328";
+    id                     = "m328";
+    stk500_devcode         = 0x86;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xc2;
+#   avr910_devcode         = 0x??;
+    signature              = 0x1e 0x95 0x14;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    flash_instr            =  0xb6, 0x01, 0x11;
+    eeprom_instr           =
+        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
+        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
+        0x99, 0xf9, 0xbb, 0xaf;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    resetdelay             = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    ocdrev              = 1;
+    ocdrev                 = 1;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-	paged		= no;
-	page_size	= 4;
-	size		= 1024;
-	min_write_delay = 3600;
-	max_write_delay = 3600;
-	readback_p1	= 0xff;
-	readback_p2	= 0xff;
-	read = " 1 0 1 0 0 0 0 0",
-	       " 0 0 0 x x x a9 a8",
-	       " a7 a6 a5 a4 a3 a2 a1 a0",
-	       " o o o o o o o o";
-
-	write = " 1 1 0 0 0 0 0 0",
-	      	" 0 0 0 x x x a9 a8",
-		" a7 a6 a5 a4 a3 a2 a1 a0",
-		" i i i i i i i i";
-
-	loadpage_lo = " 1 1 0 0 0 0 0 1",
-		      " 0 0 0 0 0 0 0 0",
-		      " 0 0 0 0 0 0 a1 a0",
-		      " i i i i i i i i";
-
-	writepage = " 1 1 0 0 0 0 1 0",
-		    " 0 0 x x x x a9 a8",
-		    " a7 a6 a5 a4 a3 a2 0 0",
-		    " x x x x x x x x";
-
-	mode		= 0x41;
-	delay		= 20;
-	blocksize	= 4;
-	readsize	= 256;
+        size               = 1024;
+        page_size          = 4;
+        min_write_delay    = 3600;
+        max_write_delay    = 3600;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 20;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--000x.xxaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.xxaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxaa--aaaa.aa00--xxxx.xxxx";
     ;
 
     memory "flash"
-	paged		= yes;
-	size		= 32768;
-	page_size	= 128;
-	num_pages	= 256;
-	min_write_delay = 4500;
-	max_write_delay = 4500;
-	readback_p1	= 0xff;
-	readback_p2	= 0xff;
-	read_lo = " 0 0 1 0 0 0 0 0",
-		  " 0 0 a13 a12 a11 a10 a9 a8",
-		  " a7 a6 a5 a4 a3 a2 a1 a0",
-		  " o o o o o o o o";
-
-	read_hi = " 0 0 1 0 1 0 0 0",
-		  " 0 0 a13 a12 a11 a10 a9 a8",
-		  " a7 a6 a5 a4 a3 a2 a1 a0",
-		  " o o o o o o o o";
-
-	loadpage_lo = " 0 1 0 0 0 0 0 0",
-		      " 0 0 0 x x x x x",
-		      " x x a5 a4 a3 a2 a1 a0",
-		      " i i i i i i i i";
-
-	loadpage_hi = " 0 1 0 0 1 0 0 0",
-		      " 0 0 0 x x x x x",
-		      " x x a5 a4 a3 a2 a1 a0",
-		      " i i i i i i i i";
-
-	writepage = " 0 1 0 0 1 1 0 0",
-		    " 0 0 a13 a12 a11 a10 a9 a8",
-		    " a7 a6 x x x x x x",
-		    " x x x x x x x x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 128;
-	readsize	= 256;
-
+        paged              = yes;
+        size               = 0x8000;
+        page_size          = 128;
+        num_pages          = 256;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xxaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xxaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--00aa.aaaa--aaxx.xxxx--xxxx.xxxx";
     ;
 
     memory "lfuse"
-	size = 1;
-	min_write_delay = 4500;
-	max_write_delay = 4500;
-	read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
-	       "x x x x x x x x o o o o o o o o";
-
-	write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
-	      	"x x x x x x x x i i i i i i i i";
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
     ;
 
     memory "hfuse"
-	size = 1;
-	min_write_delay = 4500;
-	max_write_delay = 4500;
-	read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
-	       "x x x x x x x x o o o o o o o o";
-
-	write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
-	      	"x x x x x x x x i i i i i i i i";
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
     ;
 
     memory "efuse"
-	size = 1;
-	min_write_delay = 4500;
-	max_write_delay = 4500;
-	read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
-	       "x x x x x x x x o o o o o o o o";
-
-	write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
-	      	"x x x x x x x x x x x x x i i i";
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xiii";
     ;
 
     memory "lock"
-	size = 1;
-	min_write_delay = 4500;
-	max_write_delay = 4500;
-	read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
-	       "x x x x x x x x o o o o o o o o";
-
-	write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
-	      	"x x x x x x x x 1 1 i i i i i i";
-    ;
-
-    memory "calibration"
-	size = 1;
-	read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
-	       "0 0 0 0 0 0 0 0 o o o o o o o o";
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
     ;
 
     memory "signature"
-	size = 3;
-	read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
-	       "x x x x x x a1 a0 o o o o o o o o";
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
     ;
 ;
 
@@ -9864,9 +7752,9 @@ part
 #------------------------------------------------------------
 
 part parent "m328"
-    id              = "m328p";
-    desc            = "ATmega328P";
-    signature       = 0x1e 0x95 0x0f;
+    desc                   = "ATmega328P";
+    id                     = "m328p";
+    signature              = 0x1e 0x95 0x0f;
 ;
 
 #------------------------------------------------------------
@@ -9874,20 +7762,13 @@ part parent "m328"
 #------------------------------------------------------------
 
 part parent "m328"
-    id              = "m328pb";
-    desc            = "ATmega328PB";
-    signature       = 0x1e 0x95 0x16;
-    chip_erase_delay = 10500;
+    desc                   = "ATmega328PB";
+    id                     = "m328pb";
+    chip_erase_delay       = 10500;
+    signature              = 0x1e 0x95 0x16;
 
     memory "efuse"
-        size = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
-               "x x x x x x x x o o o o o o o o";
-
-        write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
-                "x x x x x x x x x x x x i i i i";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.iiii";
     ;
 ;
 
@@ -9896,21 +7777,15 @@ part parent "m328"
 #------------------------------------------------------------
 
 part parent "m328"
-    id              = "m32m1";
-    desc            = "ATmega32M1";
-    # stk500_devcode	= 0x;
-    # avr910_devcode	= 0x;
-    signature       = 0x1e 0x95 0x84;
-    bs2             = 0xe2;
+    desc                   = "ATmega32M1";
+    id                     = "m32m1";
+    bs2                    = 0xe2;
+#   stk500_devcode         = 0x??;
+#   avr910_devcode         = 0x??;
+    signature              = 0x1e 0x95 0x84;
 
     memory "efuse"
-        size = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
-                          "x x x x x x x x o o o o o o o o";
-        write           = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
-                          "x x x x x x x x x x i i i i i i";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxii.iiii";
     ;
 ;
 
@@ -9919,97 +7794,34 @@ part parent "m328"
 #------------------------------------------------------------
 
 part parent "m328"
-    id              = "m64m1";
-    desc            = "ATmega64M1";
-    # stk500_devcode	= 0x;
-    # avr910_devcode	= 0x;
-    signature       = 0x1e 0x96 0x84;
-    bs2             = 0xe2;
+    desc                   = "ATmega64M1";
+    id                     = "m64m1";
+    bs2                    = 0xe2;
+#   stk500_devcode         = 0x??;
+#   avr910_devcode         = 0x??;
+    signature              = 0x1e 0x96 0x84;
 
     memory "eeprom"
-	paged		= no;
-        size            = 2048;
-        page_size       = 8;
-	min_write_delay = 3600;
-	max_write_delay = 3600;
-	readback_p1	= 0xff;
-	readback_p2	= 0xff;
-	read = " 1 0 1 0 0 0 0 0",
-	       " 0 0 0 x x a10 a9 a8",
-	       " a7 a6 a5 a4 a3 a2 a1 a0",
-	       " o o o o o o o o";
-
-	write = " 1 1 0 0 0 0 0 0",
-		" 0 0 0 x x a10 a9 a8",
-		" a7 a6 a5 a4 a3 a2 a1 a0",
-		" i i i i i i i i";
-
-	loadpage_lo = " 1 1 0 0 0 0 0 1",
-		      " 0 0 0 0 0 0 0 0",
-		      " 0 0 0 0 0 a2 a1 a0",
-		      " i i i i i i i i";
-
-	writepage = " 1 1 0 0 0 0 1 0",
-		    " 0 0 x x x a10 a9 a8",
-		    " a7 a6 a5 a4 a3 0 0 0",
-		    " x x x x x x x x";
-
-	mode		= 0x41;
-	delay		= 20;
-	blocksize	= 4;
-	readsize	= 256;
+        size               = 2048;
+        page_size          = 8;
+        read               = "1010.0000--000x.xaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.xaaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xaaa--aaaa.a000--xxxx.xxxx";
     ;
 
     memory "flash"
-        paged           = yes;
-        size            = 65536;
-        page_size       = 256;
-        num_pages       = 256;
-	min_write_delay = 4500;
-	max_write_delay = 4500;
-	readback_p1	= 0xff;
-	readback_p2	= 0xff;
-	read_lo = " 0 0 1 0 0 0 0 0",
-		  " a15 a14 a13 a12 a11 a10 a9 a8",
-		  " a7 a6 a5 a4 a3 a2 a1 a0",
-		  " o o o o o o o o";
-
-	read_hi = " 0 0 1 0 1 0 0 0",
-		  " a15 a14 a13 a12 a11 a10 a9 a8",
-		  " a7 a6 a5 a4 a3 a2 a1 a0",
-		  " o o o o o o o o";
-
-	loadpage_lo = " 0 1 0 0 0 0 0 0",
-		      " 0 0 0 x x x x x",
-		      " x a6 a5 a4 a3 a2 a1 a0",
-		      " i i i i i i i i";
-
-	loadpage_hi = " 0 1 0 0 1 0 0 0",
-		      " 0 0 0 x x x x x",
-		      " x a6 a5 a4 a3 a2 a1 a0",
-		      " i i i i i i i i";
-
-	writepage = " 0 1 0 0 1 1 0 0",
-		    " a15 a14 a13 a12 a11 a10 a9 a8",
-		    " a7 x x x x x x x",
-		    " x x x x x x x x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 128;
-	readsize	= 256;
-
+        size               = 0x10000;
+        page_size          = 256;
+        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xaaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xaaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
     ;
 
     memory "efuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
-                          "x x x x x x x x o o o o o o o o";
-        
-        write           = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
-                          "x x x x x x x x x x i i i i i i";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxii.iiii";
     ;
 ;
 
@@ -10018,564 +7830,390 @@ part parent "m328"
 #------------------------------------------------------------
 
 part
-     id            = "t2313";
-     desc          = "ATtiny2313";
-     has_debugwire = yes;
-     flash_instr   = 0xB2, 0x0F, 0x1F;
-     eeprom_instr  = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
-	             0xBA, 0x0F, 0xB2, 0x0F, 0xBA, 0x0D, 0xBB, 0xBC,
-	             0x99, 0xE1, 0xBB, 0xAC;
-     stk500_devcode   = 0x23;
-##   Use the ATtiny26 devcode:
-     avr910_devcode   = 0x5e;
-     signature        = 0x1e 0x91 0x0a;
-     pagel            = 0xD4;
-     bs2              = 0xD6;
-     reset            = io;
-     chip_erase_delay = 9000;
-
-     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0E, 0x1E, 0x2E, 0x3E, 0x2E, 0x3E,
-        0x4E, 0x5E, 0x4E, 0x5E, 0x6E, 0x7E, 0x6E, 0x7E,
-        0x26, 0x36, 0x66, 0x76, 0x2A, 0x3A, 0x6A, 0x7A,
-        0x2E, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATtiny2313";
+    id                     = "t2313";
+    stk500_devcode         = 0x23;
+#   Use the ATtiny26 devcode:
+    avr910_devcode         = 0x5e;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd4;
+    bs2                    = 0xd6;
+    signature              = 0x1e 0x91 0x0a;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0e, 0x1e, 0x2e, 0x3e, 0x2e, 0x3e,
+        0x4e, 0x5e, 0x4e, 0x5e, 0x6e, 0x7e, 0x6e, 0x7e,
+        0x26, 0x36, 0x66, 0x76, 0x2a, 0x3a, 0x6a, 0x7a,
+        0x2e, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    flash_instr            =  0xb2, 0x0f, 0x1f;
+    eeprom_instr           =
+        0xbb, 0xfe, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
+        0xba, 0x0f, 0xb2, 0x0f, 0xba, 0x0d, 0xbb, 0xbc,
+        0x99, 0xe1, 0xbb, 0xac;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
+    ocdrev                 = 0;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
-    ocdrev              = 0;
-
-     memory "eeprom"
-         size            = 128;
-        paged           = no;
-        page_size       = 4;
-         min_write_delay = 4000;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read            = "1  0  1  0   0  0  0  0   0 0 0 x  x x x x",
-                           "x a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
-
-         write           = "1  1  0  0   0  0  0  0   0 0 0 x  x x x x",
-                           "x a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x   x   x",
-			  "  x  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 4;
-	readsize	= 256;
-       ;
-     memory "flash"
-         paged           = yes;
-         size            = 2048;
-         page_size       = 32;
-         num_pages       = 64;
-         min_write_delay = 4500;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read_lo         = "  0   0   1   0    0   0   0   0",
-                           "  0   0   0   0    0   0  a9  a8",
-                           " a7  a6  a5  a4   a3  a2  a1  a0",
-                           "  o   o   o   o    o   o   o   o";
-
-         read_hi         = "  0   0   1   0    1   0   0   0",
-                           "  0   0   0   0    0   0  a9  a8",
-                           " a7  a6  a5  a4   a3  a2  a1  a0",
-                           "  o   o   o   o    o   o   o   o";
+    memory "eeprom"
+        size               = 128;
+        page_size          = 4;
+        min_write_delay    = 4000;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--000x.xxxx--xaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.xxxx--xaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxx--xaaa.aa00--xxxx.xxxx";
+    ;
 
+    memory "flash"
+        paged              = yes;
+        size               = 2048;
+        page_size          = 32;
+        num_pages          = 64;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 32;
+        readsize           = 256;
+        read_lo            = "0010.0000--0000.00aa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0000.00aa--aaaa.aaaa--oooo.oooo";
 # The information in the data sheet of April/2004 is wrong, this works:
-         loadpage_lo     = "  0   1   0   0    0   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x   x   x   a3  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
+        loadpage_lo        = "0100.0000--000x.xxxx--xxxx.aaaa--iiii.iiii";
 # The information in the data sheet of April/2004 is wrong, this works:
-         loadpage_hi     = "  0   1   0   0    1   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x   x   x   a3  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
+        loadpage_hi        = "0100.1000--000x.xxxx--xxxx.aaaa--iiii.iiii";
 # The information in the data sheet of April/2004 is wrong, this works:
-         writepage       = "  0  1  0  0   1  1  0  0",
-                           "  0  0  0  0   0  0 a9 a8",
-                           " a7 a6 a5 a4   x  x  x  x",
-                           "  x  x  x  x   x  x  x  x";
+        writepage          = "0100.1100--0000.00aa--aaaa.xxxx--xxxx.xxxx";
+    ;
 
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 32;
-	readsize	= 256;
-       ;
+    memory "lfuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
+
+    memory "hfuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
+
+    memory "efuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
+    ;
+
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 #   ATtiny2313 has Signature Bytes: 0x1E 0x91 0x0A.
-     memory "signature"
-         size            = 3;
-         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-       ;
-     memory "lock"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
-                           "x x x x  x x x x  1 1 i i  i i i i";
-         read           = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "lfuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "hfuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "efuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                           "x x x x  x x x x  x x x x  x x x i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-     ;
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 # The Tiny2313 has calibration data for both 4 MHz and 8 MHz.
 # The information in the data sheet of April/2004 is wrong, this works:
 
-     memory "calibration"
-         size            = 2;
-         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
-                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
-     ;
-  ;
+    memory "calibration"
+        size               = 2;
+        read               = "0011.1000--000x.xxxx--0000.000a--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATtiny2313A
 #------------------------------------------------------------
 
 part parent "t2313"
-    id              = "t2313a";
-    desc            = "ATtiny2313A";
-  ;
+    desc                   = "ATtiny2313A";
+    id                     = "t2313a";
+;
 
 #------------------------------------------------------------
 # ATtiny4313
 #------------------------------------------------------------
 
 part
-     id            = "t4313";
-     desc          = "ATtiny4313";
-     has_debugwire = yes;
-     flash_instr   = 0xB2, 0x0F, 0x1F;
-     eeprom_instr  = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
-	             0xBA, 0x0F, 0xB2, 0x0F, 0xBA, 0x0D, 0xBB, 0xBC,
-	             0x99, 0xE1, 0xBB, 0xAC;
-     stk500_devcode   = 0x23;
-##   Use the ATtiny26 devcode:
-     avr910_devcode   = 0x5e;
-     signature        = 0x1e 0x92 0x0d;
-     pagel            = 0xD4;
-     bs2              = 0xD6;
-     reset            = io;
-     chip_erase_delay = 9000;
-
-     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0E, 0x1E, 0x2E, 0x3E, 0x2E, 0x3E,
-        0x4E, 0x5E, 0x4E, 0x5E, 0x6E, 0x7E, 0x6E, 0x7E,
-        0x26, 0x36, 0x66, 0x76, 0x2A, 0x3A, 0x6A, 0x7A,
-        0x2E, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATtiny4313";
+    id                     = "t4313";
+    stk500_devcode         = 0x23;
+#   Use the ATtiny26 devcode:
+    avr910_devcode         = 0x5e;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd4;
+    bs2                    = 0xd6;
+    signature              = 0x1e 0x92 0x0d;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0e, 0x1e, 0x2e, 0x3e, 0x2e, 0x3e,
+        0x4e, 0x5e, 0x4e, 0x5e, 0x6e, 0x7e, 0x6e, 0x7e,
+        0x26, 0x36, 0x66, 0x76, 0x2a, 0x3a, 0x6a, 0x7a,
+        0x2e, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    flash_instr            =  0xb2, 0x0f, 0x1f;
+    eeprom_instr           =
+        0xbb, 0xfe, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
+        0xba, 0x0f, 0xb2, 0x0f, 0xba, 0x0d, 0xbb, 0xbc,
+        0x99, 0xe1, 0xbb, 0xac;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
+    ocdrev                 = 0;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
-    ocdrev              = 0;
+    memory "eeprom"
+        size               = 256;
+        page_size          = 4;
+        min_write_delay    = 4000;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--000x.xxxx--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.xxxx--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxx--aaaa.aa00--xxxx.xxxx";
+    ;
 
-     memory "eeprom"
-         size            = 256;
-        paged           = no;
-        page_size       = 4;
-         min_write_delay = 4000;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read            = "1   0  1  0   0  0  0  0   0 0 0 x  x x x x",
-                           "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
+    memory "flash"
+        paged              = yes;
+        size               = 4096;
+        page_size          = 64;
+        num_pages          = 64;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 32;
+        readsize           = 256;
+        read_lo            = "0010.0000--0000.0aaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0000.0aaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0000.0aaa--aaax.xxxx--xxxx.xxxx";
+    ;
 
-         write           = "1   1  0  0   0  0  0  0   0 0 0 x  x x x x",
-                           "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
+    memory "lfuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
+    memory "hfuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x   x   x",
-			  " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
+    memory "efuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
+    ;
 
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 4;
-	readsize	= 256;
-       ;
-     memory "flash"
-         paged           = yes;
-         size            = 4096;
-         page_size       = 64;
-         num_pages       = 64;
-         min_write_delay = 4500;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read_lo         = "  0   0   1   0    0   0   0   0",
-                           "  0   0   0   0    0 a10  a9  a8",
-                           " a7  a6  a5  a4   a3  a2  a1  a0",
-                           "  o   o   o   o    o   o   o   o";
-
-         read_hi         = "  0   0   1   0    1   0   0   0",
-                           "  0   0   0   0    0 a10  a9  a8",
-                           " a7  a6  a5  a4   a3  a2  a1  a0",
-                           "  o   o   o   o    o   o   o   o";
-
-         loadpage_lo     = "  0   1   0   0    0   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x   x  a4   a3  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         loadpage_hi     = "  0   1   0   0    1   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x   x  a4   a3  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         writepage       = "  0  1  0  0   1   1  0  0",
-                           "  0  0  0  0   0 a10 a9 a8",
-                           " a7 a6 a5  x   x   x  x  x",
-                           "  x  x  x  x   x   x  x  x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 32;
-	readsize	= 256;
-       ;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 #   ATtiny4313 has Signature Bytes: 0x1E 0x92 0x0D.
-     memory "signature"
-         size            = 3;
-         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-       ;
-     memory "lock"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
-                           "x x x x  x x x x  1 1 i i  i i i i";
-         read           = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
-     memory "lfuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "hfuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "efuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                           "x x x x  x x x x  x x x x  x x x i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-     ;
-
-     memory "calibration"
-         size            = 2;
-         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
-                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
-     ;
-  ;
+    memory "calibration"
+        size               = 2;
+        read               = "0011.1000--000x.xxxx--0000.000a--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # AT90PWM2
 #------------------------------------------------------------
 
 part
-     id            = "pwm2";
-     desc          = "AT90PWM2";
-     has_debugwire = yes;
-     flash_instr   = 0xB6, 0x01, 0x11;
-     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
-	             0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
-	             0x99, 0xF9, 0xBB, 0xAF;
-     stk500_devcode   = 0x65;
-##  avr910_devcode   = ?;
-     signature        = 0x1e 0x93 0x81;
-     pagel            = 0xD8;
-     bs2              = 0xE2;
-     reset            = io;
-     chip_erase_delay = 9000;
-
-     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "AT90PWM2";
+    id                     = "pwm2";
+    stk500_devcode         = 0x65;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd8;
+    bs2                    = 0xe2;
+#   avr910_devcode         = ?;
+    signature              = 0x1e 0x93 0x81;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    flash_instr            =  0xb6, 0x01, 0x11;
+    eeprom_instr           =
+        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
+        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
+        0x99, 0xf9, 0xbb, 0xaf;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
-     memory "eeprom"
-         size            = 512;
-        paged           = no;
-        page_size       = 4;
-         min_write_delay = 4000;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read            = "1  0  1  0   0  0  0  0   0 0 0 x  x x x a8",
-                           "a7 a6 a5 a4  a3 a2 a1 a0  o o o o  o o o o";
+    memory "eeprom"
+        size               = 512;
+        page_size          = 4;
+        min_write_delay    = 4000;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--000x.xxxa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.xxxa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
+    ;
 
-         write           = "1  1  0  0   0  0  0  0   0 0 0 x  x x x a8",
-                           "a7 a6 a5 a4  a3 a2 a1 a0  i i i i  i i i i";
+    memory "flash"
+        paged              = yes;
+        size               = 8192;
+        page_size          = 64;
+        num_pages          = 128;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 64;
+        readsize           = 256;
+        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0000.aaaa--aaax.xxxx--xxxx.xxxx";
+    ;
 
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
+    memory "lfuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x   x  a8",
-			  " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
+    memory "hfuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 4;
-	readsize	= 256;
-       ;
-     memory "flash"
-         paged           = yes;
-         size            = 8192;
-         page_size       = 64;
-         num_pages       = 128;
-         min_write_delay = 4500;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read_lo         = "  0   0   1   0    0   0   0   0",
-                           "  0   0   0   0   a11 a10 a9  a8",
-                           " a7  a6  a5  a4   a3  a2  a1  a0",
-                           "  o   o   o   o    o   o   o   o";
+    memory "efuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--iiii.iiii";
+    ;
 
-         read_hi         = "  0   0   1   0    1   0   0   0",
-                           "  0   0   0   0   a11 a10 a9  a8",
-                           " a7  a6  a5  a4   a3  a2  a1  a0",
-                           "  o   o   o   o    o   o   o   o";
-
-         loadpage_lo     = "  0   1   0   0    0   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x   x  a4   a3  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         loadpage_hi     = "  0   1   0   0    1   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x   x  a4   a3  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         writepage       = "  0  1  0  0   1   1   0   0",
-                           "  0  0  0  0   a11 a10 a9  a8",
-                           " a7 a6 a5  x   x   x   x   x",
-                           "  x  x  x  x   x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 64;
-	readsize	= 256;
-       ;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 #   AT90PWM2 has Signature Bytes: 0x1E 0x93 0x81.
-     memory "signature"
-         size            = 3;
-         read            = "0  0  1  1   0  0  0  0   0  0  x  x   x  x  x  x",
-                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-       ;
-     memory "lock"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
-                           "x x x x  x x x x  1 1 i i  i i i i";
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--00xx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
-         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "lfuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "hfuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "efuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-     ;
-
-     memory "calibration"
-         size            = 1;
-         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
-                           "0  0  0  0   0  0  0  0    o o o o  o o o o";
-     ;
-  ;
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # AT90PWM3
@@ -10584,9 +8222,9 @@ part
 # Completely identical to AT90PWM2 (including the signature!)
 
 part parent "pwm2"
-     id            = "pwm3";
-     desc          = "AT90PWM3";
-  ;
+    desc                   = "AT90PWM3";
+    id                     = "pwm3";
+;
 
 #------------------------------------------------------------
 # AT90PWM2B
@@ -10594,12 +8232,11 @@ part parent "pwm2"
 # Same as AT90PWM2 but different signature.
 
 part parent "pwm2"
-     id            = "pwm2b";
-     desc          = "AT90PWM2B";
-     signature     = 0x1e 0x93 0x83;
-
-    ocdrev              = 1;
-  ;
+    desc                   = "AT90PWM2B";
+    id                     = "pwm2b";
+    signature              = 0x1e 0x93 0x83;
+    ocdrev                 = 1;
+;
 
 #------------------------------------------------------------
 # AT90PWM3B
@@ -10608,11 +8245,9 @@ part parent "pwm2"
 # Completely identical to AT90PWM2B (including the signature!)
 
 part parent "pwm2b"
-     id            = "pwm3b";
-     desc          = "AT90PWM3B";
-
-    ocdrev              = 1;
-  ;
+    desc                   = "AT90PWM3B";
+    id                     = "pwm3b";
+;
 
 #------------------------------------------------------------
 # AT90PWM316
@@ -10621,52 +8256,22 @@ part parent "pwm2b"
 # Similar to AT90PWM3B, but with 16 kiB flash, 512 B EEPROM, and 1024 B SRAM.
 
 part parent "pwm3b"
-     id            = "pwm316";
-     desc          = "AT90PWM316";
-     signature     = 0x1e 0x94 0x83;
-
-    ocdrev              = 1;
+    desc                   = "AT90PWM316";
+    id                     = "pwm316";
+    signature              = 0x1e 0x94 0x83;
 
     memory "flash"
-        paged           = yes;
-        size            = 16384;
-        page_size       = 128;
-        num_pages       = 128;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "  0   0 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "  0   0 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  0   0   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  0   0   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  0   0 a13 a12    a11 a10  a9  a8",
-                          " a7  a6   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x21;
-	delay		= 6;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
-  ;
+        size               = 0x4000;
+        page_size          = 128;
+        mode               = 33;
+        blocksize          = 128;
+        read_lo            = "0010.0000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--00xx.xxxx--xxaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--00xx.xxxx--xxaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--00aa.aaaa--aaxx.xxxx--xxxx.xxxx";
+    ;
+;
 
 #------------------------------------------------------------
 # AT90PWM216
@@ -10674,560 +8279,392 @@ part parent "pwm3b"
 # Completely identical to AT90PWM316 (including the signature!)
 
 part parent "pwm316"
-     id = "pwm216";
-     desc = "AT90PWM216";
-  ; 
+    desc                   = "AT90PWM216";
+    id                     = "pwm216";
+;
 
 #------------------------------------------------------------
 # ATtiny25
 #------------------------------------------------------------
 
 part
-     id            = "t25";
-     desc          = "ATtiny25";
-     has_debugwire = yes;
-     flash_instr   = 0xB4, 0x02, 0x12;
-     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
-	             0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC,
-	             0x99, 0xE1, 0xBB, 0xAC;
-## no STK500 devcode in XML file, use the ATtiny45 one
-     stk500_devcode   = 0x14;
-##  avr910_devcode   = ?;
-##  Try the AT90S2313 devcode:
-     avr910_devcode   = 0x20;
-     signature        = 0x1e 0x91 0x08;
-     reset            = io;
-     chip_erase_delay = 4500;
-
-     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    hvsp_controlstack   =
-        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
-        0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
-        0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
+    desc                   = "ATtiny25";
+    id                     = "t25";
+#  no STK500 devcode in XML file, use the ATtiny45 one
+    stk500_devcode         = 0x14;
+#   avr910_devcode         = ?;
+#   Try the AT90S2313 devcode:
+    avr910_devcode         = 0x20;
+    chip_erase_delay       = 4500;
+    signature              = 0x1e 0x91 0x08;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    hvsp_controlstack      =
+        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x66,
+        0x68, 0x78, 0x68, 0x68, 0x7a, 0x6a, 0x68, 0x78,
+        0x78, 0x7d, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
         0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
-    hventerstabdelay    = 100;
-    hvspcmdexedelay     = 0;
-    synchcycles         = 6;
-    latchcycles         = 1;
-    togglevtg           = 1;
-    poweroffdelay       = 25;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 100;
-    resetdelay          = 25;
-    chiperasepolltimeout = 40;
-    chiperasetime       = 0;
+    flash_instr            =  0xb4, 0x02, 0x12;
+    eeprom_instr           =
+        0xbb, 0xff, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
+        0xbc, 0x02, 0xb4, 0x02, 0xba, 0x0d, 0xbb, 0xbc,
+        0x99, 0xe1, 0xbb, 0xac;
+    hventerstabdelay       = 100;
+    latchcycles            = 1;
+    togglevtg              = 1;
+    poweroffdelay          = 25;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 100;
+    resetdelay             = 25;
+    chiperasepolltimeout   = 40;
     programfusepolltimeout = 25;
     programlockpolltimeout = 25;
+    synchcycles            = 6;
+    ocdrev                 = 1;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
-    ocdrev              = 1;
+    memory "eeprom"
+        size               = 128;
+        page_size          = 4;
+        min_write_delay    = 4000;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--000x.xxxx--xaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.xxxx--xaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxx--xaaa.aa00--xxxx.xxxx";
+    ;
 
-     memory "eeprom"
-         size            = 128;
-        paged           = no;
-        page_size       = 4;
-         min_write_delay = 4000;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read            = "1  0  1  0   0  0  0  0   0 0 0 x  x x x x",
-                           "x a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
+    memory "flash"
+        paged              = yes;
+        size               = 2048;
+        page_size          = 32;
+        num_pages          = 64;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 32;
+        readsize           = 256;
+        read_lo            = "0010.0000--0000.00aa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0000.00aa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xxxx.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xxxx.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0000.00aa--aaaa.xxxx--xxxx.xxxx";
+    ;
 
-         write           = "1  1  0  0   0  0  0  0   0 0 0 x  x x x x",
-                           "x a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
+    memory "lfuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
+    memory "hfuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x   x   x",
-			  "  x  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
+    memory "efuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
+    ;
 
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 4;
-	readsize	= 256;
-       ;
-     memory "flash"
-         paged           = yes;
-         size            = 2048;
-         page_size       = 32;
-         num_pages       = 64;
-         min_write_delay = 4500;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read_lo         = "  0   0   1   0    0   0   0   0",
-                           "  0   0   0   0    0   0  a9  a8",
-                           " a7  a6  a5  a4   a3  a2  a1  a0",
-                           "  o   o   o   o    o   o   o   o";
-
-         read_hi         = "  0   0   1   0    1   0   0   0",
-                           "  0   0   0   0    0   0  a9  a8",
-                           " a7  a6  a5  a4   a3  a2  a1  a0",
-                           "  o   o   o   o    o   o   o   o";
-
-         loadpage_lo     = "  0   1   0   0    0   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x   x   x   a3  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         loadpage_hi     = "  0   1   0   0    1   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x   x   x   a3  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         writepage       = "  0  1  0  0   1  1  0  0",
-                           "  0  0  0  0   0  0 a9 a8",
-                           " a7 a6 a5 a4   x  x  x  x",
-                           "  x  x  x  x   x  x  x  x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 32;
-	readsize	= 256;
-       ;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--0000.0000--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 #   ATtiny25 has Signature Bytes: 0x1E 0x91 0x08.
-     memory "signature"
-         size            = 3;
-         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-       ;
-     memory "lock"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
-                           "x x x x  x x x x  1 1 i i  i i i i";
-         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
-                           "0 0 0 0  0 0 0 0  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
-     memory "lfuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "hfuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "efuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                           "x x x x  x x x x  x x x x  x x x i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-     ;
-
-     memory "calibration"
-         size            = 1;
-         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
-                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
-     ;
-  ;
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.000a--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATtiny45
 #------------------------------------------------------------
 
 part
-     id            = "t45";
-     desc          = "ATtiny45";
-     has_debugwire = yes;
-     flash_instr   = 0xB4, 0x02, 0x12;
-     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
-	             0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC,
-	             0x99, 0xE1, 0xBB, 0xAC;
-     stk500_devcode   = 0x14;
-##  avr910_devcode   = ?;
-##  Try the AT90S2313 devcode:
-     avr910_devcode   = 0x20;
-     signature        = 0x1e 0x92 0x06;
-     reset            = io;
-     chip_erase_delay = 4500;
-
-     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    hvsp_controlstack     =
-	0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
-        0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
-        0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
+    desc                   = "ATtiny45";
+    id                     = "t45";
+    stk500_devcode         = 0x14;
+#   avr910_devcode         = ?;
+#   Try the AT90S2313 devcode:
+    avr910_devcode         = 0x20;
+    chip_erase_delay       = 4500;
+    signature              = 0x1e 0x92 0x06;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    hvsp_controlstack      =
+        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x66,
+        0x68, 0x78, 0x68, 0x68, 0x7a, 0x6a, 0x68, 0x78,
+        0x78, 0x7d, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
         0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    hvspcmdexedelay     = 0;
-    synchcycles         = 6;
-    latchcycles         = 1;
-    togglevtg           = 1;
-    poweroffdelay       = 25;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 100;
-    resetdelay          = 25;
-    chiperasepolltimeout = 40;
-    chiperasetime       = 0;
+    flash_instr            =  0xb4, 0x02, 0x12;
+    eeprom_instr           =
+        0xbb, 0xff, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
+        0xbc, 0x02, 0xb4, 0x02, 0xba, 0x0d, 0xbb, 0xbc,
+        0x99, 0xe1, 0xbb, 0xac;
+    hventerstabdelay       = 100;
+    latchcycles            = 1;
+    togglevtg              = 1;
+    poweroffdelay          = 25;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 100;
+    resetdelay             = 25;
+    chiperasepolltimeout   = 40;
     programfusepolltimeout = 25;
     programlockpolltimeout = 25;
+    synchcycles            = 6;
+    ocdrev                 = 1;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
-    ocdrev              = 1;
+    memory "eeprom"
+        size               = 256;
+        page_size          = 4;
+        min_write_delay    = 4000;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--000x.xxxx--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.xxxx--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxx--aaaa.aa00--xxxx.xxxx";
+    ;
 
-     memory "eeprom"
-         size            = 256;
-         page_size       = 4;
-         min_write_delay = 4000;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read            = "1  0  1  0   0  0  0  0    0 0 0 x  x x x x",
-                           "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
+    memory "flash"
+        paged              = yes;
+        size               = 4096;
+        page_size          = 64;
+        num_pages          = 64;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 32;
+        readsize           = 256;
+        read_lo            = "0010.0000--0000.0aaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0000.0aaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0000.0aaa--aaax.xxxx--xxxx.xxxx";
+    ;
 
-         write           = "1  1  0  0   0  0  0  0    0 0 0 x  x x x x",
-                           "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
+    memory "lfuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
+    memory "hfuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x   x   x",
-			  " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
+    memory "efuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
+    ;
 
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 4;
-	readsize	= 256;
-       ;
-     memory "flash"
-         paged           = yes;
-         size            = 4096;
-         page_size       = 64;
-         num_pages       = 64;
-         min_write_delay = 4500;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read_lo         = "  0   0   1   0    0   0   0   0",
-                           "  0   0   0   0    0  a10 a9  a8",
-                           " a7  a6  a5  a4   a3  a2  a1  a0",
-                           "  o   o   o   o    o   o   o   o";
-
-         read_hi         = "  0   0   1   0    1   0   0   0",
-                           "  0   0   0   0    0  a10 a9  a8",
-                           " a7  a6  a5  a4   a3  a2  a1  a0",
-                           "  o   o   o   o    o   o   o   o";
-
-         loadpage_lo     = "  0   1   0   0    0   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x   x  a4   a3  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         loadpage_hi     = "  0   1   0   0    1   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x   x  a4   a3  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         writepage       = "  0  1  0  0   1  1  0  0",
-                           "  0  0  0  0   0 a10 a9 a8",
-                           " a7 a6 a5  x   x  x  x  x",
-                           "  x  x  x  x   x  x  x  x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 32;
-	readsize	= 256;
-       ;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--0000.0000--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 #   ATtiny45 has Signature Bytes: 0x1E 0x92 0x08. (Data sheet 2586C-AVR-06/05 (doc2586.pdf) indicates otherwise!)
-     memory "signature"
-         size            = 3;
-         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-       ;
-     memory "lock"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
-                           "x x x x  x x x x  1 1 i i  i i i i";
-         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
-                           "0 0 0 0  0 0 0 0  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
-     memory "lfuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "hfuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "efuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                           "x x x x  x x x x  x x x x  x x x i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-     ;
-
-     memory "calibration"
-         size            = 1;
-         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
-                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
-     ;
-  ;
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.000a--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATtiny85
 #------------------------------------------------------------
 
 part
-     id            = "t85";
-     desc          = "ATtiny85";
-     has_debugwire = yes;
-     flash_instr   = 0xB4, 0x02, 0x12;
-     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
-	             0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC,
-	             0x99, 0xE1, 0xBB, 0xAC;
-## no STK500 devcode in XML file, use the ATtiny45 one
-     stk500_devcode   = 0x14;
-##  avr910_devcode   = ?;
-##  Try the AT90S2313 devcode:
-     avr910_devcode   = 0x20;
-     signature        = 0x1e 0x93 0x0b;
-     reset            = io;
-     chip_erase_delay = 4500;
-
-     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    hvsp_controlstack   =
-        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
-        0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
-        0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
+    desc                   = "ATtiny85";
+    id                     = "t85";
+#   no STK500 devcode in XML file, use the ATtiny45 one
+    stk500_devcode         = 0x14;
+#   avr910_devcode         = ?;
+#   Try the AT90S2313 devcode:
+    avr910_devcode         = 0x20;
+    chip_erase_delay       = 4500;
+    signature              = 0x1e 0x93 0x0b;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    hvsp_controlstack      =
+        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x66,
+        0x68, 0x78, 0x68, 0x68, 0x7a, 0x6a, 0x68, 0x78,
+        0x78, 0x7d, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
         0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
-    hventerstabdelay    = 100;
-    hvspcmdexedelay     = 0;
-    synchcycles         = 6;
-    latchcycles         = 1;
-    togglevtg           = 1;
-    poweroffdelay       = 25;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 100;
-    resetdelay          = 25;
-    chiperasepolltimeout = 40;
-    chiperasetime       = 0;
+    flash_instr            =  0xb4, 0x02, 0x12;
+    eeprom_instr           =
+        0xbb, 0xff, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
+        0xbc, 0x02, 0xb4, 0x02, 0xba, 0x0d, 0xbb, 0xbc,
+        0x99, 0xe1, 0xbb, 0xac;
+    hventerstabdelay       = 100;
+    latchcycles            = 1;
+    togglevtg              = 1;
+    poweroffdelay          = 25;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 100;
+    resetdelay             = 25;
+    chiperasepolltimeout   = 40;
     programfusepolltimeout = 25;
     programlockpolltimeout = 25;
+    synchcycles            = 6;
+    ocdrev                 = 1;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
-    ocdrev              = 1;
+    memory "eeprom"
+        size               = 512;
+        page_size          = 4;
+        min_write_delay    = 4000;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--000x.xxxa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.xxxa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
+    ;
 
-     memory "eeprom"
-         size            = 512;
-        paged           = no;
-        page_size       = 4;
-         min_write_delay = 4000;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read            = "1  0  1  0   0  0  0  0    0 0 0 x  x x x a8",
-                           "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
+    memory "flash"
+        paged              = yes;
+        size               = 8192;
+        page_size          = 64;
+        num_pages          = 128;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 32;
+        readsize           = 256;
+        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0000.aaaa--aaax.xxxx--xxxx.xxxx";
+    ;
 
-         write           = "1  1  0  0   0  0  0  0    0 0 0 x  x x x a8",
-                           "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
+    memory "lfuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
+    memory "hfuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x   x  a8",
-			  " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
+    memory "efuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
+    ;
 
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 4;
-	readsize	= 256;
-       ;
-     memory "flash"
-         paged           = yes;
-         size            = 8192;
-         page_size       = 64;
-         num_pages       = 128;
-         min_write_delay = 4500;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read_lo         = "  0   0   1   0    0   0   0   0",
-                           "  0   0   0   0  a11 a10  a9  a8",
-                           " a7  a6  a5  a4   a3  a2  a1  a0",
-                           "  o   o   o   o    o   o   o   o";
-
-         read_hi         = "  0   0   1   0    1   0   0   0",
-                           "  0   0   0   0  a11 a10  a9  a8",
-                           " a7  a6  a5  a4   a3  a2  a1  a0",
-                           "  o   o   o   o    o   o   o   o";
-
-         loadpage_lo     = "  0   1   0   0    0   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x   x  a4   a3  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         loadpage_hi     = "  0   1   0   0    1   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x   x  a4   a3  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         writepage       = "  0  1  0  0   1   1   0  0",
-                           "  0  0  0  0  a11 a10 a9 a8",
-                           " a7 a6 a5  x   x  x  x  x",
-                           "  x  x  x  x   x  x  x  x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 32;
-	readsize	= 256;
-       ;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--0000.0000--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 #   ATtiny85 has Signature Bytes: 0x1E 0x93 0x08.
-     memory "signature"
-         size            = 3;
-         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-       ;
-     memory "lock"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
-                           "x x x x  x x x x  1 1 i i  i i i i";
-         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
-                           "0 0 0 0  0 0 0 0  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
-     memory "lfuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "hfuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "efuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                           "x x x x  x x x x  x x x x  x x x i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-     ;
-
-     memory "calibration"
-         size            = 1;
-         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
-                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
-     ;
-  ;
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.000a--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega640
@@ -11235,380 +8672,242 @@ part
 # Almost same as ATmega1280, except for different memory sizes
 
 part
-    id               = "m640";
-    desc             = "ATmega640";
-    signature        = 0x1e 0x96 0x08;
-    has_jtag         = yes;
-#    stk500_devcode   = 0xB2;
-#    avr910_devcode   = 0x43;
-    chip_erase_delay = 9000;
-    pagel            = 0xD7;
-    bs2              = 0xA0;
-    reset            = dedicated;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega640";
+    id                     = "m640";
+#   stk500_devcode         = 0xB2;
+#   avr910_devcode         = 0x43;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x96 0x08;
+    reset                  = io;
+    has_jtag               = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    idr                 = 0x31;
-    spmcr               = 0x57;
-    rampz               = 0x3b;
-    allowfullpagebitstream = no;
-
-    ocdrev              = 3;
+    idr                    = 0x31;
+    rampz                  = 0x3b;
+    spmcr                  = 0x57;
+    ocdrev                 = 3;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 8;  /* for parallel programming */
-        size            = 4096;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read            = "  1   0   1   0      0   0   0   0",
-                          "  x   x   x   x    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        write           = "  1   1   0   0      0   0   0   0",
-                          "  x   x   x   x    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0", 
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0  a2  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x    a11 a10  a9  a8",
-			  " a7  a6  a5  a4     a3   0   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 10;
-	blocksize	= 8;
-	readsize	= 256;
-      ;
+        size               = 4096;
+        page_size          = 8;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 8;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
+        writepage          = "1100.0010--00xx.aaaa--aaaa.a000--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 65536;
-        page_size       = 256;
-        num_pages       = 256;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "  0 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "  0 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  0 a14 a13 a12    a11 a10  a9  a8",
-                          " a7   x   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 10;
-	blocksize	= 256;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 0x10000;
+        page_size          = 256;
+        num_pages          = 256;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 256;
+        readsize           = 256;
+        read_lo            = "0010.0000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0aaa.aaaa--axxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  x x x x  x i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
-
-    memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
-                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega1280
 #------------------------------------------------------------
 
 part
-    id               = "m1280";
-    desc             = "ATmega1280";
-    signature        = 0x1e 0x97 0x03;
-    has_jtag         = yes;
-#    stk500_devcode   = 0xB2;
-#    avr910_devcode   = 0x43;
-    chip_erase_delay = 9000;
-    pagel            = 0xD7;
-    bs2              = 0xA0;
-    reset            = dedicated;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega1280";
+    id                     = "m1280";
+#   stk500_devcode         = 0xB2;
+#   avr910_devcode         = 0x43;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x97 0x03;
+    reset                  = io;
+    has_jtag               = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    idr                 = 0x31;
-    spmcr               = 0x57;
-    rampz               = 0x3b;
-    allowfullpagebitstream = no;
-
-    ocdrev              = 3;
+    idr                    = 0x31;
+    rampz                  = 0x3b;
+    spmcr                  = 0x57;
+    ocdrev                 = 3;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 8;  /* for parallel programming */
-        size            = 4096;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read            = "  1   0   1   0      0   0   0   0",
-                          "  x   x   x   x    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        write           = "  1   1   0   0      0   0   0   0",
-                          "  x   x   x   x    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0", 
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0  a2  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x    a11 a10  a9  a8",
-			  " a7  a6  a5  a4     a3   0   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 10;
-	blocksize	= 8;
-	readsize	= 256;
-      ;
+        size               = 4096;
+        page_size          = 8;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 8;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
+        writepage          = "1100.0010--00xx.aaaa--aaaa.a000--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 131072;
-        page_size       = 256;
-        num_pages       = 512;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7   x   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 10;
-	blocksize	= 256;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 0x20000;
+        page_size          = 256;
+        num_pages          = 512;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 256;
+        readsize           = 256;
+        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  x x x x  x i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
-
-    memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
-                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega1281
@@ -11616,219 +8915,142 @@ part
 # Identical to ATmega1280
 
 part parent "m1280"
-    id               = "m1281";
-    desc             = "ATmega1281";
-    signature        = 0x1e 0x97 0x04;
-
-    ocdrev              = 3;
-  ;
+    desc                   = "ATmega1281";
+    id                     = "m1281";
+    signature              = 0x1e 0x97 0x04;
+;
 
 #------------------------------------------------------------
 # ATmega2560
 #------------------------------------------------------------
 
 part
-    id               = "m2560";
-    desc             = "ATmega2560";
-    signature        = 0x1e 0x98 0x01;
-    has_jtag         = yes;
-    stk500_devcode   = 0xB2;
-#    avr910_devcode   = 0x43;
-    chip_erase_delay = 9000;
-    pagel            = 0xD7;
-    bs2              = 0xA0;
-    reset            = dedicated;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega2560";
+    id                     = "m2560";
+    stk500_devcode         = 0xb2;
+#   avr910_devcode         = 0x43;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x98 0x01;
+    reset                  = io;
+    has_jtag               = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    idr                 = 0x31;
-    spmcr               = 0x57;
-    rampz               = 0x3b;
-    allowfullpagebitstream = no;
-
-    ocdrev              = 4;
+    idr                    = 0x31;
+    rampz                  = 0x3b;
+    spmcr                  = 0x57;
+    ocdrev                 = 4;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 8;  /* for parallel programming */
-        size            = 4096;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read            = "  1   0   1   0      0   0   0   0",
-                          "  x   x   x   x    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        write           = "  1   1   0   0      0   0   0   0",
-                          "  x   x   x   x    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0", 
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0  a2  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x    a11 a10  a9  a8",
-			  " a7  a6  a5  a4     a3   0   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 10;
-	blocksize	= 8;
-	readsize	= 256;
-      ;
+        size               = 4096;
+        page_size          = 8;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 8;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
+        writepage          = "1100.0010--00xx.aaaa--aaaa.a000--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 262144;
-        page_size       = 256;
-        num_pages       = 1024;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7   x   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-        load_ext_addr   = "  0   1   0   0      1   1   0   1",
-                          "  0   0   0   0      0   0   0   0",
-                          "  0   0   0   0      0   0   0 a16",
-                          "  0   0   0   0      0   0   0   0";
-
-	mode		= 0x41;
-	delay		= 10;
-	blocksize	= 256;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 0x40000;
+        page_size          = 256;
+        num_pages          = 1024;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 256;
+        readsize           = 256;
+        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
+        load_ext_addr      = "0100.1101--0000.0000--0000.000a--0000.0000";
+        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  x x x x  x i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
-
-    memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
-                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega2561
 #------------------------------------------------------------
 
 part parent "m2560"
-    id               = "m2561";
-    desc             = "ATmega2561";
-    signature        = 0x1e 0x98 0x02;
-
-    ocdrev              = 4;
-  ;
+    desc                   = "ATmega2561";
+    id                     = "m2561";
+    signature              = 0x1e 0x98 0x02;
+;
 
 #------------------------------------------------------------
 # ATmega128RFA1
@@ -11836,877 +9058,543 @@ part parent "m2560"
 # Identical to ATmega2561 but half the ROM
 
 part parent "m2561"
-    id               = "m128rfa1";
-    desc             = "ATmega128RFA1";
-    signature        = 0x1e 0xa7 0x01;
-    chip_erase_delay = 55000;
-    bs2              = 0xE2;
-
-    ocdrev              = 3;
+    desc                   = "ATmega128RFA1";
+    id                     = "m128rfa1";
+    chip_erase_delay       = 55000;
+    bs2                    = 0xe2;
+    signature              = 0x1e 0xa7 0x01;
+    ocdrev                 = 3;
 
     memory "flash"
-        paged           = yes;
-        size            = 131072;
-        page_size       = 256;
-        num_pages       = 512;
-        min_write_delay = 50000;
-        max_write_delay = 50000;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7   x   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-        load_ext_addr   = NULL;
-
-	mode		= 0x41;
-	delay		= 20;
-	blocksize	= 256;
-	readsize	= 256;
-      ;
-  ;
+        size               = 0x20000;
+        num_pages          = 512;
+        min_write_delay    = 50000;
+        max_write_delay    = 50000;
+        delay              = 20;
+        load_ext_addr      = NULL;
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega256RFR2
 #------------------------------------------------------------
 
 part parent "m2561"
-    id               = "m256rfr2";
-    desc             = "ATmega256RFR2";
-    signature        = 0x1e 0xa8 0x02;
-    chip_erase_delay = 18500;
-    bs2              = 0xE2;
+    desc                   = "ATmega256RFR2";
+    id                     = "m256rfr2";
+    chip_erase_delay       = 18500;
+    bs2                    = 0xe2;
+    signature              = 0x1e 0xa8 0x02;
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 8;  /* for parallel programming */
-        size            = 8192;
-        min_write_delay = 13000;
-        max_write_delay = 13000;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read            = "  1   0   1   0      0   0   0   0",
-                          "  x   x   x a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        write           = "  1   1   0   0      0   0   0   0",
-                          "  x   x   x a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0  a2  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x a12    a11 a10  a9  a8",
-			  " a7  a6  a5  a4     a3   0   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 10;
-	blocksize	= 8;
-	readsize	= 256;
-      ;
-
-
-    ocdrev              = 4;
-  ;
+        size               = 8192;
+        min_write_delay    = 13000;
+        max_write_delay    = 13000;
+        read               = "1010.0000--xxxa.aaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxa.aaaa--aaaa.aaaa--iiii.iiii";
+        writepage          = "1100.0010--00xa.aaaa--aaaa.a000--xxxx.xxxx";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega128RFR2
 #------------------------------------------------------------
 
 part parent "m128rfa1"
-    id               = "m128rfr2";
-    desc             = "ATmega128RFR2";
-    signature        = 0x1e 0xa7 0x02;
-
-
-    ocdrev              = 3;
-  ;
+    desc                   = "ATmega128RFR2";
+    id                     = "m128rfr2";
+    signature              = 0x1e 0xa7 0x02;
+;
 
 #------------------------------------------------------------
 # ATmega64RFR2
 #------------------------------------------------------------
 
 part parent "m128rfa1"
-    id               = "m64rfr2";
-    desc             = "ATmega64RFR2";
-    signature        = 0x1e 0xa6 0x02;
-
-
-    ocdrev              = 3;
-
-    memory "flash"
-        paged           = yes;
-        size            = 65536;
-        page_size       = 256;
-        num_pages       = 256;
-        min_write_delay = 50000;
-        max_write_delay = 50000;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "  0 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "  0 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  0 a14 a13 a12    a11 a10  a9  a8",
-                          " a7   x   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 20;
-	blocksize	= 256;
-	readsize	= 256;
-      ;
+    desc                   = "ATmega64RFR2";
+    id                     = "m64rfr2";
+    signature              = 0x1e 0xa6 0x02;
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 8;  /* for parallel programming */
-        size            = 2048;
-        min_write_delay = 13000;
-        max_write_delay = 13000;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read            = "  1   0   1   0      0   0   0   0",
-                          "  x   x   x   x      x a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
+        size               = 2048;
+        min_write_delay    = 13000;
+        max_write_delay    = 13000;
+        read               = "1010.0000--xxxx.xaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xaaa--aaaa.aaaa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xaaa--aaaa.a000--xxxx.xxxx";
+    ;
 
-        write           = "  1   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0  a2  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x a10  a9  a8",
-			  " a7  a6  a5  a4     a3   0   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 10;
-	blocksize	= 8;
-	readsize	= 256;
-      ;
-
-
-  ;
+    memory "flash"
+        size               = 0x10000;
+        num_pages          = 256;
+        read_lo            = "0010.0000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
+        writepage          = "0100.1100--0aaa.aaaa--axxx.xxxx--xxxx.xxxx";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega2564RFR2
 #------------------------------------------------------------
 
 part parent "m256rfr2"
-    id               = "m2564rfr2";
-    desc             = "ATmega2564RFR2";
-    signature        = 0x1e 0xa8 0x03;
-  ;
+    desc                   = "ATmega2564RFR2";
+    id                     = "m2564rfr2";
+    signature              = 0x1e 0xa8 0x03;
+;
 
 #------------------------------------------------------------
 # ATmega1284RFR2
 #------------------------------------------------------------
 
 part parent "m128rfr2"
-    id               = "m1284rfr2";
-    desc             = "ATmega1284RFR2";
-    signature        = 0x1e 0xa7 0x03;
-  ;
+    desc                   = "ATmega1284RFR2";
+    id                     = "m1284rfr2";
+    signature              = 0x1e 0xa7 0x03;
+;
 
 #------------------------------------------------------------
 # ATmega644RFR2
 #------------------------------------------------------------
 
 part parent "m64rfr2"
-    id               = "m644rfr2";
-    desc             = "ATmega644RFR2";
-    signature        = 0x1e 0xa6 0x03;
-  ;
+    desc                   = "ATmega644RFR2";
+    id                     = "m644rfr2";
+    signature              = 0x1e 0xa6 0x03;
+;
 
 #------------------------------------------------------------
 # ATtiny24
 #------------------------------------------------------------
 
 part
-     id            = "t24";
-     desc          = "ATtiny24";
-     has_debugwire = yes;
-     flash_instr   = 0xB4, 0x07, 0x17;
-     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
-	             0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC,
-	             0x99, 0xE1, 0xBB, 0xAC;
-## no STK500 devcode in XML file, use the ATtiny45 one
-     stk500_devcode   = 0x14;
-##  avr910_devcode   = ?;
-##  Try the AT90S2313 devcode:
-     avr910_devcode   = 0x20;
-     signature        = 0x1e 0x91 0x0b;
-     reset            = io;
-     chip_erase_delay = 4500;
-
-     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    hvsp_controlstack   =
-        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
-        0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
-        0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
-        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F;
-    hventerstabdelay    = 100;
-    hvspcmdexedelay     = 0;
-    synchcycles         = 6;
-    latchcycles         = 1;
-    togglevtg           = 1;
-    poweroffdelay       = 25;
-    resetdelayms        = 0;
-    resetdelayus        = 70;
-    hvleavestabdelay    = 100;
-    resetdelay          = 25;
-    chiperasepolltimeout = 40;
-    chiperasetime       = 0;
+    desc                   = "ATtiny24";
+    id                     = "t24";
+#   no STK500 devcode in XML file, use the ATtiny45 one
+    stk500_devcode         = 0x14;
+#   avr910_devcode         = ?;
+#   Try the AT90S2313 devcode:
+    avr910_devcode         = 0x20;
+    chip_erase_delay       = 4500;
+    signature              = 0x1e 0x91 0x0b;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    hvsp_controlstack      =
+        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x66,
+        0x68, 0x78, 0x68, 0x68, 0x7a, 0x6a, 0x68, 0x78,
+        0x78, 0x7d, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
+        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0f;
+    flash_instr            =  0xb4, 0x07, 0x17;
+    eeprom_instr           =
+        0xbb, 0xff, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
+        0xbc, 0x07, 0xb4, 0x07, 0xba, 0x0d, 0xbb, 0xbc,
+        0x99, 0xe1, 0xbb, 0xac;
+    hventerstabdelay       = 100;
+    latchcycles            = 1;
+    togglevtg              = 1;
+    poweroffdelay          = 25;
+    resetdelayus           = 70;
+    hvleavestabdelay       = 100;
+    resetdelay             = 25;
+    chiperasepolltimeout   = 40;
     programfusepolltimeout = 25;
     programlockpolltimeout = 25;
+    synchcycles            = 6;
+    ocdrev                 = 1;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
-    ocdrev              = 1;
+    memory "eeprom"
+        size               = 128;
+        page_size          = 4;
+        min_write_delay    = 4000;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--000x.xxxx--xaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.xxxx--xaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxx--xaaa.aa00--xxxx.xxxx";
+    ;
 
-     memory "eeprom"
-         size            = 128;
-        paged           = no;
-        page_size       = 4;
-         min_write_delay = 4000;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read            = "1  0  1  0   0  0  0  0   0 0 0 x  x x x x",
-                           "x a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
+    memory "flash"
+        paged              = yes;
+        size               = 2048;
+        page_size          = 32;
+        num_pages          = 64;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 32;
+        readsize           = 256;
+        read_lo            = "0010.0000--0000.00aa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0000.00aa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xxxx.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xxxx.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0000.00aa--aaaa.xxxx--xxxx.xxxx";
+    ;
 
-         write           = "1  1  0  0   0  0  0  0   0 0 0 x  x x x x",
-                           "x a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
+    memory "lfuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
+    memory "hfuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x   x   x",
-			  "  x  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
+    memory "efuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
+    ;
 
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 4;
-	readsize	= 256;
-       ;
-     memory "flash"
-         paged           = yes;
-         size            = 2048;
-         page_size       = 32;
-         num_pages       = 64;
-         min_write_delay = 4500;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read_lo         = "  0   0   1   0    0   0   0   0",
-                           "  0   0   0   0    0   0  a9  a8",
-                           " a7  a6  a5  a4   a3  a2  a1  a0",
-                           "  o   o   o   o    o   o   o   o";
-
-         read_hi         = "  0   0   1   0    1   0   0   0",
-                           "  0   0   0   0    0   0  a9  a8",
-                           " a7  a6  a5  a4   a3  a2  a1  a0",
-                           "  o   o   o   o    o   o   o   o";
-
-         loadpage_lo     = "  0   1   0   0    0   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x   x   x   a3  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         loadpage_hi     = "  0   1   0   0    1   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x   x   x   a3  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         writepage       = "  0  1  0  0   1  1  0  0",
-                           "  0  0  0  0   0  0 a9 a8",
-                           " a7 a6 a5 a4   x  x  x  x",
-                           "  x  x  x  x   x  x  x  x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 32;
-	readsize	= 256;
-       ;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--0000.0000--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--xxxx.xxii";
+    ;
 #   ATtiny24 has Signature Bytes: 0x1E 0x91 0x0B.
-     memory "signature"
-         size            = 3;
-         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-       ;
-     memory "lock"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
-                           "x x x x  x x x x  x x x x  x x i i";
-         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
-                           "0 0 0 0  0 0 0 0  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
-     memory "lfuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "hfuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "efuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                           "x x x x  x x x x  x x x x  x x x i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-     ;
-
-     memory "calibration"
-         size            = 1;
-         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
-                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
-     ;
-  ;
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.000a--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATtiny24A
 #------------------------------------------------------------
 
 part parent "t24"
-    id               = "t24a";
-    desc             = "ATtiny24A";
-  ;
+    desc                   = "ATtiny24A";
+    id                     = "t24a";
+;
 
 #------------------------------------------------------------
 # ATtiny44
 #------------------------------------------------------------
 
 part
-     id            = "t44";
-     desc          = "ATtiny44";
-     has_debugwire = yes;
-     flash_instr   = 0xB4, 0x07, 0x17;
-     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
-                     0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC,
-                     0x99, 0xE1, 0xBB, 0xAC;
-## no STK500 devcode in XML file, use the ATtiny45 one
-     stk500_devcode   = 0x14;
-##  avr910_devcode   = ?;
-##  Try the AT90S2313 devcode:
-     avr910_devcode   = 0x20;
-     signature        = 0x1e 0x92 0x07;
-     reset            = io;
-     chip_erase_delay = 4500;
-
-     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    hvsp_controlstack   =
-        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
-        0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
-        0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
-        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F;
-    hventerstabdelay    = 100;
-    hvspcmdexedelay     = 0;
-    synchcycles         = 6;
-    latchcycles         = 1;
-    togglevtg           = 1;
-    poweroffdelay       = 25;
-    resetdelayms        = 0;
-    resetdelayus        = 70;
-    hvleavestabdelay    = 100;
-    resetdelay          = 25;
-    chiperasepolltimeout = 40;
-    chiperasetime       = 0;
+    desc                   = "ATtiny44";
+    id                     = "t44";
+#   no STK500 devcode in XML file, use the ATtiny45 one
+    stk500_devcode         = 0x14;
+#   avr910_devcode         = ?;
+#   Try the AT90S2313 devcode:
+    avr910_devcode         = 0x20;
+    chip_erase_delay       = 4500;
+    signature              = 0x1e 0x92 0x07;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    hvsp_controlstack      =
+        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x66,
+        0x68, 0x78, 0x68, 0x68, 0x7a, 0x6a, 0x68, 0x78,
+        0x78, 0x7d, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
+        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0f;
+    flash_instr            =  0xb4, 0x07, 0x17;
+    eeprom_instr           =
+        0xbb, 0xff, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
+        0xbc, 0x07, 0xb4, 0x07, 0xba, 0x0d, 0xbb, 0xbc,
+        0x99, 0xe1, 0xbb, 0xac;
+    hventerstabdelay       = 100;
+    latchcycles            = 1;
+    togglevtg              = 1;
+    poweroffdelay          = 25;
+    resetdelayus           = 70;
+    hvleavestabdelay       = 100;
+    resetdelay             = 25;
+    chiperasepolltimeout   = 40;
     programfusepolltimeout = 25;
     programlockpolltimeout = 25;
+    synchcycles            = 6;
+    ocdrev                 = 1;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
-    ocdrev              = 1;
+    memory "eeprom"
+        size               = 256;
+        page_size          = 4;
+        min_write_delay    = 4000;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--000x.xxxx--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.xxxx--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxx--aaaa.aa00--xxxx.xxxx";
+    ;
 
-     memory "eeprom"
-         size            = 256;
-        paged           = no;
-        page_size       = 4;
-         min_write_delay = 4000;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read            = "1  0  1  0   0  0  0  0    0 0 0 x  x x x x",
-                           "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
+    memory "flash"
+        paged              = yes;
+        size               = 4096;
+        page_size          = 64;
+        num_pages          = 64;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 32;
+        readsize           = 256;
+        read_lo            = "0010.0000--0000.0aaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0000.0aaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0000.0aaa--aaax.xxxx--xxxx.xxxx";
+    ;
 
-         write           = "1  1  0  0   0  0  0  0    0 0 0 x  x x x x",
-                           "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
+    memory "lfuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
+    memory "hfuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x   x   x",
-			  " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
+    memory "efuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
+    ;
 
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 4;
-	readsize	= 256;
-       ;
-     memory "flash"
-         paged           = yes;
-         size            = 4096;
-         page_size       = 64;
-         num_pages       = 64;
-         min_write_delay = 4500;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read_lo         = "  0   0   1   0    0   0   0   0",
-                           "  0   0   0   0    0  a10 a9  a8",
-                           " a7  a6  a5  a4   a3  a2  a1  a0",
-                           "  o   o   o   o    o   o   o   o";
-
-         read_hi         = "  0   0   1   0    1   0   0   0",
-                           "  0   0   0   0    0  a10 a9  a8",
-                           " a7  a6  a5  a4   a3  a2  a1  a0",
-                           "  o   o   o   o    o   o   o   o";
-
-         loadpage_lo     = "  0   1   0   0    0   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x   x  a4   a3  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         loadpage_hi     = "  0   1   0   0    1   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x   x  a4   a3  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         writepage       = "  0  1  0  0   1  1  0  0",
-                           "  0  0  0  0   0 a10 a9 a8",
-                           " a7 a6 a5  x   x  x  x  x",
-                           "  x  x  x  x   x  x  x  x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 32;
-	readsize	= 256;
-       ;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--0000.0000--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--xxxx.xxii";
+    ;
 #   ATtiny44 has Signature Bytes: 0x1E 0x92 0x07.
-     memory "signature"
-         size            = 3;
-         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-       ;
-     memory "lock"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
-                           "x x x x  x x x x  x x x x  x x i i";
-         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
-                           "0 0 0 0  0 0 0 0  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
-     memory "lfuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "hfuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "efuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                           "x x x x  x x x x  x x x x  x x x i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-     ;
-
-     memory "calibration"
-         size            = 1;
-         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
-                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
-     ;
-  ;
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.000a--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATtiny44A
 #------------------------------------------------------------
 
 part parent "t44"
-    id               = "t44a";
-    desc             = "ATtiny44A";
-  ;
+    desc                   = "ATtiny44A";
+    id                     = "t44a";
+;
 
 #------------------------------------------------------------
 # ATtiny84
 #------------------------------------------------------------
 
 part
-     id            = "t84";
-     desc          = "ATtiny84";
-     has_debugwire = yes;
-     flash_instr   = 0xB4, 0x07, 0x17;
-     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
-	             0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC,
-	             0x99, 0xE1, 0xBB, 0xAC;
-## no STK500 devcode in XML file, use the ATtiny45 one
-     stk500_devcode   = 0x14;
-##  avr910_devcode   = ?;
-##  Try the AT90S2313 devcode:
-     avr910_devcode   = 0x20;
-     signature        = 0x1e 0x93 0x0c;
-     reset            = io;
-     chip_erase_delay = 4500;
-
-     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    hvsp_controlstack   =
-        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
-        0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
-        0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
-        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F;
-    hventerstabdelay    = 100;
-    hvspcmdexedelay     = 0;
-    synchcycles         = 6;
-    latchcycles         = 1;
-    togglevtg           = 1;
-    poweroffdelay       = 25;
-    resetdelayms        = 0;
-    resetdelayus        = 70;
-    hvleavestabdelay    = 100;
-    resetdelay          = 25;
-    chiperasepolltimeout = 40;
-    chiperasetime       = 0;
+    desc                   = "ATtiny84";
+    id                     = "t84";
+#   no STK500 devcode in XML file, use the ATtiny45 one
+    stk500_devcode         = 0x14;
+#   avr910_devcode         = ?;
+#   Try the AT90S2313 devcode:
+    avr910_devcode         = 0x20;
+    chip_erase_delay       = 4500;
+    signature              = 0x1e 0x93 0x0c;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    hvsp_controlstack      =
+        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x66,
+        0x68, 0x78, 0x68, 0x68, 0x7a, 0x6a, 0x68, 0x78,
+        0x78, 0x7d, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
+        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0f;
+    flash_instr            =  0xb4, 0x07, 0x17;
+    eeprom_instr           =
+        0xbb, 0xff, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
+        0xbc, 0x07, 0xb4, 0x07, 0xba, 0x0d, 0xbb, 0xbc,
+        0x99, 0xe1, 0xbb, 0xac;
+    hventerstabdelay       = 100;
+    latchcycles            = 1;
+    togglevtg              = 1;
+    poweroffdelay          = 25;
+    resetdelayus           = 70;
+    hvleavestabdelay       = 100;
+    resetdelay             = 25;
+    chiperasepolltimeout   = 40;
     programfusepolltimeout = 25;
     programlockpolltimeout = 25;
+    synchcycles            = 6;
+    ocdrev                 = 1;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
-    ocdrev              = 1;
+    memory "eeprom"
+        size               = 512;
+        page_size          = 4;
+        min_write_delay    = 4000;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--000x.xxxa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.xxxa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
+    ;
 
-     memory "eeprom"
-         size            = 512;
-        paged           = no;
-        page_size       = 4;
-         min_write_delay = 4000;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read            = "1  0  1  0   0  0  0  0    0 0 0 x  x x x a8",
-                           "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
+    memory "flash"
+        paged              = yes;
+        size               = 8192;
+        page_size          = 64;
+        num_pages          = 128;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 32;
+        readsize           = 256;
+        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0000.aaaa--aaax.xxxx--xxxx.xxxx";
+    ;
 
-         write           = "1  1  0  0   0  0  0  0    0 0 0 x  x x x a8",
-                           "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
+    memory "lfuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
+    memory "hfuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x   x  a8",
-			  " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
+    memory "efuse"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
+    ;
 
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 4;
-	readsize	= 256;
-       ;
-     memory "flash"
-         paged           = yes;
-         size            = 8192;
-         page_size       = 64;
-         num_pages       = 128;
-         min_write_delay = 4500;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read_lo         = "  0   0   1   0    0   0   0   0",
-                           "  0   0   0   0  a11 a10  a9  a8",
-                           " a7  a6  a5  a4   a3  a2  a1  a0",
-                           "  o   o   o   o    o   o   o   o";
-
-         read_hi         = "  0   0   1   0    1   0   0   0",
-                           "  0   0   0   0  a11 a10  a9  a8",
-                           " a7  a6  a5  a4   a3  a2  a1  a0",
-                           "  o   o   o   o    o   o   o   o";
-
-         loadpage_lo     = "  0   1   0   0    0   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x   x  a4   a3  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         loadpage_hi     = "  0   1   0   0    1   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x   x  a4   a3  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         writepage       = "  0  1  0  0   1   1   0  0",
-                           "  0  0  0  0  a11 a10 a9 a8",
-                           " a7 a6 a5  x   x  x  x  x",
-                           "  x  x  x  x   x  x  x  x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 32;
-	readsize	= 256;
-       ;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--0000.0000--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--xxxx.xxii";
+    ;
 #   ATtiny84 has Signature Bytes: 0x1E 0x93 0x0C.
-     memory "signature"
-         size            = 3;
-         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-       ;
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
-     memory "lock"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
-                           "x x x x  x x x x  x x x x  x x i i";
-         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
-                           "0 0 0 0  0 0 0 0  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "lfuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "hfuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-       ;
-
-     memory "efuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                           "x x x x  x x x x  x x x x  x x x i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-     ;
-
-     memory "calibration"
-         size            = 1;
-         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
-                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
-     ;
-  ;
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.000a--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATtiny84A
 #------------------------------------------------------------
 
 part parent "t84"
-    id               = "t84a";
-    desc             = "ATtiny84A";
-  ;
+    desc                   = "ATtiny84A";
+    id                     = "t84a";
+;
 
 #------------------------------------------------------------
 # ATtiny441
 #------------------------------------------------------------
 
 part parent "t44"
-     id            = "t441";
-     desc          = "ATtiny441";
-     signature     = 0x1e 0x92 0x15;
+    desc                   = "ATtiny441";
+    id                     = "t441";
+    signature              = 0x1e 0x92 0x15;
 
-     memory "flash"
-         paged           = yes;
-         size            = 4096;
-         page_size       = 16;
-         num_pages       = 256;
-         min_write_delay = 4500;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read_lo         = "  0   0   1   0    0   0   0   0",
-                           "  0   0   0   0    0 a10  a9  a8",
-                           " a7  a6  a5  a4   a3  a2  a1  a0",
-                           "  o   o   o   o    o   o   o   o";
+    memory "flash"
+        page_size          = 16;
+        num_pages          = 256;
+        blocksize          = 16;
+        loadpage_lo        = "0100.0000--000x.xxxx--xxxx.xaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xxxx.xaaa--iiii.iiii";
+        writepage          = "0100.1100--0000.0aaa--aaaa.axxx--xxxx.xxxx";
+    ;
 
-         read_hi         = "  0   0   1   0    1   0   0   0",
-                           "  0   0   0   0    0 a10  a9  a8",
-                           " a7  a6  a5  a4   a3  a2  a1  a0",
-                           "  o   o   o   o    o   o   o   o";
-
-         loadpage_lo     = "  0   1   0   0    0   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x   x   x    x  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         loadpage_hi     = "  0   1   0   0    1   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x   x   x    x  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         writepage       = "  0  1  0  0   1   1   0  0",
-                           "  0  0  0  0   0 a10 a9 a8",
-                           " a7 a6 a5 a4  a3  x  x  x",
-                           "  x  x  x  x   x  x  x  x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 16;
-	readsize	= 256;
-     ;
-
-     memory "efuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-     ;
+    memory "efuse"
+        write              = "1010.1100--1010.0100--xxxx.xxxx--iiii.iiii";
+    ;
 ;
 
 #------------------------------------------------------------
@@ -12714,60 +9602,22 @@ part parent "t44"
 #------------------------------------------------------------
 
 part parent "t84"
-     id            = "t841";
-     desc          = "ATtiny841";
-     signature     = 0x1e 0x93 0x15;
+    desc                   = "ATtiny841";
+    id                     = "t841";
+    signature              = 0x1e 0x93 0x15;
 
-     memory "flash"
-         paged           = yes;
-         size            = 8192;
-         page_size       = 16;
-         num_pages       = 512;
-         min_write_delay = 4500;
-         max_write_delay = 4500;
-         readback_p1     = 0xff;
-         readback_p2     = 0xff;
-         read_lo         = "  0   0   1   0    0   0   0   0",
-                           "  0   0   0   0  a11 a10  a9  a8",
-                           " a7  a6  a5  a4   a3  a2  a1  a0",
-                           "  o   o   o   o    o   o   o   o";
+    memory "flash"
+        page_size          = 16;
+        num_pages          = 512;
+        blocksize          = 16;
+        loadpage_lo        = "0100.0000--000x.xxxx--xxxx.xaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xxxx.xaaa--iiii.iiii";
+        writepage          = "0100.1100--0000.aaaa--aaaa.axxx--xxxx.xxxx";
+    ;
 
-         read_hi         = "  0   0   1   0    1   0   0   0",
-                           "  0   0   0   0  a11 a10  a9  a8",
-                           " a7  a6  a5  a4   a3  a2  a1  a0",
-                           "  o   o   o   o    o   o   o   o";
-
-         loadpage_lo     = "  0   1   0   0    0   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x   x   x    x  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         loadpage_hi     = "  0   1   0   0    1   0   0   0",
-                           "  0   0   0   x    x   x   x   x",
-                           "  x   x   x   x    x  a2  a1  a0",
-                           "  i   i   i   i    i   i   i   i";
-
-         writepage       = "  0  1  0  0   1   1   0  0",
-                           "  0  0  0  0  a11 a10 a9 a8",
-                           " a7 a6 a5 a4  a3  x  x  x",
-                           "  x  x  x  x   x  x  x  x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 16;
-	readsize	= 256;
-     ;
-
-     memory "efuse"
-         size            = 1;
-         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                           "x x x x  x x x x  i i i i  i i i i";
-
-         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                           "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-     ;
+    memory "efuse"
+        write              = "1010.1100--1010.0100--xxxx.xxxx--iiii.iiii";
+    ;
 ;
 
 #------------------------------------------------------------
@@ -12775,179 +9625,125 @@ part parent "t84"
 #------------------------------------------------------------
 
 part
-    id            = "t43u";
-    desc          = "ATtiny43U";
-    has_debugwire = yes;
-    flash_instr   = 0xB4, 0x07, 0x17;
-    eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
-                         0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC,
-                         0x99, 0xE1, 0xBB, 0xAC;
-    stk500_devcode   = 0x14;
-##  avr910_devcode   = ?;
-##  Try the AT90S2313 devcode:
-    avr910_devcode   = 0x20;
-    signature        = 0x1e 0x92 0x0C;
-    reset            = io;
-    chip_erase_delay = 1000;
-
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                        "x x x x  x x x x    x x x x  x x x x";
-
-    timeout                     = 200;
-    stabdelay           = 100;
-    cmdexedelay         = 25;
-    synchloops          = 32;
-    bytedelay           = 0;
-    pollindex           = 3;
-    pollvalue           = 0x53;
-    predelay            = 1;
-    postdelay           = 1;
-    pollmethod          = 1;
-        pp_controlstack = 0x0E, 0x1E, 0x0E, 0x1E, 0x2E, 0x3E, 0x2E, 0x3E, 0x4E, 0x5E,
-                                         0x4E, 0x5E, 0x6E, 0x7E, 0x6E, 0x7E, 0x06, 0x16, 0x46, 0x56,
-                                         0x0A, 0x1A, 0x4A, 0x5A, 0x1E, 0x7C, 0x00, 0x01, 0x00, 0x00,
-                                         0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    hvspcmdexedelay     = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 20;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    resetdelay          = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATtiny43U";
+    id                     = "t43u";
+    stk500_devcode         = 0x14;
+#   avr910_devcode         = ?;
+#   Try the AT90S2313 devcode:
+    avr910_devcode         = 0x20;
+    chip_erase_delay       = 1000;
+    signature              = 0x1e 0x92 0x0c;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0e, 0x1e, 0x2e, 0x3e, 0x2e, 0x3e,
+        0x4e, 0x5e, 0x4e, 0x5e, 0x6e, 0x7e, 0x6e, 0x7e,
+        0x06, 0x16, 0x46, 0x56, 0x0a, 0x1a, 0x4a, 0x5a,
+        0x1e, 0x7c, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    flash_instr            =  0xb4, 0x07, 0x17;
+    eeprom_instr           =
+        0xbb, 0xff, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
+        0xbc, 0x07, 0xb4, 0x07, 0xba, 0x0d, 0xbb, 0xbc,
+        0x99, 0xe1, 0xbb, 0xac;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 20;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    resetdelay             = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
+
     memory "eeprom"
-                size            = 64;
-                paged                   = yes;
-                page_size       = 4;
-                num_pages               = 16;
-                min_write_delay = 4000;
-                max_write_delay = 4500;
-                readback_p1     = 0xff;
-                readback_p2     = 0xff;
-                read            = "1  0  1  0   0  0  0  0    0 0 0 x  x x x x",
-                                  "0  0 a5 a4  a3 a2 a1 a0    o o o o  o o o o";
-
-                write           = "1  1  0  0   0  0  0  0    0 0 0 x  x x x x",
-                                   "0  0 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
-
-                loadpage_lo     = "  1   1   0   0      0   0   0   1",
-                                  "  0   0   0   0      0   0   0   0",
-                                  "  0   0   0   0      0   0  a1  a0",
-                                  "  i   i   i   i      i   i   i   i";
-
-                writepage       = "  1   1   0   0      0   0   1   0",
-                                  "  0   0   x   x      x   x   x   x",
-                                  "  0   0  a5  a4     a3  a2   0   0",
-                                  "  x   x   x   x      x   x   x   x";
-
-                mode            = 0x41;
-                delay           = 5;
-                blocksize       = 4;
-                readsize        = 256;
-        ;
-    memory "flash"
-        paged           = yes;
-        size            = 4096;
-        page_size       = 64;
-        num_pages       = 64;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-
-        read_lo         = "  0   0   1   0    0   0   0   0",
-                          "  0   0   0   0    0  a10 a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        read_hi         = "  0   0   1   0    1   0   0   0",
-                          "  0   0   0   0    0  a10 a9  a8",
-                          " a7  a6  a5  a4   a3  a2  a1  a0",
-                          "  o   o   o   o    o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0    0   0   0   0",
-                          "  0   0   0   x    x   x   x   x",
-                          "  x   x   x  a4   a3  a2  a1  a0",
-                          "  i   i   i   i    i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0    1   0   0   0",
-                          "  0   0   0   x    x   x   x   x",
-                          "  x   x   x  a4   a3  a2  a1  a0",
-                          "  i   i   i   i    i   i   i   i";
-
-        writepage       = "  0  1  0  0   1  1  0  0",
-                          "  0  0  0  0   0 a10 a9 a8",
-                          " a7 a6 a5  x   x  x  x  x",
-                          "  x  x  x  x   x  x  x  x";
-
-                mode            = 0x41;
-                delay           = 10;
-                blocksize       = 64;
-                readsize        = 256;
-       ;
-    memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
+        paged              = yes;
+        size               = 64;
+        page_size          = 4;
+        num_pages          = 16;
+        min_write_delay    = 4000;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 5;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--000x.xxxx--00aa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.xxxx--00aa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxx--00aa.aa00--xxxx.xxxx";
     ;
-    memory "lock"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
-                          "x x x x  x x x x  1 1 i i  i i i i";
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 4500;
-        max_write_delay = 4500;
+
+    memory "flash"
+        paged              = yes;
+        size               = 4096;
+        page_size          = 64;
+        num_pages          = 64;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 64;
+        readsize           = 256;
+        read_lo            = "0010.0000--0000.0aaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0000.0aaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0000.0aaa--aaax.xxxx--xxxx.xxxx";
     ;
 
     memory "lfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  x x x x  x x x i";
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
+    ;
 
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 4500;
-        max_write_delay = 4500;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
+
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
     ;
 
     memory "calibration"
-        size            = 1;
-        read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
-                          "0  0  0  0   0  0  0  a0   o o o o  o o o o";
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.000a--oooo.oooo";
     ;
 ;
 
@@ -12956,573 +9752,366 @@ part
 #------------------------------------------------------------
 
 part
-    id               = "m16u4";
-    desc             = "ATmega16U4";
-    signature        = 0x1e 0x94 0x88;
-    usbpid           = 0x2ff4;
-    has_jtag         = yes;
-#    stk500_devcode   = 0xB2;
-#    avr910_devcode   = 0x43;
-    chip_erase_delay = 9000;
-    pagel            = 0xD7;
-    bs2              = 0xA0;
-    reset            = dedicated;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega16U4";
+    id                     = "m16u4";
+#   stk500_devcode         = 0xB2;
+#   avr910_devcode         = 0x43;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x94 0x88;
+    usbpid                 = 0x2ff4;
+    reset                  = io;
+    has_jtag               = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    idr                 = 0x31;
-    spmcr               = 0x57;
-    rampz               = 0x3b;
-    allowfullpagebitstream = no;
-
-    ocdrev              = 3;
+    idr                    = 0x31;
+    rampz                  = 0x3b;
+    spmcr                  = 0x57;
+    ocdrev                 = 3;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 4;  /* for parallel programming */
-        size            = 512;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read            = "  1   0   1   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        write           = "  1   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x   x   x  a8",
-			  " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 20;
-	blocksize	= 4;
-	readsize	= 256;
-      ;
+        size               = 512;
+        page_size          = 4;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        mode               = 65;
+        delay              = 20;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 16384;
-        page_size       = 128;
-        num_pages       = 128;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "  0 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "  0 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          " a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 0x4000;
+        page_size          = 128;
+        num_pages          = 128;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--aaaa.aaaa--aaxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  1 1 1 1  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--1111.iiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   0 0 o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
-
-    memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
-                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--00oo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega32u4
 #------------------------------------------------------------
 
 part
-    id               = "m32u4";
-    desc             = "ATmega32U4";
-    signature        = 0x1e 0x95 0x87;
-    usbpid           = 0x2ff4;
-    has_jtag         = yes;
-#    stk500_devcode   = 0xB2;
-#    avr910_devcode   = 0x43;
-    chip_erase_delay = 9000;
-    pagel            = 0xD7;
-    bs2              = 0xA0;
-    reset            = dedicated;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega32U4";
+    id                     = "m32u4";
+#   stk500_devcode         = 0xB2;
+#   avr910_devcode         = 0x43;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x95 0x87;
+    usbpid                 = 0x2ff4;
+    reset                  = io;
+    has_jtag               = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    idr                 = 0x31;
-    spmcr               = 0x57;
-    rampz               = 0x3b;
-    allowfullpagebitstream = no;
-
-    ocdrev              = 3;
+    idr                    = 0x31;
+    rampz                  = 0x3b;
+    spmcr                  = 0x57;
+    ocdrev                 = 3;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 4;  /* for parallel programming */
-        size            = 1024;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read            = "  1   0   1   0      0   0   0   0",
-                          "  x   x   x   x      x a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        write           = "  1   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0", 
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x a10  a9  a8",
-			  " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 20;
-	blocksize	= 4;
-	readsize	= 256;
-      ;
+        size               = 1024;
+        page_size          = 4;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        mode               = 65;
+        delay              = 20;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.xaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xaaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xaaa--aaaa.aa00--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 32768;
-        page_size       = 128;
-        num_pages       = 256;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "  0 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "  0 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          " a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 0x8000;
+        page_size          = 128;
+        num_pages          = 256;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--aaaa.aaaa--aaxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  1 1 1 1  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--1111.iiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
-
-    memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
-                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # AT90USB646
 #------------------------------------------------------------
 
 part
-    id               = "usb646";
-    desc             = "AT90USB646";
-    signature        = 0x1e 0x96 0x82;
-    usbpid           = 0x2ff9;
-    has_jtag         = yes;
-#    stk500_devcode   = 0xB2;
-#    avr910_devcode   = 0x43;
-    chip_erase_delay = 9000;
-    pagel            = 0xD7;
-    bs2              = 0xA0;
-    reset            = dedicated;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "AT90USB646";
+    id                     = "usb646";
+#   stk500_devcode         = 0xB2;
+#   avr910_devcode         = 0x43;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x96 0x82;
+    usbpid                 = 0x2ff9;
+    reset                  = io;
+    has_jtag               = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    idr                 = 0x31;
-    spmcr               = 0x57;
-    rampz               = 0x3b;
-    allowfullpagebitstream = no;
-
-    ocdrev              = 3;
+    idr                    = 0x31;
+    rampz                  = 0x3b;
+    spmcr                  = 0x57;
+    ocdrev                 = 3;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 8;  /* for parallel programming */
-        size            = 2048;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read            = "  1   0   1   0      0   0   0   0",
-                          "  x   x   x   x      x a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        write           = "  1   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0", 
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0  a2  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x      x a10  a9  a8",
-			  " a7  a6  a5  a4     a3   0   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 10;
-	blocksize	= 8;
-	readsize	= 256;
-      ;
+        size               = 2048;
+        page_size          = 8;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 8;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.xaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.xaaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xaaa--aaaa.a000--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 65536;
-        page_size       = 256;
-        num_pages       = 256;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "  0 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "  0 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  0 a14 a13 a12    a11 a10  a9  a8",
-                          " a7   x   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 256;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 0x10000;
+        page_size          = 256;
+        num_pages          = 256;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 256;
+        readsize           = 256;
+        read_lo            = "0010.0000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0aaa.aaaa--axxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  x x x x  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.iiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
-
-    memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
-                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # AT90USB647
@@ -13530,203 +10119,131 @@ part
 # identical to AT90USB646
 
 part parent "usb646"
-    id               = "usb647";
-    desc             = "AT90USB647";
-    signature        = 0x1e 0x96 0x82;
-
-    ocdrev              = 3;
-  ;
+    desc                   = "AT90USB647";
+    id                     = "usb647";
+;
 
 #------------------------------------------------------------
 # AT90USB1286
 #------------------------------------------------------------
 
 part
-    id               = "usb1286";
-    desc             = "AT90USB1286";
-    signature        = 0x1e 0x97 0x82;
-    usbpid           = 0x2ffb;
-    has_jtag         = yes;
-#    stk500_devcode   = 0xB2;
-#    avr910_devcode   = 0x43;
-    chip_erase_delay = 9000;
-    pagel            = 0xD7;
-    bs2              = 0xA0;
-    reset            = dedicated;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "x x x x  x x x x    x x x x  x x x x";
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "AT90USB1286";
+    id                     = "usb1286";
+#   stk500_devcode         = 0xB2;
+#   avr910_devcode         = 0x43;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x97 0x82;
+    usbpid                 = 0x2ffb;
+    reset                  = io;
+    has_jtag               = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    idr                 = 0x31;
-    spmcr               = 0x57;
-    rampz               = 0x3b;
-    allowfullpagebitstream = no;
-
-    ocdrev              = 3;
+    idr                    = 0x31;
+    rampz                  = 0x3b;
+    spmcr                  = 0x57;
+    ocdrev                 = 3;
+    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 8;  /* for parallel programming */
-        size            = 4096;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read            = "  1   0   1   0      0   0   0   0",
-                          "  x   x   x   x    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        write           = "  1   1   0   0      0   0   0   0",
-                          "  x   x   x   x    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0", 
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0  a2  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-			  "  0   0   x   x    a11 a10  a9  a8",
-			  " a7  a6  a5  a4     a3   0   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 10;
-	blocksize	= 8;
-	readsize	= 256;
-      ;
+        size               = 4096;
+        page_size          = 8;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 8;
+        readsize           = 256;
+        read               = "1010.0000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
+        writepage          = "1100.0010--00xx.aaaa--aaaa.a000--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 131072;
-        page_size       = 256;
-        num_pages       = 512;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7   x   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 256;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 0x20000;
+        page_size          = 256;
+        num_pages          = 512;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 256;
+        readsize           = 256;
+        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  x x x x  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.iiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
-
-    memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
-                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 3;
+        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # AT90USB1287
@@ -13734,1721 +10251,1164 @@ part
 # identical to AT90USB1286
 
 part parent "usb1286"
-    id               = "usb1287";
-    desc             = "AT90USB1287";
-    signature        = 0x1e 0x97 0x82;
-
-    ocdrev              = 3;
-  ;
+    desc                   = "AT90USB1287";
+    id                     = "usb1287";
+;
 
 #------------------------------------------------------------
 # AT90USB162
 #------------------------------------------------------------
 
 part
-    id               = "usb162";
-    desc             = "AT90USB162";
-    has_jtag         = no;
-    has_debugwire    = yes;
-    signature        = 0x1e 0x94 0x82;
-    usbpid           = 0x2ffa;
-    chip_erase_delay = 9000;
-    reset            = io;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                       "x x x x  x x x x    x x x x  x x x x";
-    pagel            = 0xD7;
-    bs2              = 0xC6;
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "AT90USB162";
+    id                     = "usb162";
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xc6;
+    signature              = 0x1e 0x94 0x82;
+    usbpid                 = 0x2ffa;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    ocdrev              = 1;
+    ocdrev                 = 1;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 4;  /* for parallel programming */
-        size            = 512;
-        num_pages       = 128;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   0   0    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   0   0    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-                          "  0   0   0   0    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 20;
-	blocksize	= 4;
-	readsize	= 256;
-      ;
+        size               = 512;
+        page_size          = 4;
+        num_pages          = 128;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        mode               = 65;
+        delay              = 20;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--0000.aaaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--0000.aaaa--aaaa.aa00--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 16384;
-        page_size       = 128;
-        num_pages       = 128;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 0x4000;
+        page_size          = 128;
+        num_pages          = 128;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--aaaa.aaaa--aaxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
     memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1  1 0 0 0    0 0 0 x  x x x x",
-                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
-      ;
-    memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # AT90USB82
 #------------------------------------------------------------
-# Changes against AT90USB162 (beside IDs)
-#    memory "flash"
-#        size            = 8192;
-#        num_pages       = 64;
 
 part
-    id               = "usb82";
-    desc             = "AT90USB82";
-    has_jtag         = no;
-    has_debugwire    = yes;
-    signature        = 0x1e 0x93 0x82;
-    usbpid           = 0x2ff7;
-    chip_erase_delay = 9000;
-    reset            = io;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                       "x x x x  x x x x    x x x x  x x x x";
-    pagel            = 0xD7;
-    bs2              = 0xC6;
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "AT90USB82";
+    id                     = "usb82";
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xc6;
+    signature              = 0x1e 0x93 0x82;
+    usbpid                 = 0x2ff7;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    ocdrev              = 1;
+    ocdrev                 = 1;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 4;  /* for parallel programming */
-        size            = 512;
-        num_pages       = 128;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   0   0    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   0   0    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-                          "  0   0   0   0    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 20;
-	blocksize	= 4;
-	readsize	= 256;
-      ;
+        size               = 512;
+        page_size          = 4;
+        num_pages          = 128;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        mode               = 65;
+        delay              = 20;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--0000.aaaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--0000.aaaa--aaaa.aa00--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 8192;
-        page_size       = 128;
-        num_pages       = 64;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 8192;
+        page_size          = 128;
+        num_pages          = 64;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--aaaa.aaaa--aaxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
     memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1  1 0 0 0    0 0 0 x  x x x x",
-                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
-      ;
-    memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega32U2
 #------------------------------------------------------------
-# Changes against AT90USB162 (beside IDs)
-#    memory "flash"
-#        size            = 32768;
-#        num_pages       = 256;
-#    memory "eeprom"
-#        size            = 1024;
-#        num_pages       = 256;
+
 part
-    id               = "m32u2";
-    desc             = "ATmega32U2";
-    has_jtag         = no;
-    has_debugwire    = yes;
-    signature        = 0x1e 0x95 0x8a;
-    usbpid           = 0x2ff0;
-    chip_erase_delay = 9000;
-    reset            = io;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                       "x x x x  x x x x    x x x x  x x x x";
-    pagel            = 0xD7;
-    bs2              = 0xC6;
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega32U2";
+    id                     = "m32u2";
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xc6;
+    signature              = 0x1e 0x95 0x8a;
+    usbpid                 = 0x2ff0;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    ocdrev              = 1;
+    ocdrev                 = 1;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 4;  /* for parallel programming */
-        size            = 1024;
-        num_pages       = 256;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   0   0    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   0   0    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-                          "  0   0   0   0    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 20;
-	blocksize	= 4;
-	readsize	= 256;
-      ;
+        size               = 1024;
+        page_size          = 4;
+        num_pages          = 256;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        mode               = 65;
+        delay              = 20;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--0000.aaaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--0000.aaaa--aaaa.aa00--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 32768;
-        page_size       = 128;
-        num_pages       = 256;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 0x8000;
+        page_size          = 128;
+        num_pages          = 256;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--aaaa.aaaa--aaxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
     memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1  1 0 0 0    0 0 0 x  x x x x",
-                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
-      ;
-    memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
+    ;
+;
+
 #------------------------------------------------------------
 # ATmega16U2
 #------------------------------------------------------------
-# Changes against ATmega32U2 (beside IDs)
-#    memory "flash"
-#        size            = 16384;
-#        num_pages       = 128;
-#    memory "eeprom"
-#        size            = 512;
-#        num_pages       = 128;
+
 part
-    id               = "m16u2";
-    desc             = "ATmega16U2";
-    has_jtag         = no;
-    has_debugwire    = yes;
-    signature        = 0x1e 0x94 0x89;
-    usbpid           = 0x2fef;
-    chip_erase_delay = 9000;
-    reset            = io;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                       "x x x x  x x x x    x x x x  x x x x";
-    pagel            = 0xD7;
-    bs2              = 0xC6;
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega16U2";
+    id                     = "m16u2";
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xc6;
+    signature              = 0x1e 0x94 0x89;
+    usbpid                 = 0x2fef;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    ocdrev              = 1;
+    ocdrev                 = 1;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 4;  /* for parallel programming */
-        size            = 512;
-        num_pages       = 128;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   0   0    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   0   0    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-                          "  0   0   0   0    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 20;
-	blocksize	= 4;
-	readsize	= 256;
-      ;
+        size               = 512;
+        page_size          = 4;
+        num_pages          = 128;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        mode               = 65;
+        delay              = 20;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--0000.aaaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--0000.aaaa--aaaa.aa00--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 16384;
-        page_size       = 128;
-        num_pages       = 128;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 0x4000;
+        page_size          = 128;
+        num_pages          = 128;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--aaaa.aaaa--aaxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
     memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1  1 0 0 0    0 0 0 x  x x x x",
-                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
-      ;
-    memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega8U2
 #------------------------------------------------------------
-# Changes against ATmega16U2 (beside IDs)
-#    memory "flash"
-#        size            = 8192;
-#        page_size       = 64;
-#        blocksize       = 64;
 
 part
-    id               = "m8u2";
-    desc             = "ATmega8U2";
-    has_jtag         = no;
-    has_debugwire    = yes;
-    signature        = 0x1e 0x93 0x89;
-    usbpid           = 0x2fee;
-    chip_erase_delay = 9000;
-    reset            = io;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x    x x x x  x x x x";
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
-                       "x x x x  x x x x    x x x x  x x x x";
-    pagel            = 0xD7;
-    bs2              = 0xC6;
-
-    timeout		= 200;
-    stabdelay		= 100;
-    cmdexedelay		= 25;
-    synchloops		= 32;
-    bytedelay		= 0;
-    pollindex		= 3;
-    pollvalue		= 0x53;
-    predelay		= 1;
-    postdelay		= 1;
-    pollmethod		= 1;
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega8U2";
+    id                     = "m8u2";
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xc6;
+    signature              = 0x1e 0x93 0x89;
+    usbpid                 = 0x2fee;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    ocdrev              = 1;
+    ocdrev                 = 1;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 4;  /* for parallel programming */
-        size            = 512;
-        num_pages       = 128;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   0   0    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   0   0    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-	loadpage_lo	= "  1   1   0   0      0   0   0   1",
-			  "  0   0   0   0      0   0   0   0",
-			  "  0   0   0   0      0   0  a1  a0",
-			  "  i   i   i   i      i   i   i   i";
-
-	writepage	= "  1   1   0   0      0   0   1   0",
-                          "  0   0   0   0    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2   0   0",
-			  "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 20;
-	blocksize	= 4;
-	readsize	= 256;
-      ;
+        size               = 512;
+        page_size          = 4;
+        num_pages          = 128;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        mode               = 65;
+        delay              = 20;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--0000.aaaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--0000.aaaa--aaaa.aa00--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 8192;
-        page_size       = 128;
-        num_pages       = 64;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  x   x   x   x      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "a15 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-	mode		= 0x41;
-	delay		= 6;
-	blocksize	= 128;
-	readsize	= 256;
-      ;
+        paged              = yes;
+        size               = 8192;
+        page_size          = 128;
+        num_pages          = 64;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--aaaa.aaaa--aaxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  i i i i  i i i i";
-
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+    memory "signature"
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
 
     memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1  1 0 0 0    0 0 0 x  x x x x",
-                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
-      ;
-    memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
-  ;
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega165
 #------------------------------------------------------------
 
 part
-    id               = "m165";
-    desc             = "ATmega165";
-    signature        = 0x1e 0x94 0x10;
-    has_jtag         = yes;
-#   stk500_devcode   = 0x??;
-#   avr910_devcode   = 0x??;
-    chip_erase_delay = 9000;
-    reset            =  io;
-    pagel            = 0xd7;
-    bs2              = 0xa0;
-    pgm_enable       = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
-                       "x x x x  x x x x   x x x x  x x x x";
-
-    chip_erase       = "1 0 1 0  1 1 0 0   1 0 0 x  x x x x",
-                       "x x x x  x x x x   x x x x  x x x x";
-
+    desc                   = "ATmega165";
+    id                     = "m165";
+#   stk500_devcode         = 0x??;
+#   avr910_devcode         = 0x??;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x94 0x10;
+    reset                  = io;
+    has_jtag               = yes;
     timeout                = 200;
     stabdelay              = 100;
     cmdexedelay            = 25;
     synchloops             = 32;
-    bytedelay              = 0;
     pollindex              = 3;
     pollvalue              = 0x53;
     predelay               = 1;
     postdelay              = 1;
     pollmethod             = 1;
-
     pp_controlstack        =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-	      0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-	      0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-	      0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
     hventerstabdelay       = 100;
-    progmodedelay          = 0;
     latchcycles            = 6;
-    togglevtg              = 0;
-    poweroffdelay          = 0;
-    resetdelayms           = 0;
-    resetdelayus           = 0;
     hvleavestabdelay       = 15;
-    chiperasepulsewidth    = 0;
     resetdelay             = 15;
     chiperasepolltimeout   = 10;
-    programfusepulsewidth  = 0;
     programfusepolltimeout = 5;
-    programlockpulsewidth  = 0;
     programlockpolltimeout = 5;
-
     idr                    = 0x31;
     spmcr                  = 0x57;
     eecr                   = 0x3f;
-    allowfullpagebitstream = no;
-
     ocdrev                 = 3;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no;
-        page_size       = 4;
-        size            = 512;
-        num_pages       = 128;
-        min_write_delay = 3600;
-        max_write_delay = 3600;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   0   0      0   0   x  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   0   0      0   0   x  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_lo     = "  1   1   0   0      0   0   0   1",
-                          "  0   0   0   0      0   0   0   0",
-                          "  0   0   0   0      0   0  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  1   1   0   0      0   0   1   0",
-                          "  0   0   0   0      0   0   x  a8",
-                          " a7  a6  a5  a4     a3  a2   0   0",
-                          "  x   x   x   x      x   x   x   x";
-
-        mode            = 0x41;
-        delay           = 20;
-        blocksize       = 4;
-        readsize        = 256;
-      ;
+        size               = 512;
+        page_size          = 4;
+        num_pages          = 128;
+        min_write_delay    = 3600;
+        max_write_delay    = 3600;
+        mode               = 65;
+        delay              = 20;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--0000.00xa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--0000.00xa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--0000.00xa--aaaa.aa00--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 16384;
-        page_size       = 128;
-        num_pages       = 128;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0x00;
-        readback_p2     = 0x00;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "  x   x   x a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "  x   x   x a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  0   0   0   0      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  0   0   0   0      x   x   x   x",
-                          "  x   x  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  x   x   x a12    a11 a10  a9  a8",
-                          " a7  a6   x   x      x   x   x   x",
-                          "  x   x   x   x      x   x   x   x";
-
-        mode            = 0x41;
-        delay           = 10;
-        blocksize       = 128;
-        readsize        = 256;
-      ;
+        paged              = yes;
+        size               = 0x4000;
+        page_size          = 128;
+        num_pages          = 128;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--xxxa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--xxxa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--0000.xxxx--xxaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--0000.xxxx--xxaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--xxxa.aaaa--aaxx.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size   = 1;
-        min_write_delay   = 4500;
-        max_write_delay   = 4500;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size   = 1;
-        min_write_delay   = 4500;
-        max_write_delay   = 4500;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
-                          "x x x x  x x x x   i i i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size   = 1;
-        min_write_delay   = 4500;
-        max_write_delay   = 4500;
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "x x x x  x x x x  x x x x  i i i i";
-     ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.iiii";
+    ;
 
     memory "lock"
-        size   = 1;
-        min_write_delay   = 4500;
-        max_write_delay   = 4500;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
-                          "x x x x  x x x x   1 1 i i  i i i i";
-      ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   0  0  0  0   0  0  0  0",
-                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
-      ;
+        size               = 3;
+        read               = "0011.0000--0000.0000--xxxx.xxaa--oooo.oooo";
+    ;
 
     memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-      ;
-  ;
+        size               = 1;
+        read               = "0011.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega165A
 #------------------------------------------------------------
 
 part parent "m165"
-    id               = "m165a";
-    desc             = "ATmega165A";
-    signature        = 0x1e 0x94 0x10;
-  ;
+    desc                   = "ATmega165A";
+    id                     = "m165a";
+;
 
 #------------------------------------------------------------
 # ATmega165P
 #------------------------------------------------------------
 
 part parent "m165"
-    id               = "m165p";
-    desc             = "ATmega165P";
-    signature        = 0x1e 0x94 0x07;
-  ;
+    desc                   = "ATmega165P";
+    id                     = "m165p";
+    signature              = 0x1e 0x94 0x07;
+;
 
 #------------------------------------------------------------
 # ATmega165PA
 #------------------------------------------------------------
 
 part parent "m165"
-    id               = "m165pa";
-    desc             = "ATmega165PA";
-    signature        = 0x1e 0x94 0x07;
-  ;
+    desc                   = "ATmega165PA";
+    id                     = "m165pa";
+    signature              = 0x1e 0x94 0x07;
+;
 
 #------------------------------------------------------------
 # ATmega325
 #------------------------------------------------------------
 
 part
-    id               = "m325";
-    desc             = "ATmega325";
-    signature        = 0x1e 0x95 0x05;
-    has_jtag         = yes;
-#   stk500_devcode   = 0x??; # No STK500v1 support?
-#   avr910_devcode   = 0x??; # Try the ATmega16 one
-    avr910_devcode   = 0x74;
-    pagel            = 0xd7;
-    bs2              = 0xa0;
-    chip_erase_delay = 9000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "0 0 0 0  0 0 0 0    0 0 0 0  0 0 0 0";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "0 0 0 0  0 0 0 0    0 0 0 0  0 0 0 0";
-
-    timeout             = 200;
-    stabdelay           = 100;
-    cmdexedelay         = 25;
-    synchloops          = 32;
-    bytedelay           = 0;
-    pollindex           = 3;
-    pollvalue           = 0x53;
-    predelay            = 1;
-    postdelay           = 1;
-    pollmethod          = 1;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega325";
+    id                     = "m325";
+#   stk500_devcode         = 0x??; # No STK500v1 support?
+#   avr910_devcode         = 0x??; # Try the ATmega16 one
+    avr910_devcode         = 0x74;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x95 0x05;
+    reset                  = io;
+    has_jtag               = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    idr                 = 0x31;
-    spmcr               = 0x57;
-    allowfullpagebitstream = no;
-
-    ocdrev              = 3;
+    idr                    = 0x31;
+    spmcr                  = 0x57;
+    ocdrev                 = 3;
+    chip_erase             = "1010.1100--1000.0000--0000.0000--0000.0000";
+    pgm_enable             = "1010.1100--0101.0011--0000.0000--0000.0000";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 4;  /* for parallel programming */
-        size            = 1024;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   0   0      0   0  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   0   0      0   0  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_lo     = "  1   1   0   0      0   0   0   1",
-                          "  0   0   0   0      0   0   0   0",
-                          "  0   0   0   0      0   0  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  1   1   0   0      0   0   1   0",
-                          "  0   0   0   0      0   0  a9  a8",
-                          " a7  a6  a5  a4     a3  a2   0   0",
-                          "  x   x   x   x      x   x   x   x";
-
-        mode            = 0x41;
-        delay           = 10;
-        blocksize       = 4;
-        readsize        = 256;
-      ;
+        size               = 1024;
+        page_size          = 4;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--0000.00aa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--0000.00aa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--0000.00aa--aaaa.aa00--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 32768;
-        page_size       = 128;
-        num_pages       = 256;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "  0   0   1   0      0   0   0   0",
-                          "  0 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        read_hi         = "  0   0   1   0      1   0   0   0",
-                          "  0 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  0   0   0   0      0   0   0   0",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  0   0   0   0      0   0   0   0",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  0   1   0   0      1   1   0   0",
-                          "  0 a14 a13 a12    a11 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  x   x   x   x      x   x   x   x";
-
-        mode            = 0x41;
-        delay           = 10;
-        blocksize       = 128;
-        readsize        = 256;
-      ;
-
-    memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 0  0 0 0 0",
-                          "0 0 0 0  0 0 0 0   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        paged              = yes;
+        size               = 0x8000;
+        page_size          = 128;
+        num_pages          = 256;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--0000.0000--aaaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--0000.0000--aaaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--0aaa.aaaa--aaaa.aaaa--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
-                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
-                          "0 0 0 0  0 0 0 0   i i i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--0000.0000--oooo.oooo";
+        write              = "1010.1100--1010.0000--0000.0000--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
-                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
-                          "0 0 0 0  0 0 0 0   i i i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--0000.0000--oooo.oooo";
+        write              = "1010.1100--1010.1000--0000.0000--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--0000.0000--oooo.oooo";
+        write              = "1010.1100--1010.0100--0000.0000--1111.1iii";
+    ;
 
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "0 0 0 0  0 0 0 0  o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "0 0 0 0  0 0 0 0  1 1 1 1  1 i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1110.0000--0000.0000--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   0  0  0  0   0  0  0  0",
-                          "0  0  0  0   0  0 a1 a0   o  o  o  o   o  o  o  o";
-      ;
+        size               = 3;
+        read               = "0011.0000--0000.0000--0000.00aa--oooo.oooo";
+    ;
 
     memory "calibration"
-        size            = 1;
-
-        read            = "0 0 1 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
-        ;
-  ;
+        size               = 1;
+        read               = "0011.1000--0000.0000--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega325A
 #------------------------------------------------------------
 
 part parent "m325"
-    id               = "m325a";
-    desc             = "ATmega325A";
-  ;
+    desc                   = "ATmega325A";
+    id                     = "m325a";
+;
 
 #------------------------------------------------------------
 # ATmega325P
 #------------------------------------------------------------
 
 part parent "m325"
-    id               = "m325p";
-    desc             = "ATmega325P";
-    signature        = 0x1e 0x95 0x0d;
-  ;
+    desc                   = "ATmega325P";
+    id                     = "m325p";
+    signature              = 0x1e 0x95 0x0d;
+;
 
 #------------------------------------------------------------
 # ATmega325PA
 #------------------------------------------------------------
 
 part parent "m325"
-    id               = "m325pa";
-    desc             = "ATmega325PA";
-    signature        = 0x1e 0x95 0x0d;
-  ;
+    desc                   = "ATmega325PA";
+    id                     = "m325pa";
+    signature              = 0x1e 0x95 0x0d;
+;
 
 #------------------------------------------------------------
 # ATmega645
 #------------------------------------------------------------
 
 part
-    id               = "m645";
-    desc             = "ATmega645";
-    signature        = 0x1E 0x96 0x05;
-    has_jtag         = yes;
-#   stk500_devcode   = 0x??; # No STK500v1 support?
-#   avr910_devcode   = 0x??; # Try the ATmega16 one
-    avr910_devcode   = 0x74;
-    pagel            = 0xd7;
-    bs2              = 0xa0;
-    chip_erase_delay = 9000;
-    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
-                       "0 0 0 0  0 0 0 0    0 0 0 0  0 0 0 0";
-
-    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
-                       "0 0 0 0  0 0 0 0    0 0 0 0  0 0 0 0";
-
-    timeout             = 200;
-    stabdelay           = 100;
-    cmdexedelay         = 25;
-    synchloops          = 32;
-    bytedelay           = 0;
-    pollindex           = 3;
-    pollvalue           = 0x53;
-    predelay            = 1;
-    postdelay           = 1;
-    pollmethod          = 1;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
-        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
-        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
-        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 5;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATmega645";
+    id                     = "m645";
+#   stk500_devcode         = 0x??; # No STK500v1 support?
+#   avr910_devcode         = 0x??; # Try the ATmega16 one
+    avr910_devcode         = 0x74;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xd7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x96 0x05;
+    reset                  = io;
+    has_jtag               = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    hventerstabdelay       = 100;
+    latchcycles            = 5;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
-
-    idr                 = 0x31;
-    spmcr               = 0x57;
-    allowfullpagebitstream = no;
-
-    ocdrev              = 3;
+    idr                    = 0x31;
+    spmcr                  = 0x57;
+    ocdrev                 = 3;
+    chip_erase             = "1010.1100--1000.0000--0000.0000--0000.0000";
+    pgm_enable             = "1010.1100--0101.0011--0000.0000--0000.0000";
 
     memory "eeprom"
-        paged           = no; /* leave this "no" */
-        page_size       = 8;  /* for parallel programming */
-        size            = 2048;
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read            = "  1   0   1   0      0   0   0   0",
-                          "  0   0   0   0      0 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  o   o   o   o      o   o   o   o";
-
-        write           = "  1   1   0   0      0   0   0   0",
-                          "  0   0   0   0      0 a10  a9  a8",
-                          " a7  a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_lo     = "  1   1   0   0      0   0   0   1",
-                          "  0   0   0   0      0   0   0   0",
-                          "  0   0   0   0      0  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "  1   1   0   0      0   0   1   0",
-                          "  0   0   0   0      0 a10  a9  a8",
-                          " a7  a6  a5  a4     a3   0   0   0",
-                          "  x   x   x   x      x   x   x   x";
-
-        mode            = 0x41;
-        delay           = 10;
-        blocksize       = 8;
-        readsize        = 256;
-      ;
+        size               = 2048;
+        page_size          = 8;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 8;
+        readsize           = 256;
+        read               = "1010.0000--0000.0aaa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--0000.0aaa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
+        writepage          = "1100.0010--0000.0aaa--aaaa.a000--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 65536;
-        page_size       = 256;
-        num_pages       = 256;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = "   0   0   1   0      0   0   0   0",
-                          " a15 a14 a13 a12    a11 a10  a9  a8",
-                          "  a7  a6  a5  a4     a3  a2  a1  a0",
-                          "   o   o   o   o      o   o   o   o";
-
-        read_hi         = "   0   0   1   0      1   0   0   0",
-                          " a15 a14 a13 a12    a11 a10  a9  a8",
-                          "  a7  a6  a5  a4     a3  a2  a1  a0",
-                          "   o   o   o   o      o   o   o   o";
-
-        loadpage_lo     = "  0   1   0   0      0   0   0   0",
-                          "  0   0   0   0      0   0   0   0",
-                          "  a7 a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        loadpage_hi     = "  0   1   0   0      1   0   0   0",
-                          "  0   0   0   0      0   0   0   0",
-                          "  a7 a6  a5  a4     a3  a2  a1  a0",
-                          "  i   i   i   i      i   i   i   i";
-
-        writepage       = "   0   1   0   0      1   1   0   0",
-                          " a15 a14 a13 a12    a11 a10  a9  a8",
-                          "  a7  a6  a5  a4     a3  a2  a1  a0",
-                          "   0   0   0   0      0   0   0   0";
-
-        mode            = 0x41;
-        delay           = 10;
-        blocksize       = 128;
-        readsize        = 256;
-      ;
-
-    memory "lock"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "x x x x  x x x x   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 1 1 0  0 0 0 0",
-                          "0 0 0 0  0 0 0 0   1 1 i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        paged              = yes;
+        size               = 0x10000;
+        page_size          = 256;
+        num_pages          = 256;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 10;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--0000.0000--aaaa.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--0000.0000--aaaa.aaaa--iiii.iiii";
+        writepage          = "0100.1100--aaaa.aaaa--aaaa.aaaa--0000.0000";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
-                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
-                          "0 0 0 0  0 0 0 0   i i i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.0000--0000.0000--oooo.oooo";
+        write              = "1010.1100--1010.0000--0000.0000--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
-                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
-                          "0 0 0 0  0 0 0 0   i i i i  i i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.1000--0000.0000--oooo.oooo";
+        write              = "1010.1100--1010.1000--0000.0000--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.0000--0000.1000--0000.0000--oooo.oooo";
+        write              = "1010.1100--1010.0100--0000.0000--1111.1iii";
+    ;
 
-        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
-                          "0 0 0 0  0 0 0 0  o o o o  o o o o";
-
-        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
-                          "0 0 0 0  0 0 0 0  1 1 1 1  1 i i i";
-        min_write_delay = 9000;
-        max_write_delay = 9000;
-      ;
+    memory "lock"
+        size               = 1;
+        min_write_delay    = 9000;
+        max_write_delay    = 9000;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1110.0000--0000.0000--11ii.iiii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0  0  1  1   0  0  0  0   0  0  0  0   0  0  0  0",
-                          "0  0  0  0   0  0 a1 a0   o  o  o  o   o  o  o  o";
-      ;
+        size               = 3;
+        read               = "0011.0000--0000.0000--0000.00aa--oooo.oooo";
+    ;
 
     memory "calibration"
-        size            = 1;
-
-        read            = "0 0 1 1  1 0 0 0   0 0 0 0  0 0 0 0",
-                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
-        ;
-  ;
+        size               = 1;
+        read               = "0011.1000--0000.0000--0000.0000--oooo.oooo";
+    ;
+;
 
 #------------------------------------------------------------
 # ATmega645A
 #------------------------------------------------------------
 
 part parent "m645"
-    id               = "m645a";
-    desc             = "ATmega645A";
-  ;
+    desc                   = "ATmega645A";
+    id                     = "m645a";
+;
 
 #------------------------------------------------------------
 # ATmega645P
 #------------------------------------------------------------
 
 part parent "m645"
-    id               = "m645p";
-    desc             = "ATmega645P";
-    signature        = 0x1e 0x96 0x0d;
-  ;
+    desc                   = "ATmega645P";
+    id                     = "m645p";
+    signature              = 0x1e 0x96 0x0d;
+;
 
 #------------------------------------------------------------
 # ATmega3250
 #------------------------------------------------------------
 
 part parent "m325"
-    id               = "m3250";
-    desc             = "ATmega3250";
-    signature        = 0x1E 0x95 0x06;
-  ;
+    desc                   = "ATmega3250";
+    id                     = "m3250";
+    signature              = 0x1e 0x95 0x06;
+;
 
 #------------------------------------------------------------
 # ATmega3250A
 #------------------------------------------------------------
 
 part parent "m325"
-    id               = "m3250a";
-    desc             = "ATmega3250A";
-    signature        = 0x1E 0x95 0x06;
-  ;
+    desc                   = "ATmega3250A";
+    id                     = "m3250a";
+    signature              = 0x1e 0x95 0x06;
+;
 
 #------------------------------------------------------------
 # ATmega3250P
 #------------------------------------------------------------
 
 part parent "m325"
-    id               = "m3250p";
-    desc             = "ATmega3250P";
-    signature        = 0x1E 0x95 0x0e;
-  ;
+    desc                   = "ATmega3250P";
+    id                     = "m3250p";
+    signature              = 0x1e 0x95 0x0e;
+;
 
 #------------------------------------------------------------
 # ATmega3250PA
 #------------------------------------------------------------
 
 part parent "m325"
-    id               = "m3250pa";
-    desc             = "ATmega3250PA";
-    signature        = 0x1E 0x95 0x0e;
-  ;
+    desc                   = "ATmega3250PA";
+    id                     = "m3250pa";
+    signature              = 0x1e 0x95 0x0e;
+;
 
 #------------------------------------------------------------
 # ATmega6450
 #------------------------------------------------------------
 
 part parent "m645"
-    id               = "m6450";
-    desc             = "ATmega6450";
-    signature        = 0x1E 0x96 0x06;
-  ;
+    desc                   = "ATmega6450";
+    id                     = "m6450";
+    signature              = 0x1e 0x96 0x06;
+;
 
 #------------------------------------------------------------
 # ATmega6450A
 #------------------------------------------------------------
 
 part parent "m645"
-    id               = "m6450a";
-    desc             = "ATmega6450A";
-    signature        = 0x1E 0x96 0x06;
-  ;
+    desc                   = "ATmega6450A";
+    id                     = "m6450a";
+    signature              = 0x1e 0x96 0x06;
+;
 
 #------------------------------------------------------------
 # ATmega6450P
 #------------------------------------------------------------
 
 part parent "m645"
-    id               = "m6450p";
-    desc             = "ATmega6450P";
-    signature        = 0x1E 0x96 0x0e;
-  ;
+    desc                   = "ATmega6450P";
+    id                     = "m6450p";
+    signature              = 0x1e 0x96 0x0e;
+;
 
 #------------------------------------------------------------
 # AVR XMEGA family common values
 #------------------------------------------------------------
 
 part
-    id		= ".xmega";
-    desc	= "AVR XMEGA family common values";
-    has_pdi	= yes;
-    nvm_base	= 0x01c0;
-    mcu_base	= 0x0090;
-
-    memory "signature"
-        size		= 3;
-        offset		= 0x1000090;
-    ;
-
-    memory "prodsig"
-        size		= 0x32;
-        offset		= 0x8e0200;
-        page_size	= 0x32;
-        readsize	= 0x32;
-    ;
+    desc                   = "AVR XMEGA family common values";
+    id                     = ".xmega";
+    has_pdi                = yes;
+    mcu_base               = 0x0090;
+    nvm_base               = 0x01c0;
 
     memory "fuse1"
-        size		= 1;
-        offset		= 0x8f0021;
+        size               = 1;
+        offset             = 0x8f0021;
     ;
 
     memory "fuse2"
-        size		= 1;
-        offset		= 0x8f0022;
+        size               = 1;
+        offset             = 0x8f0022;
     ;
 
     memory "fuse4"
-        size		= 1;
-        offset		= 0x8f0024;
+        size               = 1;
+        offset             = 0x8f0024;
     ;
 
     memory "fuse5"
-        size		= 1;
-        offset		= 0x8f0025;
+        size               = 1;
+        offset             = 0x8f0025;
     ;
 
     memory "lock"
-        size		= 1;
-        offset		= 0x8f0027;
+        size               = 1;
+        offset             = 0x8f0027;
+    ;
+
+    memory "signature"
+        size               = 3;
+        offset             = 0x1000090;
+    ;
+
+    memory "prodsig"
+        size               = 50;
+        page_size          = 50;
+        offset             = 0x8e0200;
+        readsize           = 50;
     ;
 
     memory "data"
         # SRAM, only used to supply the offset
-        offset		= 0x1000000;
+        offset             = 0x1000000;
     ;
 ;
 
@@ -15457,51 +11417,51 @@ part
 #------------------------------------------------------------
 
 part parent ".xmega"
-    id		= "x16a4u";
-    desc	= "ATxmega16A4U";
-    signature	= 0x1e 0x94 0x41;
-    usbpid	= 0x2fe3;
+    desc                   = "ATxmega16A4U";
+    id                     = "x16a4u";
+    signature              = 0x1e 0x94 0x41;
+    usbpid                 = 0x2fe3;
 
     memory "eeprom"
-        size		= 0x400;
-        offset		= 0x8c0000;
-        page_size	= 0x20;
-        readsize	= 0x100;
-    ;
-
-    memory "application"
-        size		= 0x4000;
-        offset		= 0x800000;
-        page_size	= 0x100;
-        readsize	= 0x100;
-    ;
-
-    memory "apptable"
-        size		= 0x1000;
-        offset		= 0x803000;
-        page_size	= 0x100;
-        readsize	= 0x100;
-    ;
-
-    memory "boot"
-        size		= 0x1000;
-        offset		= 0x804000;
-        page_size	= 0x100;
-        readsize	= 0x100;
+        size               = 1024;
+        page_size          = 32;
+        offset             = 0x8c0000;
+        readsize           = 256;
     ;
 
     memory "flash"
-        size		= 0x5000;
-        offset		= 0x800000;
-        page_size	= 0x100;
-        readsize	= 0x100;
+        size               = 0x5000;
+        page_size          = 256;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "application"
+        size               = 0x4000;
+        page_size          = 256;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "apptable"
+        size               = 4096;
+        page_size          = 256;
+        offset             = 0x803000;
+        readsize           = 256;
+    ;
+
+    memory "boot"
+        size               = 4096;
+        page_size          = 256;
+        offset             = 0x804000;
+        readsize           = 256;
     ;
 
     memory "usersig"
-        size		= 0x100;
-        offset		= 0x8e0400;
-        page_size	= 0x100;
-        readsize	= 0x100;
+        size               = 256;
+        page_size          = 256;
+        offset             = 0x8e0400;
+        readsize           = 256;
     ;
 ;
 
@@ -15510,9 +11470,9 @@ part parent ".xmega"
 #------------------------------------------------------------
 
 part parent "x16a4u"
-    id		= "x16c4";
-    desc	= "ATxmega16C4";
-    signature	= 0x1e 0x94 0x43;
+    desc                   = "ATxmega16C4";
+    id                     = "x16c4";
+    signature              = 0x1e 0x94 0x43;
 ;
 
 #------------------------------------------------------------
@@ -15520,9 +11480,9 @@ part parent "x16a4u"
 #------------------------------------------------------------
 
 part parent "x16a4u"
-    id		= "x16d4";
-    desc	= "ATxmega16D4";
-    signature	= 0x1e 0x94 0x42;
+    desc                   = "ATxmega16D4";
+    id                     = "x16d4";
+    signature              = 0x1e 0x94 0x42;
 ;
 
 #------------------------------------------------------------
@@ -15530,14 +11490,12 @@ part parent "x16a4u"
 #------------------------------------------------------------
 
 part parent "x16a4u"
-    id		= "x16a4";
-    desc	= "ATxmega16A4";
-    signature	= 0x1e 0x94 0x41;
-    has_jtag	= yes;
+    desc                   = "ATxmega16A4";
+    id                     = "x16a4";
 
     memory "fuse0"
-        size		= 1;
-        offset		= 0x8f0020;
+        size               = 1;
+        offset             = 0x8f0020;
     ;
 ;
 
@@ -15546,51 +11504,51 @@ part parent "x16a4u"
 #------------------------------------------------------------
 
 part parent ".xmega"
-    id		= "x32a4u";
-    desc	= "ATxmega32A4U";
-    signature	= 0x1e 0x95 0x41;
-    usbpid	= 0x2fe4;
+    desc                   = "ATxmega32A4U";
+    id                     = "x32a4u";
+    signature              = 0x1e 0x95 0x41;
+    usbpid                 = 0x2fe4;
 
     memory "eeprom"
-        size		= 0x400;
-        offset		= 0x8c0000;
-        page_size	= 0x20;
-        readsize	= 0x100;
-    ;
-
-    memory "application"
-        size		= 0x8000;
-        offset		= 0x800000;
-        page_size	= 0x100;
-        readsize	= 0x100;
-    ;
-
-    memory "apptable"
-        size		= 0x1000;
-        offset		= 0x807000;
-        page_size	= 0x100;
-        readsize	= 0x100;
-    ;
-
-    memory "boot"
-        size		= 0x1000;
-        offset		= 0x808000;
-        page_size	= 0x100;
-        readsize	= 0x100;
+        size               = 1024;
+        page_size          = 32;
+        offset             = 0x8c0000;
+        readsize           = 256;
     ;
 
     memory "flash"
-        size		= 0x9000;
-        offset		= 0x800000;
-        page_size	= 0x100;
-        readsize	= 0x100;
+        size               = 0x9000;
+        page_size          = 256;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "application"
+        size               = 0x8000;
+        page_size          = 256;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "apptable"
+        size               = 4096;
+        page_size          = 256;
+        offset             = 0x807000;
+        readsize           = 256;
+    ;
+
+    memory "boot"
+        size               = 4096;
+        page_size          = 256;
+        offset             = 0x808000;
+        readsize           = 256;
     ;
 
     memory "usersig"
-        size		= 0x100;
-        offset		= 0x8e0400;
-        page_size	= 0x100;
-        readsize	= 0x100;
+        size               = 256;
+        page_size          = 256;
+        offset             = 0x8e0400;
+        readsize           = 256;
     ;
 ;
 
@@ -15599,9 +11557,9 @@ part parent ".xmega"
 #------------------------------------------------------------
 
 part parent "x32a4u"
-    id		= "x32c4";
-    desc	= "ATxmega32C4";
-    signature	= 0x1e 0x95 0x44;
+    desc                   = "ATxmega32C4";
+    id                     = "x32c4";
+    signature              = 0x1e 0x95 0x44;
 ;
 
 #------------------------------------------------------------
@@ -15609,9 +11567,9 @@ part parent "x32a4u"
 #------------------------------------------------------------
 
 part parent "x32a4u"
-    id		= "x32d4";
-    desc	= "ATxmega32D4";
-    signature	= 0x1e 0x95 0x42;
+    desc                   = "ATxmega32D4";
+    id                     = "x32d4";
+    signature              = 0x1e 0x95 0x42;
 ;
 
 #------------------------------------------------------------
@@ -15619,14 +11577,12 @@ part parent "x32a4u"
 #------------------------------------------------------------
 
 part parent "x32a4u"
-    id		= "x32a4";
-    desc	= "ATxmega32A4";
-    signature	= 0x1e 0x95 0x41;
-    has_jtag	= yes;
+    desc                   = "ATxmega32A4";
+    id                     = "x32a4";
 
     memory "fuse0"
-        size		= 1;
-        offset		= 0x8f0020;
+        size               = 1;
+        offset             = 0x8f0020;
     ;
 ;
 
@@ -15635,51 +11591,51 @@ part parent "x32a4u"
 #------------------------------------------------------------
 
 part parent ".xmega"
-    id		= "x64a4u";
-    desc	= "ATxmega64A4U";
-    signature	= 0x1e 0x96 0x46;
-    usbpid	= 0x2fe5;
+    desc                   = "ATxmega64A4U";
+    id                     = "x64a4u";
+    signature              = 0x1e 0x96 0x46;
+    usbpid                 = 0x2fe5;
 
     memory "eeprom"
-        size		= 0x800;
-        offset		= 0x8c0000;
-        page_size	= 0x20;
-        readsize	= 0x100;
-    ;
-
-    memory "application"
-        size		= 0x10000;
-        offset		= 0x800000;
-        page_size	= 0x100;
-        readsize	= 0x100;
-    ;
-
-    memory "apptable"
-        size		= 0x1000;
-        offset		= 0x80f000;
-        page_size	= 0x100;
-        readsize	= 0x100;
-    ;
-
-    memory "boot"
-        size		= 0x1000;
-        offset		= 0x810000;
-        page_size	= 0x100;
-        readsize	= 0x100;
+        size               = 2048;
+        page_size          = 32;
+        offset             = 0x8c0000;
+        readsize           = 256;
     ;
 
     memory "flash"
-        size		= 0x11000;
-        offset		= 0x800000;
-        page_size	= 0x100;
-        readsize	= 0x100;
+        size               = 0x11000;
+        page_size          = 256;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "application"
+        size               = 0x10000;
+        page_size          = 256;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "apptable"
+        size               = 4096;
+        page_size          = 256;
+        offset             = 0x80f000;
+        readsize           = 256;
+    ;
+
+    memory "boot"
+        size               = 4096;
+        page_size          = 256;
+        offset             = 0x810000;
+        readsize           = 256;
     ;
 
     memory "usersig"
-        size		= 0x100;
-        offset		= 0x8e0400;
-        page_size	= 0x100;
-        readsize	= 0x100;
+        size               = 256;
+        page_size          = 256;
+        offset             = 0x8e0400;
+        readsize           = 256;
     ;
 ;
 
@@ -15688,10 +11644,10 @@ part parent ".xmega"
 #------------------------------------------------------------
 
 part parent "x64a4u"
-    id		= "x64c3";
-    desc	= "ATxmega64C3";
-    signature	= 0x1e 0x96 0x49;
-    usbpid	= 0x2fd6;
+    desc                   = "ATxmega64C3";
+    id                     = "x64c3";
+    signature              = 0x1e 0x96 0x49;
+    usbpid                 = 0x2fd6;
 ;
 
 #------------------------------------------------------------
@@ -15699,9 +11655,9 @@ part parent "x64a4u"
 #------------------------------------------------------------
 
 part parent "x64a4u"
-    id		= "x64d3";
-    desc	= "ATxmega64D3";
-    signature	= 0x1e 0x96 0x4a;
+    desc                   = "ATxmega64D3";
+    id                     = "x64d3";
+    signature              = 0x1e 0x96 0x4a;
 ;
 
 #------------------------------------------------------------
@@ -15709,9 +11665,9 @@ part parent "x64a4u"
 #------------------------------------------------------------
 
 part parent "x64a4u"
-    id		= "x64d4";
-    desc	= "ATxmega64D4";
-    signature	= 0x1e 0x96 0x47;
+    desc                   = "ATxmega64D4";
+    id                     = "x64d4";
+    signature              = 0x1e 0x96 0x47;
 ;
 
 #------------------------------------------------------------
@@ -15719,14 +11675,14 @@ part parent "x64a4u"
 #------------------------------------------------------------
 
 part parent "x64a4u"
-    id		= "x64a1";
-    desc	= "ATxmega64A1";
-    signature	= 0x1e 0x96 0x4e;
-    has_jtag	= yes;
+    desc                   = "ATxmega64A1";
+    id                     = "x64a1";
+    signature              = 0x1e 0x96 0x4e;
+    has_jtag               = yes;
 
     memory "fuse0"
-        size		= 1;
-        offset		= 0x8f0020;
+        size               = 1;
+        offset             = 0x8f0020;
     ;
 ;
 
@@ -15735,10 +11691,9 @@ part parent "x64a4u"
 #------------------------------------------------------------
 
 part parent "x64a1"
-    id		= "x64a1u";
-    desc	= "ATxmega64A1U";
-    signature	= 0x1e 0x96 0x4e;
-    usbpid	= 0x2fe8;
+    desc                   = "ATxmega64A1U";
+    id                     = "x64a1u";
+    usbpid                 = 0x2fe8;
 ;
 
 #------------------------------------------------------------
@@ -15746,9 +11701,9 @@ part parent "x64a1"
 #------------------------------------------------------------
 
 part parent "x64a1"
-    id		= "x64a3";
-    desc	= "ATxmega64A3";
-    signature	= 0x1e 0x96 0x42;
+    desc                   = "ATxmega64A3";
+    id                     = "x64a3";
+    signature              = 0x1e 0x96 0x42;
 ;
 
 #------------------------------------------------------------
@@ -15756,10 +11711,9 @@ part parent "x64a1"
 #------------------------------------------------------------
 
 part parent "x64a1"
-    id		= "x64a3u";
-    desc	= "ATxmega64A3U";
-    signature	= 0x1e 0x96 0x42;
-    usbpid	= 0x2fe5;
+    desc                   = "ATxmega64A3U";
+    id                     = "x64a3u";
+    signature              = 0x1e 0x96 0x42;
 ;
 
 #------------------------------------------------------------
@@ -15767,9 +11721,9 @@ part parent "x64a1"
 #------------------------------------------------------------
 
 part parent "x64a1"
-    id		= "x64a4";
-    desc	= "ATxmega64A4";
-    signature	= 0x1e 0x96 0x46;
+    desc                   = "ATxmega64A4";
+    id                     = "x64a4";
+    signature              = 0x1e 0x96 0x46;
 ;
 
 #------------------------------------------------------------
@@ -15777,10 +11731,10 @@ part parent "x64a1"
 #------------------------------------------------------------
 
 part parent "x64a1"
-    id		= "x64b1";
-    desc	= "ATxmega64B1";
-    signature	= 0x1e 0x96 0x52;
-    usbpid	= 0x2fe1;
+    desc                   = "ATxmega64B1";
+    id                     = "x64b1";
+    signature              = 0x1e 0x96 0x52;
+    usbpid                 = 0x2fe1;
 ;
 
 #------------------------------------------------------------
@@ -15788,10 +11742,10 @@ part parent "x64a1"
 #------------------------------------------------------------
 
 part parent "x64a1"
-    id		= "x64b3";
-    desc	= "ATxmega64B3";
-    signature	= 0x1e 0x96 0x51;
-    usbpid	= 0x2fdf;
+    desc                   = "ATxmega64B3";
+    id                     = "x64b3";
+    signature              = 0x1e 0x96 0x51;
+    usbpid                 = 0x2fdf;
 ;
 
 #------------------------------------------------------------
@@ -15799,51 +11753,51 @@ part parent "x64a1"
 #------------------------------------------------------------
 
 part parent ".xmega"
-    id		= "x128c3";
-    desc	= "ATxmega128C3";
-    signature	= 0x1e 0x97 0x52;
-    usbpid	= 0x2fd7;
+    desc                   = "ATxmega128C3";
+    id                     = "x128c3";
+    signature              = 0x1e 0x97 0x52;
+    usbpid                 = 0x2fd7;
 
     memory "eeprom"
-        size		= 0x800;
-        offset		= 0x8c0000;
-        page_size	= 0x20;
-        readsize	= 0x100;
-    ;
-
-    memory "application"
-        size		= 0x20000;
-        offset		= 0x800000;
-        page_size	= 0x200;
-        readsize	= 0x100;
-    ;
-
-    memory "apptable"
-        size		= 0x2000;
-        offset		= 0x81e000;
-        page_size	= 0x200;
-        readsize	= 0x100;
-    ;
-
-    memory "boot"
-        size		= 0x2000;
-        offset		= 0x820000;
-        page_size	= 0x200;
-        readsize	= 0x100;
+        size               = 2048;
+        page_size          = 32;
+        offset             = 0x8c0000;
+        readsize           = 256;
     ;
 
     memory "flash"
-        size		= 0x22000;
-        offset		= 0x800000;
-        page_size	= 0x200;
-        readsize	= 0x100;
+        size               = 0x22000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "application"
+        size               = 0x20000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "apptable"
+        size               = 8192;
+        page_size          = 512;
+        offset             = 0x81e000;
+        readsize           = 256;
+    ;
+
+    memory "boot"
+        size               = 8192;
+        page_size          = 512;
+        offset             = 0x820000;
+        readsize           = 256;
     ;
 
     memory "usersig"
-        size		= 0x200;
-        offset		= 0x8e0400;
-        page_size	= 0x200;
-        readsize	= 0x100;
+        size               = 512;
+        page_size          = 512;
+        offset             = 0x8e0400;
+        readsize           = 256;
     ;
 ;
 
@@ -15852,9 +11806,9 @@ part parent ".xmega"
 #------------------------------------------------------------
 
 part parent "x128c3"
-    id		= "x128d3";
-    desc	= "ATxmega128D3";
-    signature	= 0x1e 0x97 0x48;
+    desc                   = "ATxmega128D3";
+    id                     = "x128d3";
+    signature              = 0x1e 0x97 0x48;
 ;
 
 #------------------------------------------------------------
@@ -15862,15 +11816,12 @@ part parent "x128c3"
 #------------------------------------------------------------
 
 part parent "x128c3"
-    id		= "x128d4";
-    desc	= "ATxmega128D4";
-    signature	= 0x1e 0x97 0x47;
+    desc                   = "ATxmega128D4";
+    id                     = "x128d4";
+    signature              = 0x1e 0x97 0x47;
 
     memory "flash"
-        size		= 0x22000;
-        offset		= 0x800000;
-        page_size	= 0x100;
-        readsize	= 0x100;
+        page_size          = 256;
     ;
 ;
 
@@ -15879,14 +11830,14 @@ part parent "x128c3"
 #------------------------------------------------------------
 
 part parent "x128c3"
-    id		= "x128a1";
-    desc	= "ATxmega128A1";
-    signature	= 0x1e 0x97 0x4c;
-    has_jtag	= yes;
+    desc                   = "ATxmega128A1";
+    id                     = "x128a1";
+    signature              = 0x1e 0x97 0x4c;
+    has_jtag               = yes;
 
     memory "fuse0"
-        size		= 1;
-        offset		= 0x8f0020;
+        size               = 1;
+        offset             = 0x8f0020;
     ;
 ;
 
@@ -15895,9 +11846,9 @@ part parent "x128c3"
 #------------------------------------------------------------
 
 part parent "x128a1"
-    id		= "x128a1d";
-    desc	= "ATxmega128A1revD";
-    signature	= 0x1e 0x97 0x41;
+    desc                   = "ATxmega128A1revD";
+    id                     = "x128a1d";
+    signature              = 0x1e 0x97 0x41;
 ;
 
 #------------------------------------------------------------
@@ -15905,10 +11856,9 @@ part parent "x128a1"
 #------------------------------------------------------------
 
 part parent "x128a1"
-    id		= "x128a1u";
-    desc	= "ATxmega128A1U";
-    signature	= 0x1e 0x97 0x4c;
-    usbpid	= 0x2fed;
+    desc                   = "ATxmega128A1U";
+    id                     = "x128a1u";
+    usbpid                 = 0x2fed;
 ;
 
 #------------------------------------------------------------
@@ -15916,9 +11866,9 @@ part parent "x128a1"
 #------------------------------------------------------------
 
 part parent "x128a1"
-    id		= "x128a3";
-    desc	= "ATxmega128A3";
-    signature	= 0x1e 0x97 0x42;
+    desc                   = "ATxmega128A3";
+    id                     = "x128a3";
+    signature              = 0x1e 0x97 0x42;
 ;
 
 #------------------------------------------------------------
@@ -15926,10 +11876,10 @@ part parent "x128a1"
 #------------------------------------------------------------
 
 part parent "x128a1"
-    id		= "x128a3u";
-    desc	= "ATxmega128A3U";
-    signature	= 0x1e 0x97 0x42;
-    usbpid	= 0x2fe6;
+    desc                   = "ATxmega128A3U";
+    id                     = "x128a3u";
+    signature              = 0x1e 0x97 0x42;
+    usbpid                 = 0x2fe6;
 ;
 
 #------------------------------------------------------------
@@ -15937,56 +11887,56 @@ part parent "x128a1"
 #------------------------------------------------------------
 
 part parent ".xmega"
-    id		= "x128a4";
-    desc	= "ATxmega128A4";
-    signature	= 0x1e 0x97 0x46;
-    has_jtag	= yes;
+    desc                   = "ATxmega128A4";
+    id                     = "x128a4";
+    signature              = 0x1e 0x97 0x46;
+    has_jtag               = yes;
 
     memory "eeprom"
-        size		= 0x800;
-        offset		= 0x8c0000;
-        page_size	= 0x20;
-        readsize	= 0x100;
-    ;
-
-    memory "application"
-        size		= 0x20000;
-        offset		= 0x800000;
-        page_size	= 0x200;
-        readsize	= 0x100;
-    ;
-
-    memory "apptable"
-        size		= 0x1000;
-        offset		= 0x81f000;
-        page_size	= 0x200;
-        readsize	= 0x100;
-    ;
-
-    memory "boot"
-        size		= 0x2000;
-        offset		= 0x820000;
-        page_size	= 0x200;
-        readsize	= 0x100;
+        size               = 2048;
+        page_size          = 32;
+        offset             = 0x8c0000;
+        readsize           = 256;
     ;
 
     memory "flash"
-        size		= 0x22000;
-        offset		= 0x800000;
-        page_size	= 0x200;
-        readsize	= 0x100;
+        size               = 0x22000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 
-    memory "usersig"
-        size		= 0x200;
-        offset		= 0x8e0400;
-        page_size	= 0x200;
-        readsize	= 0x100;
+    memory "application"
+        size               = 0x20000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "apptable"
+        size               = 4096;
+        page_size          = 512;
+        offset             = 0x81f000;
+        readsize           = 256;
+    ;
+
+    memory "boot"
+        size               = 8192;
+        page_size          = 512;
+        offset             = 0x820000;
+        readsize           = 256;
     ;
 
     memory "fuse0"
-        size		= 1;
-        offset		= 0x8f0020;
+        size               = 1;
+        offset             = 0x8f0020;
+    ;
+
+    memory "usersig"
+        size               = 512;
+        page_size          = 512;
+        offset             = 0x8e0400;
+        readsize           = 256;
     ;
 ;
 
@@ -15995,51 +11945,51 @@ part parent ".xmega"
 #------------------------------------------------------------
 
 part parent ".xmega"
-    id		= "x128a4u";
-    desc	= "ATxmega128A4U";
-    signature	= 0x1e 0x97 0x46;
-    usbpid	= 0x2fde;
+    desc                   = "ATxmega128A4U";
+    id                     = "x128a4u";
+    signature              = 0x1e 0x97 0x46;
+    usbpid                 = 0x2fde;
 
     memory "eeprom"
-        size		= 0x800;
-        offset		= 0x8c0000;
-        page_size	= 0x20;
-        readsize	= 0x100;
-    ;
-
-    memory "application"
-        size		= 0x20000;
-        offset		= 0x800000;
-        page_size	= 0x100;
-        readsize	= 0x100;
-    ;
-
-    memory "apptable"
-        size		= 0x1000;
-        offset		= 0x81f000;
-        page_size	= 0x100;
-        readsize	= 0x100;
-    ;
-
-    memory "boot"
-        size		= 0x2000;
-        offset		= 0x820000;
-        page_size	= 0x100;
-        readsize	= 0x100;
+        size               = 2048;
+        page_size          = 32;
+        offset             = 0x8c0000;
+        readsize           = 256;
     ;
 
     memory "flash"
-        size		= 0x22000;
-        offset		= 0x800000;
-        page_size	= 0x100;
-        readsize	= 0x100;
+        size               = 0x22000;
+        page_size          = 256;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "application"
+        size               = 0x20000;
+        page_size          = 256;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "apptable"
+        size               = 4096;
+        page_size          = 256;
+        offset             = 0x81f000;
+        readsize           = 256;
+    ;
+
+    memory "boot"
+        size               = 8192;
+        page_size          = 256;
+        offset             = 0x820000;
+        readsize           = 256;
     ;
 
     memory "usersig"
-        size		= 0x100;
-        offset		= 0x8e0400;
-        page_size	= 0x100;
-        readsize	= 0x100;
+        size               = 256;
+        page_size          = 256;
+        offset             = 0x8e0400;
+        readsize           = 256;
     ;
 ;
 
@@ -16048,57 +11998,57 @@ part parent ".xmega"
 #------------------------------------------------------------
 
 part parent ".xmega"
-    id		= "x128b1";
-    desc	= "ATxmega128B1";
-    signature	= 0x1e 0x97 0x4d;
-    usbpid	= 0x2fea;
-    has_jtag	= yes;
+    desc                   = "ATxmega128B1";
+    id                     = "x128b1";
+    signature              = 0x1e 0x97 0x4d;
+    usbpid                 = 0x2fea;
+    has_jtag               = yes;
 
     memory "eeprom"
-        size		= 0x800;
-        offset		= 0x8c0000;
-        page_size	= 0x20;
-        readsize	= 0x100;
-    ;
-
-    memory "application"
-        size		= 0x20000;
-        offset		= 0x800000;
-        page_size	= 0x100;
-        readsize	= 0x100;
-    ;
-
-    memory "apptable"
-        size		= 0x2000;
-        offset		= 0x81e000;
-        page_size	= 0x100;
-        readsize	= 0x100;
-    ;
-
-    memory "boot"
-        size		= 0x2000;
-        offset		= 0x820000;
-        page_size	= 0x100;
-        readsize	= 0x100;
+        size               = 2048;
+        page_size          = 32;
+        offset             = 0x8c0000;
+        readsize           = 256;
     ;
 
     memory "flash"
-        size		= 0x22000;
-        offset		= 0x800000;
-        page_size	= 0x100;
-        readsize	= 0x100;
+        size               = 0x22000;
+        page_size          = 256;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 
-    memory "usersig"
-        size		= 0x100;
-        offset		= 0x8e0400;
-        page_size	= 0x100;
-        readsize	= 0x100;
+    memory "application"
+        size               = 0x20000;
+        page_size          = 256;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "apptable"
+        size               = 8192;
+        page_size          = 256;
+        offset             = 0x81e000;
+        readsize           = 256;
+    ;
+
+    memory "boot"
+        size               = 8192;
+        page_size          = 256;
+        offset             = 0x820000;
+        readsize           = 256;
     ;
 
     memory "fuse0"
-        size		= 1;
-        offset		= 0x8f0020;
+        size               = 1;
+        offset             = 0x8f0020;
+    ;
+
+    memory "usersig"
+        size               = 256;
+        page_size          = 256;
+        offset             = 0x8e0400;
+        readsize           = 256;
     ;
 ;
 
@@ -16107,10 +12057,10 @@ part parent ".xmega"
 #------------------------------------------------------------
 
 part parent "x128b1"
-    id		= "x128b3";
-    desc	= "ATxmega128B3";
-    signature	= 0x1e 0x97 0x4b;
-    usbpid	= 0x2fe0;
+    desc                   = "ATxmega128B3";
+    id                     = "x128b3";
+    signature              = 0x1e 0x97 0x4b;
+    usbpid                 = 0x2fe0;
 ;
 
 #------------------------------------------------------------
@@ -16118,51 +12068,51 @@ part parent "x128b1"
 #------------------------------------------------------------
 
 part parent ".xmega"
-    id		= "x192c3";
-    desc	= "ATxmega192C3";
-    signature	= 0x1e 0x97 0x51;
-    # usbpid	= 0x2f??;
+    desc                   = "ATxmega192C3";
+    id                     = "x192c3";
+    signature              = 0x1e 0x97 0x51;
+#   usbpid                 = 0x2f??;
 
     memory "eeprom"
-        size		= 0x800;
-        offset		= 0x8c0000;
-        page_size	= 0x20;
-        readsize	= 0x100;
-    ;
-
-    memory "application"
-        size		= 0x30000;
-        offset		= 0x800000;
-        page_size	= 0x200;
-        readsize	= 0x100;
-    ;
-
-    memory "apptable"
-        size		= 0x2000;
-        offset		= 0x82e000;
-        page_size	= 0x200;
-        readsize	= 0x100;
-    ;
-
-    memory "boot"
-        size		= 0x2000;
-        offset		= 0x830000;
-        page_size	= 0x200;
-        readsize	= 0x100;
+        size               = 2048;
+        page_size          = 32;
+        offset             = 0x8c0000;
+        readsize           = 256;
     ;
 
     memory "flash"
-        size		= 0x32000;
-        offset		= 0x800000;
-        page_size	= 0x200;
-        readsize	= 0x100;
+        size               = 0x32000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "application"
+        size               = 0x30000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "apptable"
+        size               = 8192;
+        page_size          = 512;
+        offset             = 0x82e000;
+        readsize           = 256;
+    ;
+
+    memory "boot"
+        size               = 8192;
+        page_size          = 512;
+        offset             = 0x830000;
+        readsize           = 256;
     ;
 
     memory "usersig"
-        size		= 0x200;
-        offset		= 0x8e0400;
-        page_size	= 0x200;
-        readsize	= 0x100;
+        size               = 512;
+        page_size          = 512;
+        offset             = 0x8e0400;
+        readsize           = 256;
     ;
 ;
 
@@ -16171,9 +12121,9 @@ part parent ".xmega"
 #------------------------------------------------------------
 
 part parent "x192c3"
-    id		= "x192d3";
-    desc	= "ATxmega192D3";
-    signature	= 0x1e 0x97 0x49;
+    desc                   = "ATxmega192D3";
+    id                     = "x192d3";
+    signature              = 0x1e 0x97 0x49;
 ;
 
 #------------------------------------------------------------
@@ -16181,14 +12131,14 @@ part parent "x192c3"
 #------------------------------------------------------------
 
 part parent "x192c3"
-    id		= "x192a1";
-    desc	= "ATxmega192A1";
-    signature	= 0x1e 0x97 0x4e;
-    has_jtag	= yes;
+    desc                   = "ATxmega192A1";
+    id                     = "x192a1";
+    signature              = 0x1e 0x97 0x4e;
+    has_jtag               = yes;
 
     memory "fuse0"
-        size		= 1;
-        offset		= 0x8f0020;
+        size               = 1;
+        offset             = 0x8f0020;
     ;
 ;
 
@@ -16197,9 +12147,9 @@ part parent "x192c3"
 #------------------------------------------------------------
 
 part parent "x192a1"
-    id		= "x192a3";
-    desc	= "ATxmega192A3";
-    signature	= 0x1e 0x97 0x44;
+    desc                   = "ATxmega192A3";
+    id                     = "x192a3";
+    signature              = 0x1e 0x97 0x44;
 ;
 
 #------------------------------------------------------------
@@ -16207,10 +12157,10 @@ part parent "x192a1"
 #------------------------------------------------------------
 
 part parent "x192a1"
-    id		= "x192a3u";
-    desc	= "ATxmega192A3U";
-    signature	= 0x1e 0x97 0x44;
-    usbpid	= 0x2fe7;
+    desc                   = "ATxmega192A3U";
+    id                     = "x192a3u";
+    signature              = 0x1e 0x97 0x44;
+    usbpid                 = 0x2fe7;
 ;
 
 #------------------------------------------------------------
@@ -16218,51 +12168,51 @@ part parent "x192a1"
 #------------------------------------------------------------
 
 part parent ".xmega"
-    id		= "x256c3";
-    desc	= "ATxmega256C3";
-    signature	= 0x1e 0x98 0x46;
-    usbpid	= 0x2fda;
+    desc                   = "ATxmega256C3";
+    id                     = "x256c3";
+    signature              = 0x1e 0x98 0x46;
+    usbpid                 = 0x2fda;
 
     memory "eeprom"
-        size		= 0x1000;
-        offset		= 0x8c0000;
-        page_size	= 0x20;
-        readsize	= 0x100;
-    ;
-
-    memory "application"
-        size		= 0x40000;
-        offset		= 0x800000;
-        page_size	= 0x200;
-        readsize	= 0x100;
-    ;
-
-    memory "apptable"
-        size		= 0x2000;
-        offset		= 0x83e000;
-        page_size	= 0x200;
-        readsize	= 0x100;
-    ;
-
-    memory "boot"
-        size		= 0x2000;
-        offset		= 0x840000;
-        page_size	= 0x200;
-        readsize	= 0x100;
+        size               = 4096;
+        page_size          = 32;
+        offset             = 0x8c0000;
+        readsize           = 256;
     ;
 
     memory "flash"
-        size		= 0x42000;
-        offset		= 0x800000;
-        page_size	= 0x200;
-        readsize	= 0x100;
+        size               = 0x42000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "application"
+        size               = 0x40000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "apptable"
+        size               = 8192;
+        page_size          = 512;
+        offset             = 0x83e000;
+        readsize           = 256;
+    ;
+
+    memory "boot"
+        size               = 8192;
+        page_size          = 512;
+        offset             = 0x840000;
+        readsize           = 256;
     ;
 
     memory "usersig"
-        size		= 0x200;
-        offset		= 0x8e0400;
-        page_size	= 0x200;
-        readsize	= 0x100;
+        size               = 512;
+        page_size          = 512;
+        offset             = 0x8e0400;
+        readsize           = 256;
     ;
 ;
 
@@ -16271,9 +12221,9 @@ part parent ".xmega"
 #------------------------------------------------------------
 
 part parent "x256c3"
-    id		= "x256d3";
-    desc	= "ATxmega256D3";
-    signature	= 0x1e 0x98 0x44;
+    desc                   = "ATxmega256D3";
+    id                     = "x256d3";
+    signature              = 0x1e 0x98 0x44;
 ;
 
 #------------------------------------------------------------
@@ -16281,14 +12231,13 @@ part parent "x256c3"
 #------------------------------------------------------------
 
 part parent "x256c3"
-    id		= "x256a1";
-    desc	= "ATxmega256A1";
-    signature	= 0x1e 0x98 0x46;
-    has_jtag	= yes;
+    desc                   = "ATxmega256A1";
+    id                     = "x256a1";
+    has_jtag               = yes;
 
     memory "fuse0"
-        size		= 1;
-        offset		= 0x8f0020;
+        size               = 1;
+        offset             = 0x8f0020;
     ;
 ;
 
@@ -16297,9 +12246,9 @@ part parent "x256c3"
 #------------------------------------------------------------
 
 part parent "x256a1"
-    id		= "x256a3";
-    desc	= "ATxmega256A3";
-    signature	= 0x1e 0x98 0x42;
+    desc                   = "ATxmega256A3";
+    id                     = "x256a3";
+    signature              = 0x1e 0x98 0x42;
 ;
 
 #------------------------------------------------------------
@@ -16307,10 +12256,10 @@ part parent "x256a1"
 #------------------------------------------------------------
 
 part parent "x256a1"
-    id		= "x256a3u";
-    desc	= "ATxmega256A3U";
-    signature	= 0x1e 0x98 0x42;
-    usbpid	= 0x2fec;
+    desc                   = "ATxmega256A3U";
+    id                     = "x256a3u";
+    signature              = 0x1e 0x98 0x42;
+    usbpid                 = 0x2fec;
 ;
 
 #------------------------------------------------------------
@@ -16318,9 +12267,9 @@ part parent "x256a1"
 #------------------------------------------------------------
 
 part parent "x256a1"
-    id		= "x256a3b";
-    desc	= "ATxmega256A3B";
-    signature	= 0x1e 0x98 0x43;
+    desc                   = "ATxmega256A3B";
+    id                     = "x256a3b";
+    signature              = 0x1e 0x98 0x43;
 ;
 
 #------------------------------------------------------------
@@ -16328,10 +12277,10 @@ part parent "x256a1"
 #------------------------------------------------------------
 
 part parent "x256a1"
-    id		= "x256a3bu";
-    desc	= "ATxmega256A3BU";
-    signature	= 0x1e 0x98 0x43;
-    usbpid	= 0x2fe2;
+    desc                   = "ATxmega256A3BU";
+    id                     = "x256a3bu";
+    signature              = 0x1e 0x98 0x43;
+    usbpid                 = 0x2fe2;
 ;
 
 #------------------------------------------------------------
@@ -16339,51 +12288,51 @@ part parent "x256a1"
 #------------------------------------------------------------
 
 part parent ".xmega"
-    id		= "x384c3";
-    desc	= "ATxmega384C3";
-    signature	= 0x1e 0x98 0x45;
-    usbpid	= 0x2fdb;
+    desc                   = "ATxmega384C3";
+    id                     = "x384c3";
+    signature              = 0x1e 0x98 0x45;
+    usbpid                 = 0x2fdb;
 
     memory "eeprom"
-        size		= 0x1000;
-        offset		= 0x8c0000;
-        page_size	= 0x20;
-        readsize	= 0x100;
-    ;
-
-    memory "application"
-        size		= 0x60000;
-        offset		= 0x800000;
-        page_size	= 0x200;
-        readsize	= 0x100;
-    ;
-
-    memory "apptable"
-        size		= 0x2000;
-        offset		= 0x85e000;
-        page_size	= 0x200;
-        readsize	= 0x100;
-    ;
-
-    memory "boot"
-        size		= 0x2000;
-        offset		= 0x860000;
-        page_size	= 0x200;
-        readsize	= 0x100;
+        size               = 4096;
+        page_size          = 32;
+        offset             = 0x8c0000;
+        readsize           = 256;
     ;
 
     memory "flash"
-        size		= 0x62000;
-        offset		= 0x800000;
-        page_size	= 0x200;
-        readsize	= 0x100;
+        size               = 0x62000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "application"
+        size               = 0x60000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "apptable"
+        size               = 8192;
+        page_size          = 512;
+        offset             = 0x85e000;
+        readsize           = 256;
+    ;
+
+    memory "boot"
+        size               = 8192;
+        page_size          = 512;
+        offset             = 0x860000;
+        readsize           = 256;
     ;
 
     memory "usersig"
-        size		= 0x200;
-        offset		= 0x8e0400;
-        page_size	= 0x200;
-        readsize	= 0x100;
+        size               = 512;
+        page_size          = 512;
+        offset             = 0x8e0400;
+        readsize           = 256;
     ;
 ;
 
@@ -16392,9 +12341,9 @@ part parent ".xmega"
 #------------------------------------------------------------
 
 part parent "x384c3"
-    id		= "x384d3";
-    desc	= "ATxmega384D3";
-    signature	= 0x1e 0x98 0x47;
+    desc                   = "ATxmega384D3";
+    id                     = "x384d3";
+    signature              = 0x1e 0x98 0x47;
 ;
 
 #------------------------------------------------------------
@@ -16402,50 +12351,50 @@ part parent "x384c3"
 #------------------------------------------------------------
 
 part parent ".xmega"
-    id		= "x8e5";
-    desc	= "ATxmega8E5";
-    signature	= 0x1e 0x93 0x41;
+    desc                   = "ATxmega8E5";
+    id                     = "x8e5";
+    signature              = 0x1e 0x93 0x41;
 
     memory "eeprom"
-        size		= 0x0200;
-        offset		= 0x08c0000;
-        page_size	= 0x20;
-        readsize	= 0x100;
-    ;
-
-    memory "application"
-        size		= 0x2000;
-        offset		= 0x0800000;
-        page_size	= 0x80;
-        readsize	= 0x100;
-    ;
-
-    memory "apptable"
-        size		= 0x800;
-        offset		= 0x00801800;
-        page_size	= 0x80;
-        readsize	= 0x100;
-    ;
-
-    memory "boot"
-        size		= 0x800;
-        offset		= 0x00802000;
-        page_size	= 0x80;
-        readsize	= 0x100;
+        size               = 512;
+        page_size          = 32;
+        offset             = 0x8c0000;
+        readsize           = 256;
     ;
 
     memory "flash"
-        size		= 0x2800;
-        offset		= 0x0800000;
-        page_size	= 0x80;
-        readsize	= 0x100;
+        size               = 0x2800;
+        page_size          = 128;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "application"
+        size               = 8192;
+        page_size          = 128;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "apptable"
+        size               = 2048;
+        page_size          = 128;
+        offset             = 0x801800;
+        readsize           = 256;
+    ;
+
+    memory "boot"
+        size               = 2048;
+        page_size          = 128;
+        offset             = 0x802000;
+        readsize           = 256;
     ;
 
     memory "usersig"
-        size            = 0x80;
-        offset          = 0x8e0400;
-        page_size       = 0x80;
-        readsize	= 0x100;
+        size               = 128;
+        page_size          = 128;
+        offset             = 0x8e0400;
+        readsize           = 256;
     ;
 ;
 
@@ -16454,50 +12403,50 @@ part parent ".xmega"
 #------------------------------------------------------------
 
 part parent ".xmega"
-    id		= "x16e5";
-    desc	= "ATxmega16E5";
-    signature	= 0x1e 0x94 0x45;
+    desc                   = "ATxmega16E5";
+    id                     = "x16e5";
+    signature              = 0x1e 0x94 0x45;
 
     memory "eeprom"
-        size		= 0x0200;
-        offset		= 0x08c0000;
-        page_size	= 0x20;
-        readsize	= 0x100;
-    ;
-
-    memory "application"
-        size		= 0x4000;
-        offset		= 0x0800000;
-        page_size	= 0x80;
-        readsize	= 0x100;
-    ;
-
-    memory "apptable"
-        size		= 0x1000;
-        offset		= 0x00803000;
-        page_size	= 0x80;
-        readsize	= 0x100;
-    ;
-
-    memory "boot"
-        size		= 0x1000;
-        offset		= 0x00804000;
-        page_size	= 0x80;
-        readsize	= 0x100;
+        size               = 512;
+        page_size          = 32;
+        offset             = 0x8c0000;
+        readsize           = 256;
     ;
 
     memory "flash"
-        size		= 0x5000;
-        offset		= 0x0800000;
-        page_size	= 0x80;
-        readsize	= 0x100;
+        size               = 0x5000;
+        page_size          = 128;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "application"
+        size               = 0x4000;
+        page_size          = 128;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "apptable"
+        size               = 4096;
+        page_size          = 128;
+        offset             = 0x803000;
+        readsize           = 256;
+    ;
+
+    memory "boot"
+        size               = 4096;
+        page_size          = 128;
+        offset             = 0x804000;
+        readsize           = 256;
     ;
 
     memory "usersig"
-        size            = 0x80;
-        offset          = 0x8e0400;
-        page_size       = 0x80;
-        readsize	= 0x100;
+        size               = 128;
+        page_size          = 128;
+        offset             = 0x8e0400;
+        readsize           = 256;
     ;
 ;
 
@@ -16506,50 +12455,50 @@ part parent ".xmega"
 #------------------------------------------------------------
 
 part parent ".xmega"
-    id		= "x32e5";
-    desc	= "ATxmega32E5";
-    signature	= 0x1e 0x95 0x4c;
+    desc                   = "ATxmega32E5";
+    id                     = "x32e5";
+    signature              = 0x1e 0x95 0x4c;
 
     memory "eeprom"
-        size		= 0x0400;
-        offset		= 0x08c0000;
-        page_size	= 0x20;
-        readsize	= 0x100;
-    ;
-
-    memory "application"
-        size		= 0x8000;
-        offset		= 0x0800000;
-        page_size	= 0x80;
-        readsize	= 0x100;
-    ;
-
-    memory "apptable"
-        size		= 0x1000;
-        offset		= 0x00807000;
-        page_size	= 0x80;
-        readsize	= 0x100;
-    ;
-
-    memory "boot"
-        size		= 0x1000;
-        offset		= 0x00808000;
-        page_size	= 0x80;
-        readsize	= 0x100;
+        size               = 1024;
+        page_size          = 32;
+        offset             = 0x8c0000;
+        readsize           = 256;
     ;
 
     memory "flash"
-        size		= 0x9000;
-        offset		= 0x0800000;
-        page_size	= 0x80;
-        readsize	= 0x100;
+        size               = 0x9000;
+        page_size          = 128;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "application"
+        size               = 0x8000;
+        page_size          = 128;
+        offset             = 0x800000;
+        readsize           = 256;
+    ;
+
+    memory "apptable"
+        size               = 4096;
+        page_size          = 128;
+        offset             = 0x807000;
+        readsize           = 256;
+    ;
+
+    memory "boot"
+        size               = 4096;
+        page_size          = 128;
+        offset             = 0x808000;
+        readsize           = 256;
     ;
 
     memory "usersig"
-        size            = 0x80;
-        offset          = 0x8e0400;
-        page_size       = 0x80;
-        readsize	= 0x100;
+        size               = 128;
+        page_size          = 128;
+        offset             = 0x8e0400;
+        readsize           = 256;
     ;
 ;
 
@@ -16558,25 +12507,29 @@ part parent ".xmega"
 #------------------------------------------------------------
 
 part
-    id		= "uc3a0512";
-    desc	= "AT32UC3A0512";
-    signature	= 0xED 0xC0 0x3F;
-    has_jtag	= yes;
-    is_avr32	= yes;
+    desc                   = "AT32UC3A0512";
+    id                     = "uc3a0512";
+    signature              = 0xed 0xc0 0x3f;
+    has_jtag               = yes;
+    is_avr32               = yes;
 
     memory "flash"
-        paged           = yes;
-        page_size       = 512;           # bytes
-        readsize        = 512;           # bytes
-        num_pages       = 1024;          # could be set dynamicly
-        size            = 0x00080000;    # could be set dynamicly
-        offset          = 0x80000000;
+        paged              = yes;
+        size               = 0x80000;    # could be set dynamicly
+        page_size          = 512;           # bytes
+        num_pages          = 1024;          # could be set dynamicly
+        offset             = 0x80000000;
+        readsize           = 512;           # bytes
     ;
 ;
 
+#------------------------------------------------------------
+# deprecated, use 'uc3a0512'
+#------------------------------------------------------------
+
 part parent "uc3a0512"
-    id		= "ucr2";
-    desc	= "deprecated, use 'uc3a0512'";
+    desc                   = "deprecated, use 'uc3a0512'";
+    id                     = "ucr2";
 ;
 
 #------------------------------------------------------------
@@ -16584,188 +12537,123 @@ part parent "uc3a0512"
 #------------------------------------------------------------
 
 part
-    id              = "t1634";
-    desc            = "ATtiny1634";
-     has_debugwire = yes;
-     flash_instr   = 0xB6, 0x01, 0x11;
-     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
-                0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
-                0x99, 0xF9, 0xBB, 0xAF;
-    stk500_devcode  = 0x86;
-    # avr910_devcode = 0x;
-    signature       = 0x1e 0x94 0x12;
-    pagel           = 0xB3;
-    bs2             = 0xB1;
-    reset	    = io;
-    chip_erase_delay = 9000;
-    pgm_enable       = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
-                       "x x x x x x x x x x x x x x x x";
-
-    chip_erase       = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
-                       "x x x x x x x x x x x x x x x x";
-
-    timeout         = 200;
-    stabdelay       = 100;
-    cmdexedelay     = 25;
-    synchloops      = 32;
-    bytedelay       = 0;
-    pollindex       = 3;
-    pollvalue       = 0x53;
-    predelay        = 1;
-    postdelay       = 1;
-    pollmethod      = 1;
-
-    pp_controlstack     =
-        0x0E, 0x1E, 0x0E, 0x1E, 0x2E, 0x3E, 0x2E, 0x3E,
-        0x4E, 0x5E, 0x4E, 0x5E, 0x6E, 0x7E, 0x6E, 0x7E,
-        0x26, 0x36, 0x66, 0x76, 0x2A, 0x3A, 0x6A, 0x7A,
-        0x2E, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-    hventerstabdelay    = 100;
-    progmodedelay       = 0;
-    latchcycles         = 0;
-    togglevtg           = 1;
-    poweroffdelay       = 15;
-    resetdelayms        = 1;
-    resetdelayus        = 0;
-    hvleavestabdelay    = 15;
-    resetdelay          = 15;
-    chiperasepulsewidth = 0;
-    chiperasepolltimeout = 10;
-    programfusepulsewidth = 0;
+    desc                   = "ATtiny1634";
+    id                     = "t1634";
+    stk500_devcode         = 0x86;
+    chip_erase_delay       = 9000;
+    pagel                  = 0xb3;
+    bs2                    = 0xb1;
+#   avr910_devcode         = 0x??;
+    signature              = 0x1e 0x94 0x12;
+    reset                  = io;
+    has_debugwire          = yes;
+    timeout                = 200;
+    stabdelay              = 100;
+    cmdexedelay            = 25;
+    synchloops             = 32;
+    pollindex              = 3;
+    pollvalue              = 0x53;
+    predelay               = 1;
+    postdelay              = 1;
+    pollmethod             = 1;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0e, 0x1e, 0x2e, 0x3e, 0x2e, 0x3e,
+        0x4e, 0x5e, 0x4e, 0x5e, 0x6e, 0x7e, 0x6e, 0x7e,
+        0x26, 0x36, 0x66, 0x76, 0x2a, 0x3a, 0x6a, 0x7a,
+        0x2e, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    flash_instr            =  0xb6, 0x01, 0x11;
+    eeprom_instr           =
+        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
+        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
+        0x99, 0xf9, 0xbb, 0xaf;
+    hventerstabdelay       = 100;
+    togglevtg              = 1;
+    poweroffdelay          = 15;
+    resetdelayms           = 1;
+    hvleavestabdelay       = 15;
+    resetdelay             = 15;
+    chiperasepolltimeout   = 10;
     programfusepolltimeout = 5;
-    programlockpulsewidth = 0;
     programlockpolltimeout = 5;
+    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
+    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";
 
     memory "eeprom"
-        paged           = no;
-        page_size       = 4;
-        size            = 256;
-        min_write_delay = 3600;
-        max_write_delay = 3600;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read            = " 1 0 1 0 0 0 0 0",
-                          " 0 0 0 x x x x a8",
-                          " a7 a6 a5 a4 a3 a2 a1 a0",
-                          " o o o o o o o o";
-
-        write           = " 1 1 0 0 0 0 0 0",
-                          " 0 0 0 x x x x a8",
-                          " a7 a6 a5 a4 a3 a2 a1 a0",
-                          " i i i i i i i i";
-
-   loadpage_lo   = "  1   1   0   0      0   0   0   1",
-           "  0   0   0   0      0   0   0   0",
-           "  0   0   0   0      0   0  a1  a0",
-           "  i   i   i   i      i   i   i   i";
-
-   writepage   = "  1   1   0   0      0   0   1   0",
-           "  0   0   x   x      x   x   x  a8",
-           " a7  a6  a5  a4     a3  a2   0   0",
-           "  x   x   x   x      x   x   x   x";
-
-   mode      = 0x41;
-   delay      = 5;
-   blocksize   = 4;
-   readsize   = 256;
-        ;
+        size               = 256;
+        page_size          = 4;
+        min_write_delay    = 3600;
+        max_write_delay    = 3600;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 5;
+        blocksize          = 4;
+        readsize           = 256;
+        read               = "1010.0000--000x.xxxa--aaaa.aaaa--oooo.oooo";
+        write              = "1100.0000--000x.xxxa--aaaa.aaaa--iiii.iiii";
+        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
+        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
+    ;
 
     memory "flash"
-        paged           = yes;
-        size            = 16384;
-        page_size       = 32;
-        num_pages       = 512;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        readback_p1     = 0xff;
-        readback_p2     = 0xff;
-        read_lo         = " 0 0 1 0 0 0 0 0",
-                          " 0 0 a13 a12 a11 a10 a9 a8",
-                          " a7 a6 a5 a4 a3 a2 a1 a0",
-                          " o o o o o o o o";
-
-        read_hi          = " 0 0 1 0 1 0 0 0",
-                           " 0 0 a13 a12 a11 a10 a9 a8",
-                           " a7 a6 a5 a4 a3 a2 a1 a0",
-                           " o o o o o o o o";
-
-        loadpage_lo     = " 0 1 0 0 0 0 0 0",
-                          " 0 0 0 x x x x x",
-                          " x x x x a3 a2 a1 a0",
-                          " i i i i i i i i";
-
-        loadpage_hi     = " 0 1 0 0 1 0 0 0",
-                          " 0 0 0 x x x x x",
-                          " x x x x a3 a2 a1 a0",
-                          " i i i i i i i i";
-
-        writepage       = " 0 1 0 0 1 1 0 0",
-                          " 0 0 a13 a12 a11 a10 a9 a8",
-                          " a7 a6 a5 a4 x x x x",
-                          " x x x x x x x x";
-
-        mode        = 0x41;
-        delay       = 6;
-        blocksize   = 128;
-        readsize    = 256;
-
-        ;
+        paged              = yes;
+        size               = 0x4000;
+        page_size          = 32;
+        num_pages          = 512;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        readback           = 0xff 0xff;
+        mode               = 65;
+        delay              = 6;
+        blocksize          = 128;
+        readsize           = 256;
+        read_lo            = "0010.0000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
+        read_hi            = "0010.1000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
+        loadpage_lo        = "0100.0000--000x.xxxx--xxxx.aaaa--iiii.iiii";
+        loadpage_hi        = "0100.1000--000x.xxxx--xxxx.aaaa--iiii.iiii";
+        writepage          = "0100.1100--00aa.aaaa--aaaa.xxxx--xxxx.xxxx";
+    ;
 
     memory "lfuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
-                          "x x x x x x x x o o o o o o o o";
-
-        write           = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
-                          "x x x x x x x x i i i i i i i i";
-        ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "hfuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
-                          "x x x x x x x x o o o o o o o o";
-
-        write           = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
-                          "x x x x x x x x i i i i i i i i";
-        ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
+    ;
 
     memory "efuse"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
-                          "x x x x x x x x o o o o o o o o";
-
-        write           = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
-                          "x x x x x x x x x x x i i i i i";
-        ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxi.iiii";
+    ;
 
     memory "lock"
-        size            = 1;
-        min_write_delay = 4500;
-        max_write_delay = 4500;
-        read            = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
-                          "x x x x x x x x o o o o o o o o";
-
-        write           = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
-                          "x x x x x x x x 1 1 1 1 1 1 i i";
-        ;
-
-    memory "calibration"
-        size            = 1;
-        read            = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
-                          "0 0 0 0 0 0 0 0 o o o o o o o o";
-        ;
+        size               = 1;
+        min_write_delay    = 4500;
+        max_write_delay    = 4500;
+        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
+        write              = "1010.1100--111x.xxxx--xxxx.xxxx--1111.11ii";
+    ;
 
     memory "signature"
-        size            = 3;
-        read            = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
-                          "x x x x x x a1 a0 o o o o o o o o";
-        ;
+        size               = 3;
+        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
+    ;
+
+    memory "calibration"
+        size               = 1;
+        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
+    ;
 ;
 
 #------------------------------------------------------------
@@ -16773,42 +12661,48 @@ part
 #------------------------------------------------------------
 
 part parent "t1634"
-    id              = "t1634r";
-    desc            = "ATtiny1634R";
-  ;
+    desc                   = "ATtiny1634R";
+    id                     = "t1634r";
+;
 
 #------------------------------------------------------------
 # Common values for reduced core tinys (4/5/9/10/20/40)
 #------------------------------------------------------------
 
 part
-    id		= ".reduced_core_tiny";
-    desc	= "Common values for reduced core tinys";
-    has_tpi	= yes;
-
-    memory "signature"
-        size		= 3;
-        offset		= 0x3fc0;
-        page_size	= 16;
-    ;
+    desc                   = "Common values for reduced core tinys";
+    id                     = ".reduced_core_tiny";
+    has_tpi                = yes;
 
     memory "fuse"
-        size		= 1;
-        offset		= 0x3f40;
-        page_size	= 16;
-	blocksize	= 4;
-    ;
-
-    memory "calibration"
-        size		= 1;
-        offset		= 0x3f80;
-        page_size	= 16;
+        size               = 1;
+        page_size          = 16;
+        offset             = 0x3f40;
+        blocksize          = 4;
     ;
 
     memory "lockbits"
-        size		= 1;
-        offset		= 0x3f00;
-        page_size	= 16;
+        size               = 1;
+        page_size          = 16;
+        offset             = 0x3f00;
+    ;
+
+    memory "lockbits"
+        size               = 1;
+        page_size          = 16;
+        offset             = 0x3f00;
+    ;
+
+    memory "signature"
+        size               = 3;
+        page_size          = 16;
+        offset             = 0x3fc0;
+    ;
+
+    memory "calibration"
+        size               = 1;
+        page_size          = 16;
+        offset             = 0x3f80;
     ;
 ;
 
@@ -16817,15 +12711,15 @@ part
 #------------------------------------------------------------
 
 part parent ".reduced_core_tiny"
-    id		= "t4";
-    desc	= "ATtiny4";
-    signature	= 0x1e 0x8f 0x0a;
+    desc                   = "ATtiny4";
+    id                     = "t4";
+    signature              = 0x1e 0x8f 0x0a;
 
     memory "flash"
-        size		= 512;
-        offset		= 0x4000;
-        page_size	= 16;
-        blocksize	= 128;
+        size               = 512;
+        page_size          = 16;
+        offset             = 0x4000;
+        blocksize          = 128;
     ;
 ;
 
@@ -16834,9 +12728,9 @@ part parent ".reduced_core_tiny"
 #------------------------------------------------------------
 
 part parent "t4"
-    id		= "t5";
-    desc	= "ATtiny5";
-    signature	= 0x1e 0x8f 0x09;
+    desc                   = "ATtiny5";
+    id                     = "t5";
+    signature              = 0x1e 0x8f 0x09;
 ;
 
 #------------------------------------------------------------
@@ -16844,15 +12738,15 @@ part parent "t4"
 #------------------------------------------------------------
 
 part parent ".reduced_core_tiny"
-    id		= "t9";
-    desc	= "ATtiny9";
-    signature	= 0x1e 0x90 0x08;
+    desc                   = "ATtiny9";
+    id                     = "t9";
+    signature              = 0x1e 0x90 0x08;
 
     memory "flash"
-        size		= 1024;
-        offset		= 0x4000;
-        page_size	= 16;
-        blocksize	= 128;
+        size               = 1024;
+        page_size          = 16;
+        offset             = 0x4000;
+        blocksize          = 128;
     ;
 ;
 
@@ -16861,9 +12755,9 @@ part parent ".reduced_core_tiny"
 #------------------------------------------------------------
 
 part parent "t9"
-    id		= "t10";
-    desc	= "ATtiny10";
-    signature	= 0x1e 0x90 0x03;
+    desc                   = "ATtiny10";
+    id                     = "t10";
+    signature              = 0x1e 0x90 0x03;
 ;
 
 #------------------------------------------------------------
@@ -16871,15 +12765,15 @@ part parent "t9"
 #------------------------------------------------------------
 
 part parent ".reduced_core_tiny"
-    id          = "t20";
-    desc        = "ATtiny20";
-    signature   = 0x1e 0x91 0x0F;
+    desc                   = "ATtiny20";
+    id                     = "t20";
+    signature              = 0x1e 0x91 0x0f;
 
     memory "flash"
-        size            = 2048;
-        offset          = 0x4000;
-        page_size       = 16;
-        blocksize       = 128;
+        size               = 2048;
+        page_size          = 16;
+        offset             = 0x4000;
+        blocksize          = 128;
     ;
 ;
 
@@ -16888,15 +12782,15 @@ part parent ".reduced_core_tiny"
 #------------------------------------------------------------
 
 part parent ".reduced_core_tiny"
-    id		= "t40";
-    desc	= "ATtiny40";
-    signature	= 0x1e 0x92 0x0E;
+    desc                   = "ATtiny40";
+    id                     = "t40";
+    signature              = 0x1e 0x92 0x0e;
 
     memory "flash"
-        size		= 4096;
-        offset		= 0x4000;
-        page_size	= 64;
-        blocksize	= 128;
+        size               = 4096;
+        page_size          = 64;
+        offset             = 0x4000;
+        blocksize          = 128;
     ;
 ;
 
@@ -16905,15 +12799,15 @@ part parent ".reduced_core_tiny"
 #------------------------------------------------------------
 
 part parent ".reduced_core_tiny"
-    id    = "t102";
-    desc  = "ATtiny102";
-    signature = 0x1e 0x90 0x0C;
+    desc                   = "ATtiny102";
+    id                     = "t102";
+    signature              = 0x1e 0x90 0x0c;
 
     memory "flash"
-        size    = 1024;
-        offset    = 0x4000;
-        page_size = 16;
-        blocksize = 128;
+        size               = 1024;
+        page_size          = 16;
+        offset             = 0x4000;
+        blocksize          = 128;
     ;
 ;
 
@@ -16922,15 +12816,15 @@ part parent ".reduced_core_tiny"
 #------------------------------------------------------------
 
 part parent ".reduced_core_tiny"
-    id    = "t104";
-    desc  = "ATtiny104";
-    signature = 0x1e 0x90 0x0B;
+    desc                   = "ATtiny104";
+    id                     = "t104";
+    signature              = 0x1e 0x90 0x0b;
 
     memory "flash"
-        size    = 1024;
-        offset    = 0x4000;
-        page_size = 16;
-        blocksize = 128;
+        size               = 1024;
+        page_size          = 16;
+        offset             = 0x4000;
+        blocksize          = 128;
     ;
 ;
 
@@ -16939,63 +12833,60 @@ part parent ".reduced_core_tiny"
 #------------------------------------------------------------
 
 part
-    id				= "m406";
-    desc			= "ATmega406";
-    has_jtag			= yes;
-    signature			= 0x1e 0x95 0x07;
-
+    desc                   = "ATmega406";
+    id                     = "m406";
     # STK500 parameters (parallel programming IO lines)
-    pagel			= 0xa7;
-    bs2				= 0xa0;
-    serial			= no;
-    parallel			= yes;
-
+    pagel                  = 0xa7;
+    bs2                    = 0xa0;
+    signature              = 0x1e 0x95 0x07;
+    reset                  = io;
+    has_jtag               = yes;
+    serial                 = no;
     # STK500v2 HV programming parameters, from XML
-    pp_controlstack		= 0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
-				  0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
-				  0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
-				  0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
-
-    # JTAG ICE mkII parameters, also from XML files
-    allowfullpagebitstream	= no;
-    enablepageprogramming	= yes;
-    idr				= 0x51;
-    rampz			= 0x00;
-    spmcr			= 0x57;
-    eecr			= 0x3f;
+    pp_controlstack        =
+        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+    idr                    = 0x51;
+    spmcr                  = 0x57;
+    eecr                   = 0x3f;
 
     memory "eeprom"
-        paged		= no;
-        size		= 512;
-        page_size	= 4;
-        blocksize	= 4;
-	readsize	= 4;
-        num_pages	= 128;
+        size               = 512;
+        page_size          = 4;
+        num_pages          = 128;
+        blocksize          = 4;
+        readsize           = 4;
     ;
 
     memory "flash"
-        paged		= yes;
-        size		= 40960;
-        page_size	= 128;
-        blocksize	= 128;
-	readsize	= 128;
-        num_pages	= 320;
-    ;
-
-    memory "hfuse"
-        size            = 1;
+        paged              = yes;
+        size               = 0xa000;
+        page_size          = 128;
+        num_pages          = 320;
+        blocksize          = 128;
+        readsize           = 128;
     ;
 
     memory "lfuse"
-        size            = 1;
+        size               = 1;
+    ;
+
+    memory "hfuse"
+        size               = 1;
     ;
 
     memory "lockbits"
-        size		= 1;
+        size               = 1;
+    ;
+
+    memory "lockbits"
+        size               = 1;
     ;
 
     memory "signature"
-        size            = 3;
+        size               = 3;
     ;
 ;
 
@@ -17004,72 +12895,16 @@ part
 #------------------------------------------------------------
 
 part
-    id		= ".avr8x";
-    desc	= "AVR8X family common values";
-    has_updi	= yes;
-    nvm_base	= 0x1000;
-    ocd_base	= 0x0F80;
-
-    memory "signature"
-        size		= 3;
-        offset		= 0x1100;
-        readsize	= 0x3;
-    ;
-
-    memory "prodsig"
-        size		= 0x3D;
-        offset		= 0x1103;
-        page_size	= 0x3D;
-        readsize	= 0x3D;
-    ;
-
-    memory "sernum"
-        size		= 10;
-        offset		= 0x1104;
-        readsize	= 1;
-    ;
-
-    memory "osccal16"
-        size		= 2;
-        offset		= 0x1118;
-        readsize	= 1;
-    ;
-
-    memory "osccal20"
-        size		= 2;
-        offset		= 0x111A;
-        readsize	= 1;
-    ;
-
-    memory "tempsense"
-        size		= 2;
-        offset		= 0x1120;
-        readsize	= 1;
-    ;
-
-    memory "osc16err"
-        size		= 2;
-        offset		= 0x1122;
-        readsize	= 1;
-    ;
-
-    memory "osc20err"
-        size		= 2;
-        offset		= 0x1124;
-        readsize	= 1;
-    ;
-
-    memory "fuses"
-        size		= 9;
-        offset		= 0x1280;
-        page_size = 0x0A;
-        readsize  = 0x0A;
-    ;
+    desc                   = "AVR8X family common values";
+    id                     = ".avr8x";
+    has_updi               = yes;
+    nvm_base               = 0x1000;
+    ocd_base               = 0x0f80;
 
     memory "fuse0"
-        size		= 1;
-        offset		= 0x1280;
-        readsize  = 1;
+        size               = 1;
+        offset             = 0x1280;
+        readsize           = 1;
     ;
 
     memory "wdtcfg"
@@ -17077,9 +12912,9 @@ part
     ;
 
     memory "fuse1"
-        size		= 1;
-        offset		= 0x1281;
-        readsize  = 1;
+        size               = 1;
+        offset             = 0x1281;
+        readsize           = 1;
     ;
 
     memory "bodcfg"
@@ -17087,9 +12922,9 @@ part
     ;
 
     memory "fuse2"
-        size		= 1;
-        offset		= 0x1282;
-        readsize  = 1;
+        size               = 1;
+        offset             = 0x1282;
+        readsize           = 1;
     ;
 
     memory "osccfg"
@@ -17097,9 +12932,9 @@ part
     ;
 
     memory "fuse4"
-        size		= 1;
-        offset		= 0x1284;
-        readsize  = 1;
+        size               = 1;
+        offset             = 0x1284;
+        readsize           = 1;
     ;
 
     memory "tcd0cfg"
@@ -17107,9 +12942,9 @@ part
     ;
 
     memory "fuse5"
-        size		= 1;
-        offset		= 0x1285;
-        readsize  = 1;
+        size               = 1;
+        offset             = 0x1285;
+        readsize           = 1;
     ;
 
     memory "syscfg0"
@@ -17117,9 +12952,9 @@ part
     ;
 
     memory "fuse6"
-        size		= 1;
-        offset		= 0x1286;
-        readsize  = 1;
+        size               = 1;
+        offset             = 0x1286;
+        readsize           = 1;
     ;
 
     memory "syscfg1"
@@ -17127,9 +12962,9 @@ part
     ;
 
     memory "fuse7"
-        size		= 1;
-        offset		= 0x1287;
-        readsize  = 1;
+        size               = 1;
+        offset             = 0x1287;
+        readsize           = 1;
     ;
 
     memory "append"
@@ -17141,9 +12976,9 @@ part
     ;
 
     memory "fuse8"
-        size		= 1;
-        offset		= 0x1288;
-        readsize  = 1;
+        size               = 1;
+        offset             = 0x1288;
+        readsize           = 1;
     ;
 
     memory "bootend"
@@ -17154,15 +12989,71 @@ part
         alias "fuse8";
     ;
 
+    memory "fuses"
+        size               = 9;
+        page_size          = 10;
+        offset             = 0x1280;
+        readsize           = 10;
+    ;
+
     memory "lock"
-        size		= 1;
-        offset		= 0x128a;
-        readsize  = 1;
+        size               = 1;
+        offset             = 0x128a;
+        readsize           = 1;
+    ;
+
+    memory "tempsense"
+        size               = 2;
+        offset             = 0x1120;
+        readsize           = 1;
+    ;
+
+    memory "signature"
+        size               = 3;
+        offset             = 0x1100;
+        readsize           = 3;
+    ;
+
+    memory "prodsig"
+        size               = 61;
+        page_size          = 61;
+        offset             = 0x1103;
+        readsize           = 61;
+    ;
+
+    memory "sernum"
+        size               = 10;
+        offset             = 0x1104;
+        readsize           = 1;
+    ;
+
+    memory "osccal16"
+        size               = 2;
+        offset             = 0x1118;
+        readsize           = 1;
+    ;
+
+    memory "osccal20"
+        size               = 2;
+        offset             = 0x111a;
+        readsize           = 1;
+    ;
+
+    memory "osc16err"
+        size               = 2;
+        offset             = 0x1122;
+        readsize           = 1;
+    ;
+
+    memory "osc20err"
+        size               = 2;
+        offset             = 0x1124;
+        readsize           = 1;
     ;
 
     memory "data"
         # SRAM, only used to supply the offset
-        offset		= 0x1000000;
+        offset             = 0x1000000;
     ;
 ;
 
@@ -17171,17 +13062,17 @@ part
 #------------------------------------------------------------
 
 part parent ".avr8x"
-    id			       = ".avr8x_tiny";
-    desc		       = "AVR8X tiny family common values";
-    family_id      = "tinyAVR";
+    desc                   = "AVR8X tiny family common values";
+    id                     = ".avr8x_tiny";
+    family_id              = "tinyAVR";
     # Shared UPDI pin, HV on UPDI pin
-    hvupdi_variant = 0;
+    hvupdi_variant         = 0;
 
     memory "userrow"
-        size	  	= 0x20;
-        offset		= 0x1300;
-        page_size	= 0x20;
-        readsize	= 0x100;
+        size               = 32;
+        page_size          = 32;
+        offset             = 0x1300;
+        readsize           = 256;
     ;
 
     memory "usersig"
@@ -17194,17 +13085,17 @@ part parent ".avr8x"
 #------------------------------------------------------------
 
 part parent ".avr8x"
-    id			       = ".avr8x_mega";
-    desc		       = "AVR8X mega family common values";
-    family_id	     = "megaAVR";
+    desc                   = "AVR8X mega family common values";
+    id                     = ".avr8x_mega";
+    family_id              = "megaAVR";
     # Dedicated UPDI pin, no HV
-    hvupdi_variant = 1;
+    hvupdi_variant         = 1;
 
     memory "userrow"
-        size		  = 0x40;
-        offset		= 0x1300;
-        page_size	= 0x40;
-        readsize	= 0x100;
+        size               = 64;
+        page_size          = 64;
+        offset             = 0x1300;
+        readsize           = 256;
     ;
 
     memory "usersig"
@@ -17216,23 +13107,23 @@ part parent ".avr8x"
 # ATtiny202
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t202";
-    desc      = "ATtiny202";
-    signature = 0x1E 0x91 0x23;
-
-    memory "flash"
-        size      = 0x800;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny202";
+    id                     = "t202";
+    signature              = 0x1e 0x91 0x23;
 
     memory "eeprom"
-        size      = 0x40;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 64;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 2048;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17240,23 +13131,23 @@ part parent    ".avr8x_tiny"
 # ATtiny204
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t204";
-    desc      = "ATtiny204";
-    signature = 0x1E 0x91 0x22;
-
-    memory "flash"
-        size      = 0x800;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny204";
+    id                     = "t204";
+    signature              = 0x1e 0x91 0x22;
 
     memory "eeprom"
-        size      = 0x40;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 64;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 2048;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17264,23 +13155,23 @@ part parent    ".avr8x_tiny"
 # ATtiny402
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t402";
-    desc      = "ATtiny402";
-    signature = 0x1E 0x92 0x27;
-
-    memory "flash"
-        size      = 0x1000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny402";
+    id                     = "t402";
+    signature              = 0x1e 0x92 0x27;
 
     memory "eeprom"
-        size      = 0x80;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 128;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 4096;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17288,23 +13179,23 @@ part parent    ".avr8x_tiny"
 # ATtiny404
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t404";
-    desc      = "ATtiny404";
-    signature = 0x1E 0x92 0x26;
-
-    memory "flash"
-        size      = 0x1000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny404";
+    id                     = "t404";
+    signature              = 0x1e 0x92 0x26;
 
     memory "eeprom"
-        size      = 0x80;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 128;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 4096;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17312,23 +13203,23 @@ part parent    ".avr8x_tiny"
 # ATtiny406
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t406";
-    desc      = "ATtiny406";
-    signature = 0x1E 0x92 0x25;
-
-    memory "flash"
-        size      = 0x1000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny406";
+    id                     = "t406";
+    signature              = 0x1e 0x92 0x25;
 
     memory "eeprom"
-        size      = 0x80;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 128;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 4096;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17336,23 +13227,23 @@ part parent    ".avr8x_tiny"
 # ATtiny804
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t804";
-    desc      = "ATtiny804";
-    signature = 0x1E 0x93 0x25;
-
-    memory "flash"
-        size      = 0x2000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny804";
+    id                     = "t804";
+    signature              = 0x1e 0x93 0x25;
 
     memory "eeprom"
-        size      = 0x80;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 128;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 8192;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17360,23 +13251,23 @@ part parent    ".avr8x_tiny"
 # ATtiny806
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t806";
-    desc      = "ATtiny806";
-    signature = 0x1E 0x93 0x24;
-
-    memory "flash"
-        size      = 0x2000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny806";
+    id                     = "t806";
+    signature              = 0x1e 0x93 0x24;
 
     memory "eeprom"
-        size      = 0x80;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 128;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 8192;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17384,23 +13275,23 @@ part parent    ".avr8x_tiny"
 # ATtiny807
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t807";
-    desc      = "ATtiny807";
-    signature = 0x1E 0x93 0x23;
-
-    memory "flash"
-        size      = 0x2000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny807";
+    id                     = "t807";
+    signature              = 0x1e 0x93 0x23;
 
     memory "eeprom"
-        size      = 0x80;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 128;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 8192;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17408,23 +13299,23 @@ part parent    ".avr8x_tiny"
 # ATtiny1604
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t1604";
-    desc      = "ATtiny1604";
-    signature = 0x1E 0x94 0x25;
-
-    memory "flash"
-        size      = 0x4000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny1604";
+    id                     = "t1604";
+    signature              = 0x1e 0x94 0x25;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 256;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x4000;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17432,23 +13323,23 @@ part parent    ".avr8x_tiny"
 # ATtiny1606
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t1606";
-    desc      = "ATtiny1606";
-    signature = 0x1E 0x94 0x24;
-
-    memory "flash"
-        size      = 0x4000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny1606";
+    id                     = "t1606";
+    signature              = 0x1e 0x94 0x24;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 256;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x4000;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17456,23 +13347,23 @@ part parent    ".avr8x_tiny"
 # ATtiny1607
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t1607";
-    desc      = "ATtiny1607";
-    signature = 0x1E 0x94 0x23;
-
-    memory "flash"
-        size      = 0x4000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny1607";
+    id                     = "t1607";
+    signature              = 0x1e 0x94 0x23;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 256;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x4000;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17480,23 +13371,23 @@ part parent    ".avr8x_tiny"
 # ATtiny212
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t212";
-    desc      = "ATtiny212";
-    signature = 0x1E 0x91 0x21;
-
-    memory "flash"
-        size      = 0x800;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny212";
+    id                     = "t212";
+    signature              = 0x1e 0x91 0x21;
 
     memory "eeprom"
-        size      = 0x40;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 64;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 2048;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17504,23 +13395,23 @@ part parent    ".avr8x_tiny"
 # ATtiny214
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t214";
-    desc      = "ATtiny214";
-    signature = 0x1E 0x91 0x20;
-
-    memory "flash"
-        size      = 0x800;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny214";
+    id                     = "t214";
+    signature              = 0x1e 0x91 0x20;
 
     memory "eeprom"
-        size      = 0x40;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 64;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 2048;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17528,48 +13419,47 @@ part parent    ".avr8x_tiny"
 # ATtiny412
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t412";
-    desc      = "ATtiny412";
-    signature = 0x1E 0x92 0x23;
-
-    memory "flash"
-        size      = 0x1000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny412";
+    id                     = "t412";
+    signature              = 0x1e 0x92 0x23;
 
     memory "eeprom"
-        size      = 0x80;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 128;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 4096;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
-
 #------------------------------------------------------------
 # ATtiny414
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t414";
-    desc      = "ATtiny414";
-    signature = 0x1E 0x92 0x22;
-
-    memory "flash"
-        size      = 0x1000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny414";
+    id                     = "t414";
+    signature              = 0x1e 0x92 0x22;
 
     memory "eeprom"
-        size      = 0x80;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 128;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 4096;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17577,98 +13467,95 @@ part parent    ".avr8x_tiny"
 # ATtiny416
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t416";
-    desc      = "ATtiny416";
-    signature = 0x1E 0x92 0x21;
-
-    memory "flash"
-        size      = 0x1000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny416";
+    id                     = "t416";
+    signature              = 0x1e 0x92 0x21;
 
     memory "eeprom"
-        size      = 0x80;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 128;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 4096;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
-
 #------------------------------------------------------------
 # ATtiny417
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t417";
-    desc      = "ATtiny417";
-    signature = 0x1E 0x92 0x20;
-
-    memory "flash"
-        size      = 0x1000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny417";
+    id                     = "t417";
+    signature              = 0x1e 0x92 0x20;
 
     memory "eeprom"
-        size      = 0x80;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 128;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 4096;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
-
 #------------------------------------------------------------
 # ATtiny814
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t814";
-    desc      = "ATtiny814";
-    signature = 0x1E 0x93 0x22;
-
-    memory "flash"
-        size      = 0x2000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny814";
+    id                     = "t814";
+    signature              = 0x1e 0x93 0x22;
 
     memory "eeprom"
-        size      = 0x80;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 128;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 8192;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
-
 #------------------------------------------------------------
 # ATtiny816
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t816";
-    desc      = "ATtiny816";
-    signature = 0x1E 0x93 0x21;
-
-    memory "flash"
-        size      = 0x2000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny816";
+    id                     = "t816";
+    signature              = 0x1e 0x93 0x21;
 
     memory "eeprom"
-        size      = 0x80;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 128;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 8192;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17676,23 +13563,23 @@ part parent    ".avr8x_tiny"
 # ATtiny817
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t817";
-    desc      = "ATtiny817";
-    signature = 0x1E 0x93 0x20;
-
-    memory "flash"
-        size      = 0x2000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny817";
+    id                     = "t817";
+    signature              = 0x1e 0x93 0x20;
 
     memory "eeprom"
-        size      = 0x80;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 128;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 8192;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17700,23 +13587,23 @@ part parent    ".avr8x_tiny"
 # ATtiny1614
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t1614";
-    desc      = "ATtiny1614";
-    signature = 0x1E 0x94 0x22;
-
-    memory "flash"
-        size      = 0x4000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny1614";
+    id                     = "t1614";
+    signature              = 0x1e 0x94 0x22;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 256;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x4000;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17724,23 +13611,23 @@ part parent    ".avr8x_tiny"
 # ATtiny1616
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t1616";
-    desc      = "ATtiny1616";
-    signature = 0x1E 0x94 0x21;
-
-    memory "flash"
-        size      = 0x4000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny1616";
+    id                     = "t1616";
+    signature              = 0x1e 0x94 0x21;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 256;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x4000;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17748,23 +13635,23 @@ part parent    ".avr8x_tiny"
 # ATtiny1617
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t1617";
-    desc      = "ATtiny1617";
-    signature = 0x1E 0x94 0x20;
-
-    memory "flash"
-        size      = 0x4000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny1617";
+    id                     = "t1617";
+    signature              = 0x1e 0x94 0x20;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 256;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x4000;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17772,23 +13659,23 @@ part parent    ".avr8x_tiny"
 # ATtiny3216
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t3216";
-    desc      = "ATtiny3216";
-    signature = 0x1E 0x95 0x21;
-
-    memory "flash"
-        size      = 0x8000;
-        offset    = 0x8000;
-        page_size = 0x80;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny3216";
+    id                     = "t3216";
+    signature              = 0x1e 0x95 0x21;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x40;
-        readsize  = 0x100;
+        size               = 256;
+        page_size          = 64;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x8000;
+        page_size          = 128;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17796,23 +13683,23 @@ part parent    ".avr8x_tiny"
 # ATtiny3217
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t3217";
-    desc      = "ATtiny3217";
-    signature = 0x1E 0x95 0x22;
-
-    memory "flash"
-        size      = 0x8000;
-        offset    = 0x8000;
-        page_size = 0x80;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny3217";
+    id                     = "t3217";
+    signature              = 0x1e 0x95 0x22;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x40;
-        readsize  = 0x100;
+        size               = 256;
+        page_size          = 64;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x8000;
+        page_size          = 128;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17820,23 +13707,23 @@ part parent    ".avr8x_tiny"
 # ATtiny424
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t424";
-    desc      = "ATtiny424";
-    signature = 0x1E 0x92 0x2C;
-
-    memory "flash"
-        size      = 0x1000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny424";
+    id                     = "t424";
+    signature              = 0x1e 0x92 0x2c;
 
     memory "eeprom"
-        size      = 0x80;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 128;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 4096;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17844,23 +13731,23 @@ part parent    ".avr8x_tiny"
 # ATtiny426
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t426";
-    desc      = "ATtiny426";
-    signature = 0x1E 0x92 0x2B;
-
-    memory "flash"
-        size      = 0x1000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny426";
+    id                     = "t426";
+    signature              = 0x1e 0x92 0x2b;
 
     memory "eeprom"
-        size      = 0x80;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 128;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 4096;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17868,23 +13755,23 @@ part parent    ".avr8x_tiny"
 # ATtiny427
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t427";
-    desc      = "ATtiny427";
-    signature = 0x1E 0x92 0x2A;
-
-    memory "flash"
-        size      = 0x1000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny427";
+    id                     = "t427";
+    signature              = 0x1e 0x92 0x2a;
 
     memory "eeprom"
-        size      = 0x80;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 128;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 4096;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17892,23 +13779,23 @@ part parent    ".avr8x_tiny"
 # ATtiny824
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t824";
-    desc      = "ATtiny824";
-    signature = 0x1E 0x93 0x29;
-
-    memory "flash"
-        size      = 0x2000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny824";
+    id                     = "t824";
+    signature              = 0x1e 0x93 0x29;
 
     memory "eeprom"
-        size      = 0x80;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 128;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 8192;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17916,23 +13803,23 @@ part parent    ".avr8x_tiny"
 # ATtiny826
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t826";
-    desc      = "ATtiny826";
-    signature = 0x1E 0x93 0x28;
-
-    memory "flash"
-        size      = 0x2000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny826";
+    id                     = "t826";
+    signature              = 0x1e 0x93 0x28;
 
     memory "eeprom"
-        size      = 0x80;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 128;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 8192;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17940,23 +13827,23 @@ part parent    ".avr8x_tiny"
 # ATtiny827
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t827";
-    desc      = "ATtiny827";
-    signature = 0x1E 0x93 0x27;
-
-    memory "flash"
-        size      = 0x2000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny827";
+    id                     = "t827";
+    signature              = 0x1e 0x93 0x27;
 
     memory "eeprom"
-        size      = 0x80;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 128;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 8192;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -17964,46 +13851,47 @@ part parent    ".avr8x_tiny"
 # ATtiny1624
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t1624";
-    desc      = "ATtiny1624";
-    signature = 0x1E 0x94 0x2A;
-
-    memory "flash"
-        size      = 0x4000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny1624";
+    id                     = "t1624";
+    signature              = 0x1e 0x94 0x2a;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 256;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x4000;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
+
 #------------------------------------------------------------
 # ATtiny1626
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t1626";
-    desc      = "ATtiny1626";
-    signature = 0x1E 0x94 0x29;
-
-    memory "flash"
-        size      = 0x4000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny1626";
+    id                     = "t1626";
+    signature              = 0x1e 0x94 0x29;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 256;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x4000;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -18011,23 +13899,23 @@ part parent    ".avr8x_tiny"
 # ATtiny1627
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t1627";
-    desc      = "ATtiny1627";
-    signature = 0x1E 0x94 0x28;
-
-    memory "flash"
-        size      = 0x4000;
-        offset    = 0x8000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny1627";
+    id                     = "t1627";
+    signature              = 0x1e 0x94 0x28;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 256;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x4000;
+        page_size          = 64;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -18035,23 +13923,23 @@ part parent    ".avr8x_tiny"
 # ATtiny3224
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t3224";
-    desc      = "ATtiny3224";
-    signature = 0x1E 0x95 0x28;
-
-    memory "flash"
-        size      = 0x8000;
-        offset    = 0x8000;
-        page_size = 0x80;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny3224";
+    id                     = "t3224";
+    signature              = 0x1e 0x95 0x28;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x40;
-        readsize  = 0x100;
+        size               = 256;
+        page_size          = 64;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x8000;
+        page_size          = 128;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -18059,23 +13947,23 @@ part parent    ".avr8x_tiny"
 # ATtiny3226
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t3226";
-    desc      = "ATtiny3226";
-    signature = 0x1E 0x95 0x27;
-
-    memory "flash"
-        size      = 0x8000;
-        offset    = 0x8000;
-        page_size = 0x80;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny3226";
+    id                     = "t3226";
+    signature              = 0x1e 0x95 0x27;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x40;
-        readsize  = 0x100;
+        size               = 256;
+        page_size          = 64;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x8000;
+        page_size          = 128;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -18083,23 +13971,23 @@ part parent    ".avr8x_tiny"
 # ATtiny3227
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "t3227";
-    desc      = "ATtiny3227";
-    signature = 0x1E 0x95 0x26;
-
-    memory "flash"
-        size      = 0x8000;
-        offset    = 0x8000;
-        page_size = 0x80;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATtiny3227";
+    id                     = "t3227";
+    signature              = 0x1e 0x95 0x26;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x40;
-        readsize  = 0x100;
+        size               = 256;
+        page_size          = 64;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x8000;
+        page_size          = 128;
+        offset             = 0x8000;
+        readsize           = 256;
     ;
 ;
 
@@ -18107,23 +13995,23 @@ part parent    ".avr8x_tiny"
 # ATmega808
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "m808";
-    desc      = "ATmega808";
-    signature = 0x1E 0x93 0x26;
-
-    memory "flash"
-        size      = 0x2000;
-        offset    = 0x4000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATmega808";
+    id                     = "m808";
+    signature              = 0x1e 0x93 0x26;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 256;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 8192;
+        page_size          = 64;
+        offset             = 0x4000;
+        readsize           = 256;
     ;
 ;
 
@@ -18131,23 +14019,23 @@ part parent    ".avr8x_tiny"
 # ATmega809
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "m809";
-    desc      = "ATmega809";
-    signature = 0x1E 0x93 0x2A;
-
-    memory "flash"
-        size      = 0x2000;
-        offset    = 0x4000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATmega809";
+    id                     = "m809";
+    signature              = 0x1e 0x93 0x2a;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 256;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 8192;
+        page_size          = 64;
+        offset             = 0x4000;
+        readsize           = 256;
     ;
 ;
 
@@ -18155,23 +14043,23 @@ part parent    ".avr8x_tiny"
 # ATmega1608
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "m1608";
-    desc      = "ATmega1608";
-    signature = 0x1E 0x94 0x27;
-
-    memory "flash"
-        size      = 0x4000;
-        offset    = 0x4000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATmega1608";
+    id                     = "m1608";
+    signature              = 0x1e 0x94 0x27;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 256;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x4000;
+        page_size          = 64;
+        offset             = 0x4000;
+        readsize           = 256;
     ;
 ;
 
@@ -18179,23 +14067,23 @@ part parent    ".avr8x_tiny"
 # ATmega1609
 #------------------------------------------------------------
 
-part parent    ".avr8x_tiny"
-    id        = "m1609";
-    desc      = "ATmega1609";
-    signature = 0x1E 0x94 0x26;
-
-    memory "flash"
-        size      = 0x4000;
-        offset    = 0x4000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_tiny"
+    desc                   = "ATmega1609";
+    id                     = "m1609";
+    signature              = 0x1e 0x94 0x26;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x20;
-        readsize  = 0x100;
+        size               = 256;
+        page_size          = 32;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x4000;
+        page_size          = 64;
+        offset             = 0x4000;
+        readsize           = 256;
     ;
 ;
 
@@ -18203,23 +14091,23 @@ part parent    ".avr8x_tiny"
 # ATmega3208
 #------------------------------------------------------------
 
-part parent    ".avr8x_mega"
-    id        = "m3208";
-    desc      = "ATmega3208";
-    signature = 0x1E 0x95 0x30;
-
-    memory "flash"
-        size      = 0x8000;
-        offset    = 0x4000;
-        page_size = 0x80;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_mega"
+    desc                   = "ATmega3208";
+    id                     = "m3208";
+    signature              = 0x1e 0x95 0x30;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x40;
-        readsize  = 0x100;
+        size               = 256;
+        page_size          = 64;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x8000;
+        page_size          = 128;
+        offset             = 0x4000;
+        readsize           = 256;
     ;
 ;
 
@@ -18227,23 +14115,23 @@ part parent    ".avr8x_mega"
 # ATmega3209
 #------------------------------------------------------------
 
-part parent    ".avr8x_mega"
-    id        = "m3209";
-    desc      = "ATmega3209";
-    signature = 0x1E 0x95 0x31;
-
-    memory "flash"
-        size      = 0x8000;
-        offset    = 0x4000;
-        page_size = 0x80;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_mega"
+    desc                   = "ATmega3209";
+    id                     = "m3209";
+    signature              = 0x1e 0x95 0x31;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x40;
-        readsize  = 0x100;
+        size               = 256;
+        page_size          = 64;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x8000;
+        page_size          = 128;
+        offset             = 0x4000;
+        readsize           = 256;
     ;
 ;
 
@@ -18251,23 +14139,23 @@ part parent    ".avr8x_mega"
 # ATmega4808
 #------------------------------------------------------------
 
-part parent    ".avr8x_mega"
-    id        = "m4808";
-    desc      = "ATmega4808";
-    signature = 0x1E 0x96 0x50;
-
-    memory "flash"
-        size      = 0xC000;
-        offset    = 0x4000;
-        page_size = 0x80;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_mega"
+    desc                   = "ATmega4808";
+    id                     = "m4808";
+    signature              = 0x1e 0x96 0x50;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x40;
-        readsize  = 0x100;
+        size               = 256;
+        page_size          = 64;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0xc000;
+        page_size          = 128;
+        offset             = 0x4000;
+        readsize           = 256;
     ;
 ;
 
@@ -18275,23 +14163,23 @@ part parent    ".avr8x_mega"
 # ATmega4809
 #------------------------------------------------------------
 
-part parent    ".avr8x_mega"
-    id        = "m4809";
-    desc      = "ATmega4809";
-    signature = 0x1E 0x96 0x51;
-
-    memory "flash"
-        size      = 0xC000;
-        offset    = 0x4000;
-        page_size = 0x80;
-        readsize  = 0x100;
-    ;
+part parent ".avr8x_mega"
+    desc                   = "ATmega4809";
+    id                     = "m4809";
+    signature              = 0x1e 0x96 0x51;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x40;
-        readsize  = 0x100;
+        size               = 256;
+        page_size          = 64;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0xc000;
+        page_size          = 128;
+        offset             = 0x4000;
+        readsize           = 256;
     ;
 ;
 
@@ -18300,50 +14188,18 @@ part parent    ".avr8x_mega"
 #------------------------------------------------------------
 
 part
-    id             = ".avrdx";
-    desc           = "AVR-Dx family common values";
-    has_updi       = yes;
-    nvm_base       = 0x1000;
-    ocd_base       = 0x0F80;
+    desc                   = "AVR-Dx family common values";
+    id                     = ".avrdx";
     # Dedicated UPDI pin, no HV
-    hvupdi_variant = 1;
-
-    memory "signature"
-        size		= 3;
-        offset		= 0x1100;
-        readsize	= 0x3;
-    ;
-
-    memory "prodsig"
-        size		= 0x7D;
-        offset		= 0x1103;
-        page_size	= 0x7D;
-        readsize	= 0x7D;
-    ;
-
-    memory "tempsense"
-        size		= 2;
-        offset		= 0x1104;
-        readsize	= 1;
-    ;
-
-    memory "sernum"
-        size		= 16;
-        offset		= 0x1110;
-        readsize	= 1;
-    ;
-
-    memory "fuses"
-        size		= 9;
-        offset		= 0x1050;
-        page_size = 0x10;
-        readsize  = 0x10;
-    ;
+    hvupdi_variant         = 1;
+    has_updi               = yes;
+    nvm_base               = 0x1000;
+    ocd_base               = 0x0f80;
 
     memory "fuse0"
-        size		= 1;
-        offset		= 0x1050;
-        readsize  = 1;
+        size               = 1;
+        offset             = 0x1050;
+        readsize           = 1;
     ;
 
     memory "wdtcfg"
@@ -18351,9 +14207,9 @@ part
     ;
 
     memory "fuse1"
-        size		= 1;
-        offset		= 0x1051;
-        readsize  = 1;
+        size               = 1;
+        offset             = 0x1051;
+        readsize           = 1;
     ;
 
     memory "bodcfg"
@@ -18361,9 +14217,9 @@ part
     ;
 
     memory "fuse2"
-        size		= 1;
-        offset		= 0x1052;
-        readsize  = 1;
+        size               = 1;
+        offset             = 0x1052;
+        readsize           = 1;
     ;
 
     memory "osccfg"
@@ -18371,9 +14227,9 @@ part
     ;
 
     memory "fuse4"
-        size		= 1;
-        offset		= 0x1054;
-        readsize  = 1;
+        size               = 1;
+        offset             = 0x1054;
+        readsize           = 1;
     ;
 
     memory "tcd0cfg"
@@ -18381,9 +14237,9 @@ part
     ;
 
     memory "fuse5"
-        size		= 1;
-        offset		= 0x1055;
-        readsize  = 1;
+        size               = 1;
+        offset             = 0x1055;
+        readsize           = 1;
     ;
 
     memory "syscfg0"
@@ -18391,9 +14247,9 @@ part
     ;
 
     memory "fuse6"
-        size		= 1;
-        offset		= 0x1056;
-        readsize  = 1;
+        size               = 1;
+        offset             = 0x1056;
+        readsize           = 1;
     ;
 
     memory "syscfg1"
@@ -18401,9 +14257,9 @@ part
     ;
 
     memory "fuse7"
-        size		= 1;
-        offset		= 0x1057;
-        readsize  = 1;
+        size               = 1;
+        offset             = 0x1057;
+        readsize           = 1;
     ;
 
     memory "codesize"
@@ -18415,9 +14271,9 @@ part
     ;
 
     memory "fuse8"
-        size		= 1;
-        offset		= 0x1058;
-        readsize  = 1;
+        size               = 1;
+        offset             = 0x1058;
+        readsize           = 1;
     ;
 
     memory "bootsize"
@@ -18428,18 +14284,49 @@ part
         alias "fuse8";
     ;
 
+    memory "fuses"
+        size               = 9;
+        page_size          = 16;
+        offset             = 0x1050;
+        readsize           = 16;
+    ;
+
     memory "lock"
-        size		= 4;
-        offset		= 0x1040;
-        page_size = 0x1;
-        readsize  = 0x4;
+        size               = 4;
+        offset             = 0x1040;
+        readsize           = 4;
+    ;
+
+    memory "tempsense"
+        size               = 2;
+        offset             = 0x1104;
+        readsize           = 1;
+    ;
+
+    memory "signature"
+        size               = 3;
+        offset             = 0x1100;
+        readsize           = 3;
+    ;
+
+    memory "prodsig"
+        size               = 125;
+        page_size          = 125;
+        offset             = 0x1103;
+        readsize           = 125;
+    ;
+
+    memory "sernum"
+        size               = 16;
+        offset             = 0x1110;
+        readsize           = 1;
     ;
 
     memory "userrow"
-        size      = 0x20;
-        offset    = 0x1080;
-        page_size = 0x20;
-        readsize  = 0x20;
+        size               = 32;
+        page_size          = 32;
+        offset             = 0x1080;
+        readsize           = 32;
     ;
 
     memory "usersig"
@@ -18448,7 +14335,7 @@ part
 
     memory "data"
         # SRAM, only used to supply the offset
-        offset		= 0x1000000;
+        offset             = 0x1000000;
     ;
 ;
 
@@ -18456,23 +14343,22 @@ part
 # AVR32DA28
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr32da28";
-    desc      = "AVR32DA28";
-    signature = 0x1E 0x95 0x34;
-
-    memory "flash"
-        size      = 0x8000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR32DA28";
+    id                     = "avr32da28";
+    signature              = 0x1e 0x95 0x34;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 512;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x8000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -18480,23 +14366,22 @@ part parent    ".avrdx"
 # AVR32DA32
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr32da32";
-    desc      = "AVR32DA32";
-    signature = 0x1E 0x95 0x33;
-
-    memory "flash"
-        size      = 0x8000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR32DA32";
+    id                     = "avr32da32";
+    signature              = 0x1e 0x95 0x33;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 512;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x8000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -18504,23 +14389,22 @@ part parent    ".avrdx"
 # AVR32DA48
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr32da48";
-    desc      = "AVR32DA48";
-    signature = 0x1E 0x95 0x32;
-
-    memory "flash"
-        size      = 0x8000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR32DA48";
+    id                     = "avr32da48";
+    signature              = 0x1e 0x95 0x32;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 512;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x8000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -18528,23 +14412,22 @@ part parent    ".avrdx"
 # AVR64DA28
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr64da28";
-    desc      = "AVR64DA28";
-    signature = 0x1E 0x96 0x15;
-
-    memory "flash"
-        size      = 0x10000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR64DA28";
+    id                     = "avr64da28";
+    signature              = 0x1e 0x96 0x15;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 512;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x10000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -18552,23 +14435,22 @@ part parent    ".avrdx"
 # AVR64DA32
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr64da32";
-    desc      = "AVR64DA32";
-    signature = 0x1E 0x96 0x14;
-
-    memory "flash"
-        size      = 0x10000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR64DA32";
+    id                     = "avr64da32";
+    signature              = 0x1e 0x96 0x14;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 512;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x10000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -18576,23 +14458,22 @@ part parent    ".avrdx"
 # AVR64DA48
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr64da48";
-    desc      = "AVR64DA48";
-    signature = 0x1E 0x96 0x13;
-
-    memory "flash"
-        size      = 0x10000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR64DA48";
+    id                     = "avr64da48";
+    signature              = 0x1e 0x96 0x13;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 512;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x10000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -18600,23 +14481,22 @@ part parent    ".avrdx"
 # AVR64DA64
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr64da64";
-    desc      = "AVR64DA64";
-    signature = 0x1E 0x96 0x12;
-
-    memory "flash"
-        size      = 0x10000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR64DA64";
+    id                     = "avr64da64";
+    signature              = 0x1e 0x96 0x12;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 512;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x10000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -18624,23 +14504,22 @@ part parent    ".avrdx"
 # AVR128DA28
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr128da28";
-    desc      = "AVR128DA28";
-    signature = 0x1E 0x97 0x0A;
-
-    memory "flash"
-        size      = 0x20000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR128DA28";
+    id                     = "avr128da28";
+    signature              = 0x1e 0x97 0x0a;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 512;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x20000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -18648,23 +14527,22 @@ part parent    ".avrdx"
 # AVR128DA32
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr128da32";
-    desc      = "AVR128DA32";
-    signature = 0x1E 0x97 0x09;
-
-    memory "flash"
-        size      = 0x20000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR128DA32";
+    id                     = "avr128da32";
+    signature              = 0x1e 0x97 0x09;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 512;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x20000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -18672,23 +14550,22 @@ part parent    ".avrdx"
 # AVR128DA48
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr128da48";
-    desc      = "AVR128DA48";
-    signature = 0x1E 0x97 0x08;
-
-    memory "flash"
-        size      = 0x20000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR128DA48";
+    id                     = "avr128da48";
+    signature              = 0x1e 0x97 0x08;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 512;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x20000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -18696,23 +14573,22 @@ part parent    ".avrdx"
 # AVR128DA64
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr128da64";
-    desc      = "AVR128DA64";
-    signature = 0x1E 0x97 0x07;
-
-    memory "flash"
-        size      = 0x20000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR128DA64";
+    id                     = "avr128da64";
+    signature              = 0x1e 0x97 0x07;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 512;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x20000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -18720,23 +14596,22 @@ part parent    ".avrdx"
 # AVR32DB28
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr32db28";
-    desc      = "AVR32DB28";
-    signature = 0x1E 0x95 0x37;
-
-    memory "flash"
-        size      = 0x8000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR32DB28";
+    id                     = "avr32db28";
+    signature              = 0x1e 0x95 0x37;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 512;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x8000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -18744,23 +14619,22 @@ part parent    ".avrdx"
 # AVR32DB32
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr32db32";
-    desc      = "AVR32DB32";
-    signature = 0x1E 0x95 0x36;
-
-    memory "flash"
-        size      = 0x8000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR32DB32";
+    id                     = "avr32db32";
+    signature              = 0x1e 0x95 0x36;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 512;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x8000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -18768,23 +14642,22 @@ part parent    ".avrdx"
 # AVR32DB48
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr32db48";
-    desc      = "AVR32DB48";
-    signature = 0x1E 0x95 0x35;
-
-    memory "flash"
-        size      = 0x8000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR32DB48";
+    id                     = "avr32db48";
+    signature              = 0x1e 0x95 0x35;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 512;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x8000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -18792,23 +14665,22 @@ part parent    ".avrdx"
 # AVR64DB28
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr64db28";
-    desc      = "AVR64DB28";
-    signature = 0x1E 0x96 0x19;
-
-    memory "flash"
-        size      = 0x10000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR64DB28";
+    id                     = "avr64db28";
+    signature              = 0x1e 0x96 0x19;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 512;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x10000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -18816,23 +14688,22 @@ part parent    ".avrdx"
 # AVR64DB32
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr64db32";
-    desc      = "AVR64DB32";
-    signature = 0x1E 0x96 0x18;
-
-    memory "flash"
-        size      = 0x10000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR64DB32";
+    id                     = "avr64db32";
+    signature              = 0x1e 0x96 0x18;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 512;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x10000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -18840,23 +14711,22 @@ part parent    ".avrdx"
 # AVR64DB48
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr64db48";
-    desc      = "AVR64DB48";
-    signature = 0x1E 0x96 0x17;
-
-    memory "flash"
-        size      = 0x10000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR64DB48";
+    id                     = "avr64db48";
+    signature              = 0x1e 0x96 0x17;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 512;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x10000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -18864,23 +14734,22 @@ part parent    ".avrdx"
 # AVR64DB64
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr64db64";
-    desc      = "AVR64DB64";
-    signature = 0x1E 0x96 0x16;
-
-    memory "flash"
-        size      = 0x10000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR64DB64";
+    id                     = "avr64db64";
+    signature              = 0x1e 0x96 0x16;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 512;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x10000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -18888,23 +14757,22 @@ part parent    ".avrdx"
 # AVR128DB28
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr128db28";
-    desc      = "AVR128DB28";
-    signature = 0x1E 0x97 0x0E;
-
-    memory "flash"
-        size      = 0x20000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR128DB28";
+    id                     = "avr128db28";
+    signature              = 0x1e 0x97 0x0e;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 512;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x20000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -18912,23 +14780,22 @@ part parent    ".avrdx"
 # AVR128DB32
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr128db32";
-    desc      = "AVR128DB32";
-    signature = 0x1E 0x97 0x0D;
-
-    memory "flash"
-        size      = 0x20000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR128DB32";
+    id                     = "avr128db32";
+    signature              = 0x1e 0x97 0x0d;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 512;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x20000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -18936,23 +14803,22 @@ part parent    ".avrdx"
 # AVR128DB48
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr128db48";
-    desc      = "AVR128DB48";
-    signature = 0x1E 0x97 0x0C;
-
-    memory "flash"
-        size      = 0x20000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR128DB48";
+    id                     = "avr128db48";
+    signature              = 0x1e 0x97 0x0c;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 512;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x20000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -18960,23 +14826,22 @@ part parent    ".avrdx"
 # AVR128DB64
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr128db64";
-    desc      = "AVR128DB64";
-    signature = 0x1E 0x97 0x0B;
-
-    memory "flash"
-        size      = 0x20000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR128DB64";
+    id                     = "avr128db64";
+    signature              = 0x1e 0x97 0x0b;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 512;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x20000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -18984,24 +14849,23 @@ part parent    ".avrdx"
 # AVR16DD14
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr16dd14";
-    desc      = "AVR16DD14";
-    signature = 0x1E 0x94 0x34;
-    hvupdi_variant = 2;
-
-    memory "flash"
-        size      = 0x4000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR16DD14";
+    id                     = "avr16dd14";
+    hvupdi_variant         = 2;
+    signature              = 0x1e 0x94 0x34;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 256;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x4000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19009,24 +14873,23 @@ part parent    ".avrdx"
 # AVR16DD20
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr16dd20";
-    desc      = "AVR16DD20";
-    signature = 0x1E 0x94 0x33;
-    hvupdi_variant = 2;
-
-    memory "flash"
-        size      = 0x4000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR16DD20";
+    id                     = "avr16dd20";
+    hvupdi_variant         = 2;
+    signature              = 0x1e 0x94 0x33;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 256;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x4000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19034,24 +14897,23 @@ part parent    ".avrdx"
 # AVR16DD28
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr16dd28";
-    desc      = "AVR16DD28";
-    signature = 0x1E 0x94 0x32;
-    hvupdi_variant = 2;
-
-    memory "flash"
-        size      = 0x4000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR16DD28";
+    id                     = "avr16dd28";
+    hvupdi_variant         = 2;
+    signature              = 0x1e 0x94 0x32;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 256;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x4000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19059,24 +14921,23 @@ part parent    ".avrdx"
 # AVR16DD32
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr16dd32";
-    desc      = "AVR16DD32";
-    signature = 0x1E 0x94 0x31;
-    hvupdi_variant = 2;
-
-    memory "flash"
-        size      = 0x4000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR16DD32";
+    id                     = "avr16dd32";
+    hvupdi_variant         = 2;
+    signature              = 0x1e 0x94 0x31;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 256;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x4000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19084,24 +14945,23 @@ part parent    ".avrdx"
 # AVR32DD14
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr32dd14";
-    desc      = "AVR32DD14";
-    signature = 0x1E 0x95 0x3B;
-    hvupdi_variant = 2;
-
-    memory "flash"
-        size      = 0x8000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR32DD14";
+    id                     = "avr32dd14";
+    hvupdi_variant         = 2;
+    signature              = 0x1e 0x95 0x3b;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 256;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x8000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19109,24 +14969,23 @@ part parent    ".avrdx"
 # AVR32DD20
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr32dd20";
-    desc      = "AVR32DD20";
-    signature = 0x1E 0x95 0x3A;
-    hvupdi_variant = 2;
-
-    memory "flash"
-        size      = 0x8000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR32DD20";
+    id                     = "avr32dd20";
+    hvupdi_variant         = 2;
+    signature              = 0x1e 0x95 0x3a;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 256;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x8000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19134,24 +14993,23 @@ part parent    ".avrdx"
 # AVR32DD28
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr32dd28";
-    desc      = "AVR32DD28";
-    signature = 0x1E 0x95 0x39;
-    hvupdi_variant = 2;
-
-    memory "flash"
-        size      = 0x8000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR32DD28";
+    id                     = "avr32dd28";
+    hvupdi_variant         = 2;
+    signature              = 0x1e 0x95 0x39;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 256;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x8000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19159,24 +15017,23 @@ part parent    ".avrdx"
 # AVR32DD32
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr32dd32";
-    desc      = "AVR32DD32";
-    signature = 0x1E 0x95 0x38;
-    hvupdi_variant = 2;
-
-    memory "flash"
-        size      = 0x8000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR32DD32";
+    id                     = "avr32dd32";
+    hvupdi_variant         = 2;
+    signature              = 0x1e 0x95 0x38;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 256;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x8000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19184,24 +15041,23 @@ part parent    ".avrdx"
 # AVR64DD14
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr64dd14";
-    desc      = "AVR64DD14";
-    signature = 0x1E 0x96 0x1D;
-    hvupdi_variant = 2;
-
-    memory "flash"
-        size      = 0x10000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR64DD14";
+    id                     = "avr64dd14";
+    hvupdi_variant         = 2;
+    signature              = 0x1e 0x96 0x1d;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 256;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x10000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19209,24 +15065,23 @@ part parent    ".avrdx"
 # AVR64DD20
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr64dd20";
-    desc      = "AVR64DD20";
-    signature = 0x1E 0x96 0x1C;
-    hvupdi_variant = 2;
-
-    memory "flash"
-        size      = 0x10000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR64DD20";
+    id                     = "avr64dd20";
+    hvupdi_variant         = 2;
+    signature              = 0x1e 0x96 0x1c;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 256;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x10000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19234,24 +15089,23 @@ part parent    ".avrdx"
 # AVR64DD28
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr64dd28";
-    desc      = "AVR64DD28";
-    signature = 0x1E 0x96 0x1B;
-    hvupdi_variant = 2;
-
-    memory "flash"
-        size      = 0x10000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR64DD28";
+    id                     = "avr64dd28";
+    hvupdi_variant         = 2;
+    signature              = 0x1e 0x96 0x1b;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 256;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x10000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19259,24 +15113,23 @@ part parent    ".avrdx"
 # AVR64DD32
 #------------------------------------------------------------
 
-part parent    ".avrdx"
-    id        = "avr64dd32";
-    desc      = "AVR64DD32";
-    signature = 0x1E 0x96 0x1A;
-    hvupdi_variant = 2;
-
-    memory "flash"
-        size      = 0x10000;
-        offset    = 0x800000;
-        page_size = 0x200;
-        readsize  = 0x100;
-    ;
+part parent ".avrdx"
+    desc                   = "AVR64DD32";
+    id                     = "avr64dd32";
+    hvupdi_variant         = 2;
+    signature              = 0x1e 0x96 0x1a;
 
     memory "eeprom"
-        size      = 0x100;
-        offset    = 0x1400;
-        page_size = 0x1;
-        readsize  = 0x100;
+        size               = 256;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x10000;
+        page_size          = 512;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19285,16 +15138,15 @@ part parent    ".avrdx"
 #------------------------------------------------------------
 
 part parent ".avrdx"
-    id			       = ".avrex";
-    desc		       = "AVR-Ex family common values";
+    desc                   = "AVR-Ex family common values";
+    id                     = ".avrex";
     # Shared UPDI pin, HV on _RESET
-    hvupdi_variant = 2;
+    hvupdi_variant         = 2;
 
     memory "userrow"
-        size      = 0x40;
-        offset    = 0x1080;
-        page_size = 0x40;
-        readsize  = 0x40;
+        size               = 64;
+        page_size          = 64;
+        readsize           = 64;
     ;
 
     memory "usersig"
@@ -19306,23 +15158,23 @@ part parent ".avrdx"
 # AVR8EA28
 #------------------------------------------------------------
 
-part parent    ".avrex"
-    id        = "avr8ea28";
-    desc      = "AVR8EA28";
-    signature = 0x1E 0x93 0x2C;
-
-    memory "flash"
-        size      = 0x2000;
-        offset    = 0x800000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avrex"
+    desc                   = "AVR8EA28";
+    id                     = "avr8ea28";
+    signature              = 0x1e 0x93 0x2c;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x8;
-        readsize  = 0x100;
+        size               = 512;
+        page_size          = 8;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 8192;
+        page_size          = 64;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19330,23 +15182,23 @@ part parent    ".avrex"
 # AVR8EA32
 #------------------------------------------------------------
 
-part parent    ".avrex"
-    id        = "avr8ea32";
-    desc      = "AVR8EA32";
-    signature = 0x1E 0x93 0x2B;
-
-    memory "flash"
-        size      = 0x2000;
-        offset    = 0x800000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avrex"
+    desc                   = "AVR8EA32";
+    id                     = "avr8ea32";
+    signature              = 0x1e 0x93 0x2b;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x8;
-        readsize  = 0x100;
+        size               = 512;
+        page_size          = 8;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 8192;
+        page_size          = 64;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19354,23 +15206,23 @@ part parent    ".avrex"
 # AVR16EA28
 #------------------------------------------------------------
 
-part parent    ".avrex"
-    id        = "avr16ea28";
-    desc      = "AVR16EA28";
-    signature = 0x1E 0x94 0x37;
-
-    memory "flash"
-        size      = 0x4000;
-        offset    = 0x800000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avrex"
+    desc                   = "AVR16EA28";
+    id                     = "avr16ea28";
+    signature              = 0x1e 0x94 0x37;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x8;
-        readsize  = 0x100;
+        size               = 512;
+        page_size          = 8;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x4000;
+        page_size          = 64;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19378,23 +15230,23 @@ part parent    ".avrex"
 # AVR16EA32
 #------------------------------------------------------------
 
-part parent    ".avrex"
-    id        = "avr16ea32";
-    desc      = "AVR16EA32";
-    signature = 0x1E 0x94 0x36;
-
-    memory "flash"
-        size      = 0x4000;
-        offset    = 0x800000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avrex"
+    desc                   = "AVR16EA32";
+    id                     = "avr16ea32";
+    signature              = 0x1e 0x94 0x36;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x8;
-        readsize  = 0x100;
+        size               = 512;
+        page_size          = 8;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x4000;
+        page_size          = 64;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19402,23 +15254,23 @@ part parent    ".avrex"
 # AVR16EA48
 #------------------------------------------------------------
 
-part parent    ".avrex"
-    id        = "avr16ea48";
-    desc      = "AVR16EA48";
-    signature = 0x1E 0x94 0x35;
-
-    memory "flash"
-        size      = 0x4000;
-        offset    = 0x800000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avrex"
+    desc                   = "AVR16EA48";
+    id                     = "avr16ea48";
+    signature              = 0x1e 0x94 0x35;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x8;
-        readsize  = 0x100;
+        size               = 512;
+        page_size          = 8;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x4000;
+        page_size          = 64;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19426,23 +15278,23 @@ part parent    ".avrex"
 # AVR32EA28
 #------------------------------------------------------------
 
-part parent    ".avrex"
-    id        = "avr32ea28";
-    desc      = "AVR32EA28";
-    signature = 0x1E 0x95 0x3E;
-
-    memory "flash"
-        size      = 0x8000;
-        offset    = 0x800000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avrex"
+    desc                   = "AVR32EA28";
+    id                     = "avr32ea28";
+    signature              = 0x1e 0x95 0x3e;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x8;
-        readsize  = 0x100;
+        size               = 512;
+        page_size          = 8;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x8000;
+        page_size          = 64;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19450,23 +15302,23 @@ part parent    ".avrex"
 # AVR32EA32
 #------------------------------------------------------------
 
-part parent    ".avrex"
-    id        = "avr32ea32";
-    desc      = "AVR32EA32";
-    signature = 0x1E 0x95 0x3D;
-
-    memory "flash"
-        size      = 0x8000;
-        offset    = 0x800000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avrex"
+    desc                   = "AVR32EA32";
+    id                     = "avr32ea32";
+    signature              = 0x1e 0x95 0x3d;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x8;
-        readsize  = 0x100;
+        size               = 512;
+        page_size          = 8;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x8000;
+        page_size          = 64;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19474,23 +15326,23 @@ part parent    ".avrex"
 # AVR32EA48
 #------------------------------------------------------------
 
-part parent    ".avrex"
-    id        = "avr32ea48";
-    desc      = "AVR32EA48";
-    signature = 0x1E 0x95 0x3C;
-
-    memory "flash"
-        size      = 0x8000;
-        offset    = 0x800000;
-        page_size = 0x40;
-        readsize  = 0x100;
-    ;
+part parent ".avrex"
+    desc                   = "AVR32EA48";
+    id                     = "avr32ea48";
+    signature              = 0x1e 0x95 0x3c;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x8;
-        readsize  = 0x100;
+        size               = 512;
+        page_size          = 8;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x8000;
+        page_size          = 64;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19498,23 +15350,23 @@ part parent    ".avrex"
 # AVR64EA28
 #------------------------------------------------------------
 
-part parent    ".avrex"
-    id        = "avr64ea28";
-    desc      = "AVR64EA28";
-    signature = 0x1E 0x96 0x20;
-
-    memory "flash"
-        size      = 0x10000;
-        offset    = 0x800000;
-        page_size = 0x80;
-        readsize  = 0x100;
-    ;
+part parent ".avrex"
+    desc                   = "AVR64EA28";
+    id                     = "avr64ea28";
+    signature              = 0x1e 0x96 0x20;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x8;
-        readsize  = 0x100;
+        size               = 512;
+        page_size          = 8;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x10000;
+        page_size          = 128;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19522,23 +15374,23 @@ part parent    ".avrex"
 # AVR64EA32
 #------------------------------------------------------------
 
-part parent    ".avrex"
-    id        = "avr64ea32";
-    desc      = "AVR64EA32";
-    signature = 0x1E 0x96 0x1F;
-
-    memory "flash"
-        size      = 0x10000;
-        offset    = 0x800000;
-        page_size = 0x80;
-        readsize  = 0x100;
-    ;
+part parent ".avrex"
+    desc                   = "AVR64EA32";
+    id                     = "avr64ea32";
+    signature              = 0x1e 0x96 0x1f;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x8;
-        readsize  = 0x100;
+        size               = 512;
+        page_size          = 8;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x10000;
+        page_size          = 128;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19546,23 +15398,23 @@ part parent    ".avrex"
 # AVR64EA48
 #------------------------------------------------------------
 
-part parent    ".avrex"
-    id        = "avr64ea48";
-    desc      = "AVR64EA48";
-    signature = 0x1E 0x96 0x1E;
-
-    memory "flash"
-        size      = 0x10000;
-        offset    = 0x800000;
-        page_size = 0x80;
-        readsize  = 0x100;
-    ;
+part parent ".avrex"
+    desc                   = "AVR64EA48";
+    id                     = "avr64ea48";
+    signature              = 0x1e 0x96 0x1e;
 
     memory "eeprom"
-        size      = 0x200;
-        offset    = 0x1400;
-        page_size = 0x8;
-        readsize  = 0x100;
+        size               = 512;
+        page_size          = 8;
+        offset             = 0x1400;
+        readsize           = 256;
+    ;
+
+    memory "flash"
+        size               = 0x10000;
+        page_size          = 128;
+        offset             = 0x800000;
+        readsize           = 256;
     ;
 ;
 
@@ -19571,25 +15423,27 @@ part parent    ".avrex"
 #------------------------------------------------------------
 
 part parent "m88"
-    id               = "lgt8f88p";
-    desc             = "LGT8F88P";
-    signature        = 0x1e 0x93 0x0f;
+    desc                   = "LGT8F88P";
+    id                     = "lgt8f88p";
+    signature              = 0x1e 0x93 0x0f;
+;
 
-    ocdrev              = 1;
-  ;
+#------------------------------------------------------------
+# LGT8F168P
+#------------------------------------------------------------
 
 part parent "m168"
-    id              = "lgt8f168p";
-    desc            = "LGT8F168P";
-    signature       = 0x1e 0x94 0x0b;
-
-    ocdrev              = 1;
+    desc                   = "LGT8F168P";
+    id                     = "lgt8f168p";
+    signature              = 0x1e 0x94 0x0b;
 ;
 
+#------------------------------------------------------------
+# LGT8F328P
+#------------------------------------------------------------
+
 part parent "m328"
-    id      = "lgt8f328p";
-    desc    = "LGT8F328P";
-    signature   = 0x1e 0x95 0x0F;
-
-    ocdrev              = 1;
+    desc                   = "LGT8F328P";
+    id                     = "lgt8f328p";
+    signature              = 0x1e 0x95 0x0f;
 ;
diff --git a/src/developer_opts.c b/src/developer_opts.c
index b2255281..c8aa903c 100644
--- a/src/developer_opts.c
+++ b/src/developer_opts.c
@@ -53,6 +53,29 @@
 #include "developer_opts.h"
 #include "developer_opts_private.h"
 
+  // Inject part parameters into a semi-automated rewrite of avrdude.conf
+  //  - Add entries to the tables below; they get written on -p*/i
+  //  - Use the output in a new avrdude.conf
+  //  - Output again with -p* (no /i) and use that for final avrdude.conf
+  //  - Remove entries from below tables
+
+static struct {
+  const char *mcu, *var, *value;
+} ptinj[] = {
+  // Add triples here, eg, {"ATmega328P", "mcuid", "999"},
+ {NULL, NULL, NULL},
+};
+
+static struct {
+  const char *mcu, *mem, *var, *value;
+} meminj[] = {
+  // Add quadruples here, eg, {"ATmega328P", "flash", "page_size", "128"},
+  {NULL, NULL, NULL, NULL},
+};
+
+
+
+
 // Return 0 if op code would encode (essentially) the same SPI command
 static int opcodecmp(const OPCODE *op1, const OPCODE *op2, int opnum) {
   char *opstr1, *opstr2, *p;
@@ -308,7 +331,7 @@ static int dev_part_strct_entry(bool tsv,               // Print as spreadsheet?
   } else {                      // Grammar conform
     int indent = col2 && strcmp(col2, "part");
     dev_cout(comms, n, 0, 0); // Print comments before the line
-    dev_info("%*s%-*s = %s;", indent? 8: 4, "", indent? 15: 19, n, c);
+    dev_info("%*s%-*s = %s;", indent? 8: 4, "", indent? 18: 22, n, c);
     dev_cout(comms, n, 1, 1);  // Print comments on rhs
   }
 
@@ -338,14 +361,14 @@ static void dev_stack_out(bool tsv, const AVRPART *p, const char *name, const un
     dev_info(".pt\t%s\t%s\t", p->desc, name);
   else {
     dev_cout(p->comments, name, 0, 0);
-    dev_info("    %-19s =%s", name, ns <=8? " ": "");
+    dev_info("    %-22s =%s", name, ns <=8? " ": "");
   }
 
   if(ns <= 0)
     dev_info(tsv? "NULL\n": "NULL;");
   else
     for(int i=0; i<ns; i++)
-      dev_info("%s0x%02x%s", !tsv && ns > 8 && i%8 == 0? "\n        ": "", stack[i], i+1<ns? ", ": tsv? "\n": ";");
+      dev_info("%s0x%02x%s", !tsv && ns > 8 && i%8 == 0? "\n        ": " ", stack[i], i+1<ns? ",": tsv? "\n": ";");
 
   dev_cout(p->comments, name, 1, 1);
 }
@@ -525,7 +548,7 @@ static void dev_part_raw(const AVRPART *part) {
 }
 
 
-static void dev_part_strct(const AVRPART *p, bool tsv, const AVRPART *base) {
+static void dev_part_strct(const AVRPART *p, bool tsv, const AVRPART *base, bool injct) {
   char *descstr = cfg_escape(p->desc);
   COMMENT *cp;
 
@@ -690,6 +713,13 @@ static void dev_part_strct(const AVRPART *p, bool tsv, const AVRPART *base) {
       if(!bm || opcodecmp(bm->op[i], m->op[i], i))
         dev_part_strct_entry(tsv, ".ptmmop", p->desc, m->desc, opcodename(i), opcode2str(m->op[i], i, !tsv), m->comments);
 
+    if(injct)
+      for(size_t i=0; i<sizeof meminj/sizeof*meminj; i++)
+        if(meminj[i].mcu)
+          if(strcmp(meminj[i].mcu, p->desc) == 0 && strcmp(meminj[i].mem, m->desc) == 0)
+            dev_part_strct_entry(tsv, ".ptmm", p->desc, m->desc,
+              meminj[i].var, cfg_strdup("meminj", meminj[i].value), NULL);
+
     if(!tsv) {
       dev_cout(m->comments, ";", 0, 0);
       dev_info("    ;\n");
@@ -706,6 +736,13 @@ static void dev_part_strct(const AVRPART *p, bool tsv, const AVRPART *base) {
     }
   }
 
+  if(injct)
+    for(size_t i=0; i<sizeof ptinj/sizeof*ptinj; i++)
+      if(ptinj[i].mcu)
+        if(strcmp(ptinj[i].mcu, p->desc) == 0)
+          dev_part_strct_entry(tsv, ".pt", p->desc, NULL,
+            ptinj[i].var, cfg_strdup("ptinj", ptinj[i].value), NULL);
+
   if(!tsv) {
     dev_cout(p->comments, ";", 0, 0);
     dev_info(";\n");
@@ -742,7 +779,7 @@ void dev_output_pgm_part(int dev_opt_c, char *programmer, int dev_opt_p, char *p
 
 // -p */[dASsrcow*t]
 void dev_output_part_defs(char *partdesc) {
-  bool cmdok, waits, opspi, descs, astrc, strct, cmpst, raw, all, tsv;
+  bool cmdok, waits, opspi, descs, astrc, strct, cmpst, injct, raw, all, tsv;
   char *flags;
   int nprinted;
   AVRPART *nullpart = avr_new_part();
@@ -753,7 +790,7 @@ void dev_output_part_defs(char *partdesc) {
   if(!flags && !strcmp(partdesc, "*")) // Treat -p * as if it was -p */s
     flags = "s";
 
-  if(!*flags || !strchr("cdoASsrw*t", *flags)) {
+  if(!*flags || !strchr("cdoASsrw*ti", *flags)) {
     dev_info("%s: flags for developer option -p <wildcard>/<flags> not recognised\n", progname);
     dev_info(
       "Wildcard examples (these need protecting in the shell through quoting):\n"
@@ -772,6 +809,7 @@ void dev_output_part_defs(char *partdesc) {
       "       w  wd_... constants for ISP parts\n"
       "       *  all of the above except s and S\n"
       "       t  use tab separated values as much as possible\n"
+      "       i  inject assignments from source code table\n"
       "Examples:\n"
       "  $ avrdude -p ATmega328P/s\n"
       "  $ avrdude -p m328*/st | grep chip_erase_delay\n"
@@ -798,6 +836,7 @@ void dev_output_part_defs(char *partdesc) {
   strct = !!strchr(flags, 'S');
   cmpst = !!strchr(flags, 's');
   tsv   = !!strchr(flags, 't');
+  injct = !!strchr(flags, 'i');
 
 
   // Go through all memories and add them to the memory order list
@@ -834,7 +873,8 @@ void dev_output_part_defs(char *partdesc) {
       dev_part_strct(p, tsv,
         astrc? NULL:
         strct? nullpart:
-        p->parent_id && *p->parent_id? locate_part(part_list, p->parent_id): nullpart);
+        p->parent_id && *p->parent_id? locate_part(part_list, p->parent_id): nullpart,
+        injct);
 
     if(raw)
       dev_part_raw(p);
@@ -1129,7 +1169,7 @@ static void dev_pgm_strct(const PROGRAMMER *pgm, bool tsv, const PROGRAMMER *bas
     dev_info(".prog\t%s\tid\t", id);
   else {
     dev_cout(pgm->comments, "id", 0, 0);
-    dev_info("    %-19s = ", "id");
+    dev_info("    %-22s = ", "id");
   }
   for(firstid=1, ln=lfirst(pgm->id); ln; ln=lnext(ln)) {
     if(!firstid)
@@ -1147,7 +1187,8 @@ static void dev_pgm_strct(const PROGRAMMER *pgm, bool tsv, const PROGRAMMER *bas
   }
 
   _if_pgmout_str(strcmp, cfg_escape(pgm->desc), desc);
-  _pgmout_fmt("type", "\"%s\"", locate_programmer_type_id(pgm->initpgm));
+  if(!base || base->initpgm != pgm->initpgm)
+    _pgmout_fmt("type", "\"%s\"", locate_programmer_type_id(pgm->initpgm));
   if(!base || base->conntype != pgm->conntype)
     _pgmout_fmt("connection_type", "%s", connstr(pgm->conntype));
   _if_pgmout(intcmp, "%d", baudrate);
@@ -1159,7 +1200,7 @@ static void dev_pgm_strct(const PROGRAMMER *pgm, bool tsv, const PROGRAMMER *bas
       dev_info(".prog\t%s\tusbpid\t", id);
     else {
       dev_cout(pgm->comments, "usbpid", 0, 0);
-      dev_info("    %-19s = ", "usbpid");
+      dev_info("    %-22s = ", "usbpid");
     }
     for(firstid=1, ln=lfirst(pgm->usbpid); ln; ln=lnext(ln)) {
       if(!firstid)
@@ -1182,10 +1223,13 @@ static void dev_pgm_strct(const PROGRAMMER *pgm, bool tsv, const PROGRAMMER *bas
 
   for(int i=0; i<N_PINS; i++) {
     char *str = pins_to_strdup(pgm->pin+i);
-    if(str && *str)
+    char *bstr = base? pins_to_strdup(base->pin+i): NULL;
+    if(!base || strcmp(bstr, str))
       _pgmout_fmt(avr_pin_lcname(i), "%s", str);
-    if(str)
-      free(str);
+
+    free(str);
+    if(bstr)
+      free(bstr);
   }
 
   if(pgm->hvupdi_support && lfirst(pgm->hvupdi_support)) {
@@ -1193,7 +1237,7 @@ static void dev_pgm_strct(const PROGRAMMER *pgm, bool tsv, const PROGRAMMER *bas
       dev_info(".prog\t%s\thvupdu_support\t", id);
     else {
       dev_cout(pgm->comments, "hvupdi_support", 0, 0);
-      dev_info("    %-19s = ", "hvupdi_support");
+      dev_info("    %-22s = ", "hvupdi_support");
     }
     for(firstid=1, ln=lfirst(pgm->hvupdi_support); ln; ln=lnext(ln)) {
       if(!firstid)
diff --git a/src/pindefs.c b/src/pindefs.c
index 7127f539..47c54d2c 100644
--- a/src/pindefs.c
+++ b/src/pindefs.c
@@ -350,7 +350,7 @@ const char * pins_to_str(const struct pindef_t * const pindef) {
  * This function returns a string of defined pins, eg, ~1, 2, ~4, ~5, 7 or ""
  *
  * @param[in] pindef the pin definition for which we want the string representation
- * @returns a pointer to a string, which was created by strdup
+ * @returns a pointer to a string, which was created by cfg_strdup()
  */
 char *pins_to_strdup(const struct pindef_t * const pindef) {
   char buf[6*(PIN_MAX+1)], *p = buf;