dtv2ser 0.4 released!

LTNS! Yes, indeed… it took quite a while to finish this new version, but its really worth the wait!

dtv2ser 0.4 now supports all new features of dtvtrans 1.0 including init after reset, BASIC loading, saving and RUN. Furthermore, full flash support was added!

If you are impatient then just head over to the dtv2ser homepage and download your copy.

What’s new in this version? Let me explain it with a short walk through:

Basics

After flashing the new 0.4 firmware, you launch the dtv2sertrans client as usual. On Macs you can see some kind of auto-detection of the serial port:

> dtv2sertrans
dtv2sertrans version 0.4, dtv2ser device version 0.4
dtvtrans server NOT responding!!

Ah… no dtvtrans server is running on my DTV. So let’s reset the DTV (and enter dtvtrans via dtvboot):

> dtv2sertrans reset
dtv2sertrans version 0.4, dtv2ser device version 0.4
  resetting dtv... enter dtvtrans
  initializing full BASIC

That’s new: BASIC and KERNAL is fully initialized after a reset, so BASIC commands like load, save, run will work. Querying dtv2sertrans again:

> dtv2sertrans
dtv2sertrans version 0.4, dtv2ser device version 0.4
dtvtrans server version 1.0 (DTVBOOT 1.2 via joy2 in ROM)

Now the server is detected and reports the version, the port and if it resides in RAM or ROM.
You can query more info with:

> dtv2sertrans server info
  dtvtrans revision: 1.0
    implementation:  DTVBOOT 1.2
    port:            joy2
    mode:            ROM
    range:           0x1f8000-0x1fb3db

dtvtrans 1.0 Features

Let’s check out the new dtvtrans 1.0 features that support BASIC commands and simplify loading, running programs:

> dtv2sertrans reset + load mygame.prg + run

Reset + init BASIC, load a program via dtv2ser and run it… That’s easy!

> dtv2sertrans save myprog.prg

This call saves the current program like the BASIC SAVE does only via dtv2ser…

Whats quite handy is a fill commando to simple write a value (e.g. 0) to a range of memory:

> dtv2sertrans fill 0x18000-0x20000 0

Flash Commands

And now flashing! But first a Warning: Flashing operation can destroy your DTV. So you have to be sure what you are doing. In this guide I’ll warn you, if something dangerous will happen. So you can decide if you dare it 😉

First let’s see if your dtv2ser device can handle sys calls:

> dtv2sertrans diag sys
dtv2sertrans version 0.4, dtv2ser device version 0.4
  loading servlet '/Users/chris/Projects/svn/dtv2ser/servlet/diag_srv.prg'
  testing 25 sys calls with wait and return value fetch
  * 0/25: testing sys call with 84 frames duration
  duration: 00:01.823
...
  * 24/25: testing sys call with 51 frames duration
  duration: 00:01.219
  * 25/25: all calls passed OK!

Ok, sys call test passed without errors… So the flash commands that are called via sys should work.
Now let’s ensure that the dtvtrans server program is runnning from RAM and not from ROM!

> dtv2sertrans server ram
dtv2sertrans version 0.4, dtv2ser device version 0.4
  resetting...
  is alive?
  initializing BASIC
  query dtvtrans server
  dtvtrans running in ROM. loading RAM version
  loading prg file '/Users/chris/Projects/svn/dtv2ser/contrib/dtvtrans_joy2.prg': 2548/0x0009f4 bytes, start: 0x0801
  sending program to DTV
    speed:  client=16.48 server=16.59 (kbyte/s)
    time:   00:00.191 for 2548/0x0009f4 bytes
  run program
  query dtvtrans server
  dtvtrans is now in RAM. Good!
    implementation: DTVTRANS 1.0

Fine, server now running from RAM… We are ready for flashing!
Let’s check the type of the flash ROM found in the DTV:

> dtv2sertrans flash id
dtv2sertrans version 0.4, dtv2ser device version 0.4
  flash type: SST39VF1681

Now let’s have a look a the flash usage:

> dtv2sertrans flash map
dtv2sertrans version 0.4, dtv2ser device version 0.4
  generating flash map on DTV
  duration: 00:04.731
          flash ROM map ('.'=empty '*'=filled)
          0xxx 1xxx 2xxx 3xxx 4xxx 5xxx 6xxx 7xxx 8xxx 9xxx Axxx Bxxx Cxxx Dxxx Exxx Fxxx
  000000: .... **** .... .... .... .... .... .... .... **** **** **** .... **** **** **** 
  010000: **** ***. .... .... **** **** **** **** **** **** **** **** **** **** **** **** 
  020000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  030000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  040000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  050000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  060000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  070000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  080000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  090000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  0a0000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  0b0000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  0c0000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  0d0000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  0e0000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  0f0000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  100000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  110000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  120000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  130000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  140000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  150000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  160000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  170000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  180000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  190000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  1a0000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  1b0000: **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** 
  1c0000: **** **** **** **** **** **** **** **** **** **** **** **** **** **.. .... .... 
  1d0000: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... 
  1e0000: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... 
  1f0000: .... .... .... .... .... .... .... .... **** **** **** **** **** **** **** **** 

The first step in flashing is to store the current contents of the flash ROM in a file:

> dtv2sertrans flash dump orig_rom.bin
dtv2sertrans version 0.4, dtv2ser device version 0.4
  dumping flash ROM to file 'orig_rom.bin'
    speed:  client=17.95 server=17.96 (kbyte/s)
    time:   01:54.116 for 2097152/0x200000 bytes
  saving raw file 'orig_rom.bin': 2097152/0x200000 bytes

Now, create or alter the ROM file (e.g. use tools like DTVFSEdit).
If the new ROM is ready, you can flash it back to your DTV with (first in dummy mode w/o flashing):

> dtv2sertrans flash sync new_rom.bin
dtv2sertrans version 0.4, dtv2ser device version 0.4
  loading raw file 'new_rom.bin': 2097152/0x200000 bytes
  syncing flash ROM
          flash ROM map ('*'=flash '#'=erase+flash)
          0xxx 1xxx 2xxx 3xxx 4xxx 5xxx 6xxx 7xxx 8xxx 9xxx Axxx Bxxx Cxxx Dxxx Exxx Fxxx
  010000: #... ..#. .... .... .... .... .... .... .... .... .... .... .... .... .... .... 
  020000: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... 
...

If you add the -f switch then a real flash operation is performed. This will alter your DTV! So make sure the image is correct:

> dtv2sertrans flash sync -f new_rom.img
...

Ok, that’s it! This was a short walk through for all the new dtv2ser 0.4 features. But there are many more things to discover. Just run dtv2sertrans -h to see more options…

Have Fun,
-chris

1 thought on “dtv2ser 0.4 released!

Leave a Reply to xADCancel reply