Good article from Your Spectrum magazine (1984) regarding methods of extending ZX Spectrum BASIC.
Here I will be posting anything I see any importance to me and things that I found or did and prefer not to forget anymore with some little hope that some of this shit will be any use for someone else.
Monday, November 21, 2016
Thursday, November 17, 2016
New features of Java Script
ECMAScript 6 new features:
http://es6-features.org/#Constants
ECMAScript 7 new deatures:
https://h3manth.com/new/blog/2015/es7-features/
http://es6-features.org/#Constants
ECMAScript 7 new deatures:
https://h3manth.com/new/blog/2015/es7-features/
Wednesday, November 16, 2016
Interface 1bis file not found error
Purchased Interface 1 bis for the ZX Spectrum.
There are plenty information about it and installing and preparing SD card on manufacturers site https://sites.google.com/site/interface1bis/
But I have encountered a problem - could not start it and was allways getting "file not found" error.
Did all steps described in troubleshooting video https://www.youtube.com/watch? v=QYHhWQyVWAU
Loaded OpSys from PC using LOAD command, program loads OK. But when I do NEW and then RUN I get "file not found" error.
Solution I found was that I had to repeat all prepare SD card steps, but additionally had to add comparability with Windows 8 (and run as administrator off course) option (I was running Windows 10) to LDCSetup.exe and later to the 'Prepare new card' utility.
So, In short - add Windows 8 compatibility to Interface 1 bis utilities.
There are plenty information about it and installing and preparing SD card on manufacturers site https://sites.google.com/site/interface1bis/
But I have encountered a problem - could not start it and was allways getting "file not found" error.
Did all steps described in troubleshooting video https://www.youtube.com/watch?
Loaded OpSys from PC using LOAD command, program loads OK. But when I do NEW and then RUN I get "file not found" error.
Solution I found was that I had to repeat all prepare SD card steps, but additionally had to add comparability with Windows 8 (and run as administrator off course) option (I was running Windows 10) to LDCSetup.exe and later to the 'Prepare new card' utility.
So, In short - add Windows 8 compatibility to Interface 1 bis utilities.
Some links for ZX Assemlby programming
Making games in ZX Spectrum assembly book ( russian lang.):
http://zxpress.ru/book.php?id=2
How to write ZX Spectrum games tutorial in English:
https://chuntey.wordpress.com/2012/12/18/how-to-write-zx-spectrum-games-chapter-1/
Spectrum ROM routines:
http://skoolkit.ca/disassemblies/rom/asm/2852.html
Z80 instruction set:
http://clrhome.org/table/
Group in FB dedicated for Z80 assembly programming:
https://www.facebook.com/groups/z80asm/
WOS forum link:
http://www.worldofspectrum.org/forums/categories/assembler
Another forum (ru):
http://zx-pk.ru/forums/14-programmirovanie.html
Some more books (ru):
http://vtrdos.ru/
http://zxpress.ru/book.php?id=2
How to write ZX Spectrum games tutorial in English:
https://chuntey.wordpress.com/2012/12/18/how-to-write-zx-spectrum-games-chapter-1/
Spectrum ROM routines:
http://skoolkit.ca/disassemblies/rom/asm/2852.html
Z80 instruction set:
http://clrhome.org/table/
https://www.facebook.com/groups/z80asm/
WOS forum link:
http://www.worldofspectrum.org/forums/categories/assembler
Another forum (ru):
http://zx-pk.ru/forums/14-programmirovanie.html
Some more books (ru):
http://vtrdos.ru/
Thursday, September 15, 2016
tmr.alarm not working on ESP12E 0.9.5 firmware
Tested that this sample was not working on dev board:
Checked firmware version (connected to ESPlorer and pressed reset):
ESP12E default NodeMCU 0.9.5 build 20150318 powered by Lua 5.1.4
Decided to update firmware. Found here that only 9.6 is available precompiled, later ones have to be costum built. Downloaded 9.6 files and uploaded them using ESP8266Flasher.exe
Checked firmware version then:
NodeMCU 0.9.6 build 20150704 powered by Lua 5.1.4
if not tmr.alarm(0, 5000, tmr.ALARM_SINGLE, function() print("hey there") end) then print("whoopsie") end
Checked firmware version (connected to ESPlorer and pressed reset):
ESP12E default NodeMCU 0.9.5 build 20150318 powered by Lua 5.1.4
Decided to update firmware. Found here that only 9.6 is available precompiled, later ones have to be costum built. Downloaded 9.6 files and uploaded them using ESP8266Flasher.exe
Checked firmware version then:
NodeMCU 0.9.6 build 20150704 powered by Lua 5.1.4
And tested this code sample:
if not tmr.alarm(0, 5000, tmr.ALARM_SINGLE, function() print("hey there") end) then print("whoopsie") end
It worked.
How to use Arduino IDE to program NodeMCU
1. Install the Arduino IDE from download section of arduino.cc website
2. Run Arduino IDE's arduino.exe
3. Arduino IDE >> File >> Preferences (Shourtcut is CTRL + COMMA)>> Settings tab >> on Additional Board Manager URL side type this >> and click ok.
This json object will bring necessary drivers for NodeMCU from the website esp8266.com to our Arduino IDE.
4. Arduino IDE >> Tools >> Board >> Boards Manager... >> Type = Contributed >> click on install (Or, search ESP8266 from the search bar)
5. Arduino IDE >> Tools >> Board >> NodeMCU 1.0 (ESP-12E MODULE)
Friday, September 9, 2016
Repairing ZX Spectrum Kempston joystick
As recently I started tinkering with ZX Spectrum hardware, tested one old joystick I had. Up and right positions did not work during the games. Tested port reading with one simple program:
10 LET x=IN 31
20 PRINT X
30 GOTO 10
There was no reading in up and right position.
I took apart joystick case and tested connection between PCB and plug - there was no connection for up and right wires.
So, just took now DB9 female connector and soldered it instead of an old one that I have just cut away.
10 LET x=IN 31
20 PRINT X
30 GOTO 10
There was no reading in up and right position.
I took apart joystick case and tested connection between PCB and plug - there was no connection for up and right wires.
So, just took now DB9 female connector and soldered it instead of an old one that I have just cut away.
Thursday, September 8, 2016
Fixing ZX Spectrum+ 48K (s/n S01-135100) video problems
So, this ZX spectrum was alive, but during testing with some games (for example game "Breakthrough"), I noticed strange video glitch in upper screen part:
My guess was it is not video RAM related, but probably RF module fault. First decided to change all electrolytic caps on the board and see if it helps - it did not. Picture was the same.
Then decided to check RF module - remove it and re solder all joints.
After putting it back I did a check with the same game. It helped a bit, but still I was not happy with the result. White line disappeared, but it seemed like upper part was washed away a bit:
And then it came to my mind a thought about why the hell I am using this RF module at all. I could just do a composite mod and that would definitely would solve all RF related video problems.
Composite mod as it is called, is just disconnecting power and signal wires that go from RF module - means disconnecting RF module. Then, in the RF module itself, disconnecting resistor from video output connector. And finally, connecting video output from board to video output connector in RF module using 100uF 10v electrolytic capacitor ( negative to the board, positive to video output ).
That`s it, did those changes, connected to TV`s composite video input and got clear picture without any RF glitches.
( Making this change i did not cut any wires etc. Just desoldered and moved away. Idea is that I could easily return RF module functionality i.e. undo this mod. )
My guess was it is not video RAM related, but probably RF module fault. First decided to change all electrolytic caps on the board and see if it helps - it did not. Picture was the same.
Then decided to check RF module - remove it and re solder all joints.
After putting it back I did a check with the same game. It helped a bit, but still I was not happy with the result. White line disappeared, but it seemed like upper part was washed away a bit:
And then it came to my mind a thought about why the hell I am using this RF module at all. I could just do a composite mod and that would definitely would solve all RF related video problems.
Composite mod as it is called, is just disconnecting power and signal wires that go from RF module - means disconnecting RF module. Then, in the RF module itself, disconnecting resistor from video output connector. And finally, connecting video output from board to video output connector in RF module using 100uF 10v electrolytic capacitor ( negative to the board, positive to video output ).
That`s it, did those changes, connected to TV`s composite video input and got clear picture without any RF glitches.
( Making this change i did not cut any wires etc. Just desoldered and moved away. Idea is that I could easily return RF module functionality i.e. undo this mod. )
Tuesday, September 6, 2016
Another ZX Spectrum 48K
Maybe I got carried away.. but here is another non working rubber keyboard ZX Spectrum I got (s/n D01-257600).
Its interesting regarding those serial numbers, some are 01 some D01. I really would like to know what do they mean, if they mean anything ? Found one site that has list of some serial numbers and has a form to submit more. Probably later I will submit them serial number of my ZX Spectrum machines. But now, back to this one..
On the outside it has some bruises and scratches, also it has lost all of its rubber pads, but inside looks good.
Actually it looked so good that I powered it immediately and saw nice working home screen. But after pressing some keys found than none of them work. No wonder why because when opened the box immediately found reason.
Keyboard membrane connector was cracked near the connector and was totally broken near the membrane, So, it seems that now I am looking after replacement membrane,
To be continued.
Its interesting regarding those serial numbers, some are 01 some D01. I really would like to know what do they mean, if they mean anything ? Found one site that has list of some serial numbers and has a form to submit more. Probably later I will submit them serial number of my ZX Spectrum machines. But now, back to this one..
On the outside it has some bruises and scratches, also it has lost all of its rubber pads, but inside looks good.
Actually it looked so good that I powered it immediately and saw nice working home screen. But after pressing some keys found than none of them work. No wonder why because when opened the box immediately found reason.
Keyboard membrane connector was cracked near the connector and was totally broken near the membrane, So, it seems that now I am looking after replacement membrane,
To be continued.
Monday, September 5, 2016
Repairing ZX Spectrum+ 48K
Another was ZX Spectrum+ 48K (s/n S01-135100). After turning it on could not see clear image (sorry did not take image of that picture). When I disassembled this device I found that it already had some changes, lower RAM chips were not original, it had some jumper wires soldered on PCB, transistor TR4 seemed like already replaced (at least someone did some soldering with it).
Expecting the worst I started to check voltages (using this guide) and noticed that 12V is missing on lower RAM chips. When checked transistors TR5 and TR4 found that TR4 is most probably faulty.
TR4 is ZTX650 and I started searching replacements for it. Somewhere in a forums I fount that:
I could easily find 2SD1207 and replace it. Just one important thing - pins of ZTX650 and 2SD1207 are different:
But good thing is that it was already overlooked by ZX Spectrum PCB designers and it had holes for alternative pinout transistor near the original one ( see photo ).
Voltages immediately changed to correct ones. After powering it up it started nicely. Whoohoo, it was an easy fix.
*One interesting thing is that on the back of ZX Spectrum case there was a sticker with text: 31.7.86 RR 47293 C.DAVIES. Not sure what does it mean, maybe information about performed repair or previous owner.
Oh.. and noticed just now, there is a sticker about repair on RF module also:
Expecting the worst I started to check voltages (using this guide) and noticed that 12V is missing on lower RAM chips. When checked transistors TR5 and TR4 found that TR4 is most probably faulty.
TR4 is ZTX650 and I started searching replacements for it. Somewhere in a forums I fount that:
- TR4 ZTX650 can be replaced with 2SD1207.
- TR5 ZTX 213 can be replaced with 2SA733 ( or BC212, BC257, BC307, BC557).
I could easily find 2SD1207 and replace it. Just one important thing - pins of ZTX650 and 2SD1207 are different:
But good thing is that it was already overlooked by ZX Spectrum PCB designers and it had holes for alternative pinout transistor near the original one ( see photo ).
Voltages immediately changed to correct ones. After powering it up it started nicely. Whoohoo, it was an easy fix.
*One interesting thing is that on the back of ZX Spectrum case there was a sticker with text: 31.7.86 RR 47293 C.DAVIES. Not sure what does it mean, maybe information about performed repair or previous owner.
Oh.. and noticed just now, there is a sticker about repair on RF module also:
Friday, September 2, 2016
Thursday, May 19, 2016
Wednesday, May 18, 2016
Friday, March 11, 2016
Thursday, March 3, 2016
PowerBuilder - Find windows where datawindow is used
If You have a listo of datawindows and would like to make a list of windows where each of these datawindows are used, this Power-Shell function might help.
By tweaking it You could search for whatewher You need, but basic concept is below.[Console]::OutputEncoding = [System.Text.Encoding]::UTF8 $windowTitles = "windowsTitles.txt" New-Item $windowTitles -type file -force function search ([string]$fullName) { $shortName = [io.path]::GetFileNameWithoutExtension($fullName) $files = gci -include *.srw,*.sru,*.srd -recurse | select-string $shortName | group path | select name $found = 0 if ($files.Count -eq 0) { return 0 } foreach ($file in $files) { $shortName2 = [io.path]::GetFileNameWithoutExtension($file.Name) if ($shortName -eq $shortName2) { continue } $found = $found + 1 Write-Host "Used in: " $shortName2 If ($file.Name.EndsWith(".srw")) { Write-Host "Used in: " $shortName2 " and its a WINDOW!" $titleString = Get-Content $file.Name | select-string -pattern "string title = " if (-not $titleString) { Write-Host "Window has no title" Return 1 } Write-Host "Windows title is:" $titleString $title = $titleString.line.replace("string title = ","") # write title to file Add-Content -Encoding UTF8 $windowTitles $title Return 1 } Else { Return search($file.Name) } } Return $found }
Use it something like this ( is same PS1 file for example ) :
$files = gci -include *.srd -recurse | Where-Object {$_.FullName -like "*\$folder\*"} | select-string '!!!!ADD YOUR REGEX HERE!!!' | group path | select name
Write-Host "Found number of datawindows:"
Write-Host $files.Count
$index = 0
foreach ($file in $files)
{
if (-Not $file.Name) {break}
$dwShortName = [io.path]::GetFileNameWithoutExtension($file.Name)
Write-Host "Searching for: " $dwShortName
$found = search($file.Name)
}
Labels:
Power-Shell,
PowerBuilder,
Programming,
Quick and dirty
Subscribe to:
Posts (Atom)