Jump to content
intvnut

jzintv Christmas update

Recommended Posts

My last update to jzIntv was over 7 months ago. That doesn't mean I haven't touched jzIntv. Au contraire! I've added support for ECS cassette and printer, I've extended the debugger, I've added "raw input" mode for controllers such as the Retronic USB, and so on. See below for full details.

 

Find it here: http://spatula-city.org/~im14u2c/intv/

 

________

Release notes for 2018-12-25.
Updates since 2018-05-09.

---------------
 New features:
---------------

*  Added Carl Mueller's IDIV, JDIV, ISQRT.  This was an oversight from long
   ago, and now these are added under jzintv/examples/library/.

*  Raw-bits mode for controller adaptors such as Retronic that can provide
   raw input bits from native controllers.  See PDxx_BIT_x in
   jzintv/doc/jzintv/kbdhackfile.txt & jzintv/doc/jzintv/retronic-usb-raw.kbd.

*  Debugger features:  (see jzintv/doc/debugger.txt for updated docs)

   b?     lists active breakpoints
   t?     lists active tracepoints
   w?     lists active write-watches
   @?     lists active read-watches
   ??     outputs the debugger's current status

*  Add "button" mode to support analog joysticks that have analog buttons
   that report themselves as analog axes.

*  Add support for saving/loading ECS cassettes and printing to the ECS printer.

----------
 Changes:
----------

*  Updated the NTSC and PAL palettes based on experiments with TV capture
   cards and eyeballing several games.  (Congo Bongo is a tough one to nail.)
   Also, NTSC and PAL now have different palettes.

*  macOS builds are now 64-bit only, driven by recent changes in macOS.
   jzIntv should still run with OSX 10.7.x or later.

*  A raw semicolon ';' in a kbdhackfile now introduces a comment.  To bind
   the semicolon event, use the word SEMICOLON.

-------------------------
 Cleanups and bug fixes:
-------------------------

*  Fix "voice_compat" in internal ROM database.  It accidentally requested
   ECS rather than Intellivoice for known voice games.

*  Myriad fixes to allow compiling with MSVC, along with an MSVC Makefile.

*  Myriad fixes to allow compiling with Clang from Xcode.

*  Many waves of 'const' correctness, and occasional 'restrict' qualifiers.

*  Many 'sanitizer' directed fixes.

*  Many minor memory leaks cleaned up.

*  Fix event scanning to actually allow <5ms granularity.  Deepened the
   event queue as well.

*  Fix JSx_BTN_28, which has been b0rken for almost 20 years.

*  Fix the spelling of ecs_compat, version, publisher in metadata code.

*  Improve handling of build/release dates in metadata.

*  Fix HH:MM parsing for UTC offsets in metadata.

*  Remove C++14-isms; restrict to C++11 as baseline.

*  Use modern C++ style casts and 'nullptr' rather than 0/NULL in C++ code.

*  Fix include guards to not use _CAPS, but rather CAPS_.

*  Fall back to ECS-disabled if game sets ecs_compat to "enhanced" but no
   ecs.bin is available.

*  Fix documentation for -J flag in --help info.

*  Only print "diagonal bias" for 4diag mode in joystick status output.


-------
 Misc:
-------

*  Experimental Emscripten build.

*  Experimental Termux build.
  • Like 10

Share this post


Link to post
Share on other sites

This year I will set up JZINTV up on my MacBook. My only New Years resolution!

  • Like 3

Share this post


Link to post
Share on other sites

Sweet!! The ability to CLOD and CSAV in Basic!!!

 

Awhile ago, Joe posted the way to load Road Race. Here is the source code: roadrace.txt

 

And here is the file that can be loaded with the CLOD command: ecs_tape_ROAD.txt (file should reside in the same folder as jzintv.exe and the extension needs to be renamed from TXT to ECS as the ecs extension could not be posted)

 

After loading Basic, type : CLOD ROAD

 

You will see SET. Press the disc of the joystick. You will then see GO. Press the disc of the joystick. The game takes around 15 seconds to load. Once you see the prompt flashing again, type RUN then hit the Enter key.

You move the car from side to side by hitting on the keypad 4 (left) 5 (stop moving) and 6 (right).

 

 

Share this post


Link to post
Share on other sites

FWIW, you can use these flags to change the names jzIntv uses for reading files. For example, you can use "--ecs-tape=ecs_tape#.txt" to use the 'txt' extension instead.

.

            --ecs-tape=path       Template for ECS tape file names.
                                  An '#' in the name expands to the 4 char
                                  CSAV/CLOD name preceded by an '_', if
                                  provided.

            --ecs-printer=path    File to append ECS printer output to.

.

Currently, I don't have a way to "type" a text file into jzIntv from a file. That would make it easier to develop ECS BASIC programs with an external editor. I've also thought about writing a tokenizer and detokenizer, to both create the binary files the ECS needs from text files and to decode the binary files to text files, but I wasn't sure how much demand there would be for such utilities.

Share this post


Link to post
Share on other sites

Thank you for the tip!

 

