UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio and TV Service Data

Go Back   UK Vintage Radio Repair and Restoration Discussion Forum > Specific Vintage Equipment > Vintage Computers

Notices

Vintage Computers Any vintage computer systems, calculators, video games etc., but with an emphasis on 1980s and earlier equipment.

Closed Thread
 
Thread Tools
Old 7th Dec 2022, 7:03 pm   #81
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,078
Default Re: How do I convert hex files to binary for use in the MK14 mame VDU emulator?

Weird, its 220 bytes so you'd think its well within the MK14 memory map, is there anything other than size which could cause this error message?
Minefield does occupy right up to 0FFB which is the highest that any of these programs reach, theres nothing else in high (emulated) memory like a stack or something occupying around 0FFB, that minefield is overwriting?
Could it be the SCIOS stack definition? (which is 0FFF down through reflection of FFFF)
In the emulator is the whole 0F00 - 0FFF page allocated to the emulated SC/MP?
and the minefield binary is definitely loading between 0F1F and 0FFB ?

Last edited by Phil__G; 7th Dec 2022 at 7:08 pm.
Phil__G is offline  
Old 7th Dec 2022, 8:06 pm   #82
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: How do I convert hex files to binary for use in the MK14 mame VDU emulator?

Most odd- so I I've just reassembled the version of Tim's MINEFLD.ASM source that I have on my MK14 'support netbook' and run the resulting Intel Hex file OK on actual hardware (MK16 issue VI replica and Ortonview VDU). Loading that into HxD alongside Phil's version I find that the Intel Hex file and Phil's binary file are the same length and one byte different.

The single byte which is different in my working one is the setup value sent to the 8154 port A by Tim's mods. In Phil's version it sends the value BEh to the port, and on my version it sends the value FFh to the port. This should not matter because the 8154 port A pins are not 'connected' to the MAME emulator's VDU control inputs just as they are not connected to the control inputs on Ortonview on my real hardware.

In both cases Tim also wrote 00h out to the status register which set flags 0-2 low. If the VDU enable / disable control input is 'connected' to any of those flags then that action should enable it, as the VDU is active-low enable.

It should also be noted that for this software the VDU needs to be pointed at RAM blocks 0F00 and 0B00, character mode needs to be selected.

A thought: Could it be the length of the file NAME which is being complained about? try changing the extremely long filename of Phil's minefield file to just plain mine.bin and see if you can load it then.
SiriusHardware is online now  
Old 7th Dec 2022, 9:06 pm   #83
Pernod70
Triode
 
Join Date: Nov 2022
Location: Croydon, Surrey, UK
Posts: 37
Default Re: How do I convert hex files to binary for use in the MK14 mame VDU emulator?

The minefield binary loads fine at f1f, I can only think that 777xxxx was also specifying a length to load which is not required.

