Sunday, February 14, 2016

To save tires drive under 35

It's interesting to look at the rationing that took place during world war 2. Is this trip really necessary?




http://www.ameshistory.org/exhibits/events/rationing.htm

Xfinity DC50Xu keeps going nonresponsive

So I leave the Pace DC50Xu DTA overnight, and in the morning it won't respond to the remote.

I figured out that if I hit the red power button in the upper left and change the channel while the OSD is on, that it becomes responsive again.

That is the worst designed piece of equipment ever...

Xfinity rolled out an online TV guide function and it's been horribly irritating to me. Now the keypad has a different meaning than 123456789. While the OSD is active, 2 4 6 8 are up left right and down, with 5 being OK. The most frustrating thing is that I want to type another number immediately but it thinks I want to move the cursor instead.

If only the INFO button would take you out of the OSD. It'd be nice to use the INFO button as an "escape key".

The channel LAST button will take you out of the OSD, but it tells you what the current channel is and leaves the OSD open for a few more seconds.

The 5 second OSD delay just destroys the user's "illusion of control". Looking closer in the setup menu, you can disable the "Smart Bar" OSD or set the delay to 5, 7 or 10 seconds.

Observing the interrupt flags

In the mame debugger I can see most of the cpu registers, but IRR (interrupt flags) isn't visible. However, it does show up as uPD7810/:centronics:ap2000:maincpu/0/m_irr in a memory view window.

If I'm careful I can just see it set the INTAD (INTFAD = 0x0100) flag before it clears it with SKIT FAD.

I set a breakpoint at 10F with "bpset 10F" and then step about 55 instructions or so with "s 55".







Watching the memory change

It's neat to open up memory windows in the mame debugger and see things changing in real time.

echo 'Memory 8000-9000 input buffer' > lp0
echo 'also see input at $9A79' > lp0

Saturday, February 13, 2016

Trying to echo null characters

I was trying to send some null characters \x00 to the ap2000 using echo, but it didn't work.

The idea here was to generate a small amount of graphics with ESC * 0 (single density graphics) specifying 4 columns of graphics.

The escape codes would be ESC * 0 \x04 \x00 followed by 4 bytes of dummy graphics \xFF \x00 \xFF \x00.

I could not figure out what was wrong...until I realized that hex 00 would be interpreted as "nothing".

Why? C strings are terminated when there's a \x00 character.

bash escape codes with $'\x00' disappear:

echo $'\e*0\x01\x001234' | hexdump -C
00000000 1b 2a 30 01 0a |.*0..|
00000005

but if I use echo -e all of the characters come through.

echo -e '\e*0\x01\x001234' | hexdump -C
00000000 1b 2a 30 01 00 31 32 33 34 0a |.*0..1234.|
0000000a

I also used printf and it was happy to emit \x00.

printf '\x1b*0\x04\x00\xff\x00\xff\x00' > lp0

printf '\x1bx0TEST\x1bx1TEST\x1bx0TEST\x1bx1TEST\n' > lp0

Strings strings strings


strings -t x roms/ap2k.ic3c | less

(the -t x gives you the hexadecimal offset in the file)

38b PS2414
403 Data Dump Mode
553 NLQ H /Adjust=
565 Draft H /Adjust=
578 NLQ L /Adjust=
58a Draft L /Adjust=

9d5 Character Pitch
9e5 12 CPI
9ec 10 CPI
9f9 Shape of Zero
a07 0 (Slashed)
a13 0 (Unslashed)
...
bbc Valid
bc2 Depend on I/F
bd6 Draft Print Speed
be8 Normal
bef High
e0e This is the first line.
e26 This is line


And so for a given string, let's see if we can find the offset in the disassembly:


38b PS2414

cat ap2k_disasm | grep '038B'
00000353: 34 8B 03 LXI HL,$038B

403 Data Dump Mode

cat ap2k_disasm | grep '0403'
00000398: 34 03 04 LXI HL,$0403
0000104E: 34 03 04 LXI HL,$0403

553 NLQ H /Adjust=
565 Draft H /Adjust=

cat ap2k_disasm | grep '0553'
000004F2: 34 53 05 LXI HL,$0553
cat ap2k_disasm | grep '0565'
000004EF: 34 65 05 LXI HL,$0565

e0e This is the first line.
e26 This is line

cat ap2k_disasm | grep '0E0E'
00000DC7: 34 0E 0E LXI HL,$0E0E
cat ap2k_disasm | grep '0E26'
00000DF0: 34 26 0E LXI HL,$0E26



Friday, February 12, 2016

I just want a simple calendar, man

I liked the way Word 97 and Publisher 97 would make you very simple black and white monthly calendars. So I'm using Word 2013 and it wants to do these fancy looking calendars but I just want it plain jane.

I spent a lot of time trying to eliminate the background picture embedded in the headers and footers, extraneous stuff like "Notes:" and I even ended up with "type text here" on the printout.

It's not really a step forward...sometimes simple is better.