For the Coleco Adam Basic, I copy from my Windows editor and paste it into the emulator and the emulator acts as if I was typing it in. jzIntv does not allow pasting into the emulator. Is this something easy to enable in the emulator?

Share this post


Link to post
Share on other sites

Thank you for the tip!

 

For the Coleco Adam Basic, I copy from my Windows editor and paste it into the emulator and the emulator acts as if I was typing it in. jzIntv does not allow pasting into the emulator. Is this something easy to enable in the emulator?

 

I don't know of a way to do that. jzIntv uses SDL as its underlying abstraction for input, and so doesn't know anything about clipboards, cut'n'paste, and so on. I would need to write a native Windows backend, probably, to see the Windows clipboard.

 

SDL makes jzIntv more portable, but it also brings me to the lowest common denominator across all the platforms SDL is on.

 

If you have a pointer on interfacing SDL 1 w/ the clipboard, I can see about hooking that up.

Share this post


Link to post
Share on other sites

Rather than interacting with the clipboard maybe it would be easier to have jzintv read the contents of a text file and dump it into ecs basic.

 

------------------

There are windows utilities that simulate "typing" the contents of the clipboard or other specified text. They work with some emulators but not others.

Share this post


Link to post
Share on other sites

Thank you mr_me. I was incorrect in saying copying and pasting. I wrote an AutoKey script to take the content of the clipboard and "type" the clipboard content into the CoolCV and AdamEM (Colecovision) emulators. I updated the script to recognize the jzIntv emulator but it will not type the content in. Maybe this has to do with the way the emulator handles the ability to switch keyboard layouts? (controller vs keyboard / F5, F6, F7) I tried starting the emulator with -m3 for the ECS keyboard input mode but that did not work.

 

I am more than happy to share my AutoKey script but the effort to get this working may not be worth Intvnut's time as only a couple people would take the time to write ECS Basic programs; me being one. We have his perl script if we really want to get a text file content loaded in.

Share this post


Link to post
Share on other sites

I was doing some testing with "event_diag.rom". It looks like jzintv is receiving an event input for each simulated key press but they all come up as "unknown". I am testing with a utility called "Auto Typer" by Murgee.

Share this post


Link to post
Share on other sites

Good call on using the event diag rom. I had my script pass the characters "ab" to the emulator and rom shows that the script tool passed the characters fine. (See image below) Perhaps this is a Basic issue that is not capturing the characters?

 

I also tried running the hand controller test and passing the keypad values but that rom did not give me the response I was expecting. On the keyboard, when I press 1, it shows as me pressing 1 on the keypad. When I passed characters, the rom did respond as if I was pressing the top side button.

 

 

post-6868-0-08324100-1546623492_thumb.jpg

Share this post


Link to post
Share on other sites

If you're in map 3 and the ECS still isn't seeing the keyboard presses, then it's probably just typing too fast. The ECS keyboard scanning loop scans the keyboard at a frustratingly slow rate. I find myself out-typing it most of the time because I don't hold the keys down long enough to be seen by its scanning loop.

 

I remember Carl published a patch for 'ecs.bin' to use with INTVPC. The patch replaced the keyscanning loop with something tighter and more flexible, and allowed access to characters that weren't on the original ECS keyboard. I haven't looked at what's in that patch though. It may be possible to use it with jzIntv.

Share this post


Link to post
Share on other sites

You are awesome intvnut!!! Holding the key was the issue in ECS Basic. My script tool is working but it is not passing the RETURN correctly so all the code ends up on one line. I should be able to get this fixed. I will post more shortly. Thank you again!

Share this post


Link to post
Share on other sites

ECS Basic is finicky on keyboard input. My tool is working but keys may get dropped. I am getting to the point that the "paste" is going very slowly.

 

Does anyone know how to apply the ECSPATCH.BIN or use it? I could not find any documentation on it.

Share this post


Link to post
Share on other sites

I have my scripting tool working fairly well. It is not fast at typing in the code but it seems to type it all in. Attached is the ZIP file that contains the executable and a readme file.

 

Basically:

- run the Adam_Paste.exe program

- run jzIntv with a ROM that allows you to switch to BASIC

- after in BASIC, press the F7 key to switch keyboard layouts

- in Windows, run a text editor like Notepad

- type in your program (all the code needs to be in lower case), highlight the code you want to paste in

- press CNTRL-B to activate the tool

- Watch your code as it gets entered into jzIntv

 

Adam_Paste.zip

 

The executable is called Adam_Paste because I originally did this for the Colecovision Adam emulators. This works for jzIntv, CoolCV, and AdamEm

Edited by intvdave

Share this post


Link to post
Share on other sites

I just noticed an issue with the "copy/paste" tool. To enter the plus sign (+) in ECS Basic, one would type SHIFT-5. On modern keyboards, this is the PERCENT sign (%).

 

If we want to say F=F+1, we would write this in Notepad as: f=f%1

 

Notice two things; lower case and using % instead of +

 

Other issues would be with the 4 characters tied to the arrows keys on the ECS keyboard. To fix these, we may need to add binds to the hackfile.