With the binary loaded and executing at fbd it doesn't get very far. I'm not familiar with SC/MP (I'm more 6502) but am wondering if there's an emulation issue. Here's a trace of when I think it goes off the rails:
Code:
0FBF: xpah 2
0FC0: ldi $00
0FC2: xpal 2
0FC3: ldi $fd
0FC5: st +$22(2)
0FC7: ldi $be
0FC9: st +$20(2)
0FCB: ldi $00
0FCD: cas
0FCE: ld -$76
0FD0: scl
0FD1: cai $05
0FD3: st -$7b
0FD5: st -$75
0FD7: ldi $0b
0FD9: xpah 2
0FDA: ldi $00
0FDC: xpal 2
0FDD: ldi $20
0FDF: st @+$01(2)
0FE1: xpal 2
0FE2: jnz -$08
0FDC: xpal 2
0FDD: ldi $20
0FDF: st @+$01(2)
0FE1: xpal 2
0FE2: jnz -$08

   (loops for 1270 instructions)

0FE4: jmp -$4e
0F98: ldi $00
0F9A: xpah 3
0F9B: ldi $22
0F9D: xpal 3
0F9E: ldi $20
0FA0: xpal 0
0F20: xppc 3
0023: st -$27
0025: lde
0026: st -$29
0028: csa
0029: st -$2b
002B: xpah 1
002C: st -$34
002E: xpal 1
Is it interpreting the XPPC 3 correctly?
Pernod70 is offline  
Old 7th Dec 2022, 9:32 pm   #84
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,078
Default Re: How do I convert hex files to binary for use in the MK14 mame VDU emulator?

Yes I think so, before the XPPC 3 instruction, P3 high is set to 00 (at F98) and P3 low is set to 22 (at F9B), a quirk of the SC/MP is that the address is incremented before being used so 0022h is correct for a jump to 0023h - but I'm not sure if thats what is wanted - Tims comment is " ;Is this an attempt to return to SCIOS?"
Meanwhile P3 should maintain the old PC value ready for the 'return' with another XPPC 3
Hopefully Tim will be along soon

Last edited by Phil__G; 7th Dec 2022 at 9:44 pm.
Phil__G is offline  
Old 7th Dec 2022, 9:42 pm   #85
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,362
Default Re: How do I convert hex files to binary for use in the MK14 mame VDU emulator?

No that code is a bit tricky the XPAL 0 is a trick to move around on the current page by setting just the low byte of the Program counter. P3 has previously been set to the address of the SCIOS ROM routine at 0x22 which the XPPC3 correctly then executes saving the return address in P3 of course.

If the SCIOS rom image is not V2 then that will be wrong but 23 is the debug entry point on that so it sits there waiting for the GO key to run the game after the initialisation which 'returns' back to 0F21 as P3 is saved on entry to that rom routine
Timbucus is offline  
Old 7th Dec 2022, 9:45 pm   #86
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: How do I convert hex files to binary for use in the MK14 mame VDU emulator?

On earlier screenshots I noticed that the emulated LED display was showing the '0000 00' prompt of the new / revised / V2 SCIOS monitor, so I think we can assume it's running that version.
SiriusHardware is online now  
Old 7th Dec 2022, 10:02 pm   #87
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,362
Default Re: How do I convert hex files to binary for use in the MK14 mame VDU emulator?

Quote:
Originally Posted by SiriusHardware View Post
On earlier screenshots I noticed that the emulated LED display was showing the '0000 00' prompt of the new / revised / V2 SCIOS monitor, so I think we can assume it's running that version.
In which case it could just need the GO button pressing to start the game / launch a tank...
Timbucus is offline  
Old 7th Dec 2022, 10:13 pm   #88
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: How do I convert hex files to binary for use in the MK14 mame VDU emulator?

Might you be interested in trying the Beta of the MAME MK14-VDU emulator? I'm sure if you had the two together you'd be able to see the problem.
SiriusHardware is online now  
Old 7th Dec 2022, 10:21 pm   #89
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,362
Default Re: How do I convert hex files to binary for use in the MK14 mame VDU emulator?

Never used MAME but, always up for an experiment - I am away with work tomorrow and family event Friday so will be the weekend before I can do so.
Timbucus is offline  
Old 7th Dec 2022, 10:34 pm   #90
Pernod70
Triode
 
Join Date: Nov 2022
Location: Croydon, Surrey, UK
Posts: 37
Default Re: How do I convert hex files to binary for use in the MK14 mame VDU emulator?

Quote:
Originally Posted by Timbucus View Post
In which case it could just need the GO button pressing to start the game / launch a tank...
Thanks, works perfectly, just wasn't expecting to have to press GO again.
Pernod70 is offline  
Old 7th Dec 2022, 10:48 pm   #91
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,362
Default Re: How do I convert hex files to binary for use in the MK14 mame VDU emulator?

Quote:
Originally Posted by Pernod70 View Post
Quote:
Originally Posted by Timbucus View Post
In which case it could just need the GO button pressing to start the game / launch a tank...
Thanks, works perfectly, just wasn't expecting to have to press GO again.
Ah great - I did that on purpose as you may not notice it has finished loading and you lose your first life/tank!
Timbucus is offline  
Old 7th Dec 2022, 11:02 pm   #92
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,078
Default Re: How do I convert hex files to binary for use in the MK14 mame VDU emulator?

Yay, everything works!
Phil__G is offline  
Old 7th Dec 2022, 11:14 pm   #93
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: How do I convert hex files to binary for use in the MK14 mame VDU emulator?

Duh, and there I was just automatically pressing GO to start the game because I've played it before, so it never occurred to me that others wouldn't be doing that. To be fair the game even prompts you to press GO although it is a bit hard to see in amongst all of the clutter (program code) on the non-game part of the screen.

Maybe we can prevail upon Tim to do a clean looking 'Enhanced' (Full screen) version for MK14s which have RAM at 0200-07FF.
SiriusHardware is online now  
Old 8th Dec 2022, 3:29 am   #94
777xxxx
Tetrode
 
Join Date: Nov 2022
Location: Cornwall, UK.
Posts: 60
Default Re: How do I convert hex files to binary for use in the MK14 mame VDU emulator?

Quote:
Originally Posted by SiriusHardware View Post
Most odd- so I I've just reassembled the version of Tim's MINEFLD.ASM source that I have on my MK14 'support netbook' and run the resulting Intel Hex file OK on actual hardware (MK16 issue VI replica and Ortonview VDU). Loading that into HxD alongside Phil's version I find that the Intel Hex file and Phil's binary file are the same length and one byte different.

The single byte which is different in my working one is the setup value sent to the 8154 port A by Tim's mods. In Phil's version it sends the value BEh to the port, and on my version it sends the value FFh to the port. This should not matter because the 8154 port A pins are not 'connected' to the MAME emulator's VDU control inputs just as they are not connected to the control inputs on Ortonview on my real hardware.

In both cases Tim also wrote 00h out to the status register which set flags 0-2 low. If the VDU enable / disable control input is 'connected' to any of those flags then that action should enable it, as the VDU is active-low enable.

It should also be noted that for this software the VDU needs to be pointed at RAM blocks 0F00 and 0B00, character mode needs to be selected.

A thought: Could it be the length of the file NAME which is being complained about? try changing the extremely long filename of Phil's minefield file to just plain mine.bin and see if you can load it then.

yeah, i already shortened the name to 2 letters
777xxxx is offline  
Old 8th Dec 2022, 9:12 am   #95
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: How do I convert hex files to binary for use in the MK14 mame VDU emulator?

You mean it STILL doesn't work for you... and when you say it doesn't work, you mean MAME won't even load it?

Can you post the exact form of the command you are using when trying to load it into MAME?
SiriusHardware is online now  
Old 8th Dec 2022, 1:47 pm   #96
777xxxx
Tetrode
 
Join Date: Nov 2022
Location: Cornwall, UK.
Posts: 60
Default Re: How do I convert hex files to binary for use in the MK14 mame VDU emulator?

Quote:
Originally Posted by SiriusHardware View Post
You mean it STILL doesn't work for you... and when you say it doesn't work, you mean MAME won't even load it?

Can you post the exact form of the command you are using when trying to load it into MAME?

Quote:
Originally Posted by SiriusHardware View Post
You mean it STILL doesn't work for you... and when you say it doesn't work, you mean MAME won't even load it?

Can you post the exact form of the command you are using when trying to load it into MAME?
yes.

im using load mi.bin,f1f

then i get the error 'length specified too long, load failed' error.
777xxxx is offline  
Old 8th Dec 2022, 2:18 pm   #97
Pernod70
Triode
 
Join Date: Nov 2022
Location: Croydon, Surrey, UK
Posts: 37
Default Re: How do I convert hex files to binary for use in the MK14 mame VDU emulator?

Quote:
Originally Posted by 777xxxx View Post
im using load mi.bin,f1f

then i get the error 'length specified too long, load failed' error.
What is the size of the file you are trying to load, it should be 220 bytes, which I've already tested and confirmed works when loaded at f1f.
Pernod70 is offline  
Old 8th Dec 2022, 2:18 pm   #98
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: How do I convert hex files to binary for use in the MK14 mame VDU emulator?

From that error message it sounds like the emulator thinks you are providing a length parameter rather than a load address.

Daft suggestion, but try '0f1f' rather than 'f1f'.

Also try 'load mi.bin,0f20' - it won't work / run at that address but it will be interesting to see if it will load it.
SiriusHardware is online now  
Old 8th Dec 2022, 2:43 pm   #99
777xxxx
Tetrode
 
Join Date: Nov 2022
Location: Cornwall, UK.
Posts: 60
Default Re: How do I convert hex files to binary for use in the MK14 mame VDU emulator?

Quote:
Originally Posted by Pernod70 View Post
Quote:
Originally Posted by 777xxxx View Post
im using load mi.bin,f1f

then i get the error 'length specified too long, load failed' error.
What is the size of the file you are trying to load, it should be 220 bytes, which I've already tested and confirmed works when loaded at f1f.
677 bytes. i was loading the wrong file. it loads now but wont execute

Last edited by 777xxxx; 8th Dec 2022 at 2:48 pm.
777xxxx is offline  
Old 8th Dec 2022, 2:48 pm   #100
Pernod70
Triode
 
Join Date: Nov 2022
Location: Croydon, Surrey, UK
Posts: 37
Default Re: How do I convert hex files to binary for use in the MK14 mame VDU emulator?

Quote:
Originally Posted by 777xxxx View Post
Quote:
Originally Posted by Pernod70 View Post
Quote:
Originally Posted by 777xxxx View Post
im using load mi.bin,f1f

then i get the error 'length specified too long, load failed' error.
What is the size of the file you are trying to load, it should be 220 bytes, which I've already tested and confirmed works when loaded at f1f.
677 bytes
That's clearly the wrong file, you are supposed to using the file from post #79.
Pernod70 is offline  
Closed Thread

Thread Tools



All times are GMT +1. The time now is 9:43 am.


All information and advice on this forum is subject to the WARNING AND DISCLAIMER located at https://www.vintage-radio.net/rules.html.
Failure to heed this warning may result in death or serious injury to yourself and/or others.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright ©2002 - 2023, Paul Stenning.