Share this post


Link to post
Share on other sites

I remember Carl published a patch for 'ecs.bin' to use with INTVPC. The patch replaced the keyscanning loop with something tighter and more flexible, and allowed access to characters that weren't on the original ECS keyboard. I haven't looked at what's in that patch though. It may be possible to use it with jzIntv.

 

It it possible to use the hackfile to re-map keys? Example: pressing SHIFT-5 will be a percent sign instead of the plus sign.

 

Thanks!

Share this post


Link to post
Share on other sites

 

It it possible to use the hackfile to re-map keys? Example: pressing SHIFT-5 will be a percent sign instead of the plus sign.

 

jzIntv can't really change the keyboard layout of the ECS keyboard without patching the ECS's keyboard scanning table. I took a brief look at Carl's ECSPATCH.BIN, and I didn't quite make sense of all of it. I think it adds a row to the keyboard scanning table, and jzIntv isn't set up for that at the moment.

 

jzIntv does add some actions to press "shifted" ECS keys, though:

.

KEYB_EQUAL
KEYB_QUOTE
KEYB_HASH
KEYB_DOLLAR
KEYB_PLUS
KEYB_MINUS
KEYB_SLASH
KEYB_STAR
KEYB_LPAREN
KEYB_RPAREN
KEYB_CARET
KEYB_PCT
KEYB_SQUOTE
KEYB_QUEST
KEYB_COLON
KEYB_GREATER
KEYB_LESS

.

I believe you should be able to add these actions to "COMBOs" that trigger the appropriate events. Something like:

.

ADD_COMBO 0 LSHIFT 5
COMBO0 KEYB_PCT

.

It's a bit circuitous, but I think that should work.

 

I'm working on a kbdhackfile now. Also... I discovered there are some minor bugs in those "shifted" mappings—some of them are wrong. I'll keep you posted.

Share this post


Link to post
Share on other sites

OK, the following kbdhackfile should improve keyboard input for the ECS, allowing "shift-5" to give a % symbol, for example. It's build for the current, buggy release of jzIntv, with the affected lines commented. I somehow rotated three of the labels around in the internal action table, and so... mea culpa.

.

MAP 2
  
EQUALS KEYB_EQUAL
ADD_COMBO 0 LSHIFT EQUALS
ADD_COMBO 1 RSHIFT EQUALS
COMBO0 KEYB_PLUS
COMBO1 KEYB_PLUS

;QUOTE KEYB_SQUOTE
QUOTE KEYB_QUEST ; buggy jzintv
ADD_COMBO 2 LSHIFT QUOTE
ADD_COMBO 3 RSHIFT QUOTE
COMBO2 KEYB_QUOTE
COMBO3 KEYB_QUOTE
QUOTEDBL KEYB_QUOTE

MINUS KEYB_MINUS

ADD_COMBO 4 LSHIFT 5
ADD_COMBO 5 RSHIFT 5
;COMBO4 KEYB_PCT
;COMBO5 KEYB_PCT
COMBO4 KEYB_SQUOTE ; buggy jzintv
COMBO5 KEYB_SQUOTE ; buggy jzintv

SLASH KEYB_SLASH
ADD_COMBO 6 LSHIFT /
ADD_COMBO 7 RSHIFT /
;COMBO6 KEYB_QUEST
;COMBO7 KEYB_QUEST
COMBO6 KEYB_PCT ; buggy jzintv
COMBO7 KEYB_PCT ; buggy jzintv

CARET KEYB_CARET
ADD_COMBO 8 LSHIFT 6
ADD_COMBO 9 RSHIFT 6
COMBO8 KEYB_CARET
COMBO9 KEYB_CARET

.

The commented out lines are what should be used once I fix jzIntv. The lines with the comment "; buggy jzintv" indicate what needs to be used with the current release of jzIntv.

 

Got it?

Share this post


Link to post
Share on other sites

Not to go off on a tangent here, but are there any future plans for adding in filters like "CRT" or "scan lines" to emulate the effects? I know JzIntv was always built to be a top-notch true emulator of the Iintellivision core, which it is, but because it's also heavily used in Retropie and other forms of emulation, it could definitely benefit from these filters. Leaving it open for the user to create and add-in their own filters would be great as well. Many other true system emulators use them as well... Stella, CC64, Vice-64, just to name a few I've seen it in.

 

Thanks... PS... loving the new color palette. After some tweaks to my LED screen, it looks amazing and exactly as I remember it on a CRT. Very bright and vivid, not desaturated as it was before this new update. Thanks for that!

 

JR

Edited by IMBerzerk

Share this post


Link to post
Share on other sites

 

I took a brief look at Carl's ECSPATCH.BIN, and I didn't quite make sense of all of it. I think it adds a row to the keyboard scanning table, and jzIntv isn't set up for that at the moment.

 

I patched ECS.BIN with ECSPATCH.BIN. I now understand why it did not work :)

 

You hackfile combos work BEAUTIFULLY!!! THANK YOU!!!! All the keys now "copy/paste" from notepad into jzIntv correctly

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...