Re: [M100] Super ROM for NEC

2023-02-24 Thread John R. Hogerhuis
rant on

It always surprises me that anyone would do an 8085 assembler or
disassembler and not implement the undocumented instructions. I mean
they're there, everyone knows about them, it has been decades, the
instructions were fully implemented and stable, they're not hard to find
and as you're coding you want to fill out your jump table, data structure,
or switch case right? Just for symmetry?

And a forensics or hacking tool... kinda no excuse. It has to work on real
world code as you find it or it's useless. And real programmers use the
undocumented instructions.

rant off

That said, ghidra sounds like an cool tool.

-- John.

On Fri, Feb 24, 2023 at 1:30 AM B 9  wrote:

> On Sun, Feb 19, 2023 at 12:34 PM Stephen Adolph 
> wrote:
>
>> Yah I'm not sure it is actually doable, in a reasonable amount of time
>> effort.
>> It is hard to separate data tables from code.
>>
>> I found one disassembler that was capable of labeling, and tracing code,
>> but it did not support undoc opcodes, so it wasn't a good disassembly to
>> use.
>>
>
> Have you tried Ghidra ? It lacks the 8085
> undocumented instructions, but it's open source and thus extensible. For
> example, someone added support for undocumented opcodes for the Z80
> .
> Someone else started an implementation for the 8085
>  back in
> 2020, but nobody has tested it yet to give the author feedback.
>
> —b9
>


Re: [M100] Super ROM for NEC

2023-02-24 Thread B 9
On Sun, Feb 19, 2023 at 12:34 PM Stephen Adolph 
wrote:

> Yah I'm not sure it is actually doable, in a reasonable amount of time
> effort.
> It is hard to separate data tables from code.
>
> I found one disassembler that was capable of labeling, and tracing code,
> but it did not support undoc opcodes, so it wasn't a good disassembly to
> use.
>

Have you tried Ghidra ? It lacks the 8085
undocumented instructions, but it's open source and thus extensible. For
example, someone added support for undocumented opcodes for the Z80
.
Someone else started an implementation for the 8085
 back in
2020, but nobody has tested it yet to give the author feedback.

—b9


Re: [M100] Super ROM for NEC

2023-02-23 Thread Gary Weber
And can I just say that Ken completing his NEC PC-8201A fully commented
disassembly is absolutely amazing!  Thank you, Ken, for your diligence.
The help this will give me on filling in the gaps in my Memory Map Database
is huge.

On Thu, Feb 23, 2023 at 7:09 AM Stephen Adolph  wrote:

> thanks Ken, this is very helpful.  I never like to quit something that is
> part way done, so I'll take a look at it again.
> Right now I am part way through the MVT100 PC terminal app, going well.
>
> On Thu, Feb 23, 2023 at 12:11 AM Kenneth Pettit 
> wrote:
>
>> Hey Steve,
>>
>> I don't know if you are still trying to get SuperROM ported to PC-8201
>> or not, but I have merged in all of my M100 disassembly comments into
>> the PC-8201 disassembly and was able to find *most* of the calls you
>> identified below.
>>
>> Note however the following:
>>
>> 1.  The encoding for floating point numbers in PC-8201 is TOTALLY
>> different than M100.
>> 2.  Most of the routines in PC-8201 are using SGL precision vs. DBL in
>> M100
>> 3.  Three of the routines aren't available and would have to be dealt
>> with in some other way.
>>
>> Ken
>>
>> On 2/18/23 12:07 PM, Stephen Adolph wrote:
>> > If there is anyone motivated to help, It would be helpful to figure
>> > out the equivalent calls PC-8201 calls for this list of M100 main ROM
>> > calls.
>> >
>> > 0x30C2  -> NON EXISTENT ( Load FAC1 with zero).  Could use:  LXI B,
>> > H  CALL 0x3DF7
>> > 0x31B5  -> 0x321E ( Copy FAC1 to FAC2 )
>> > 0x31B8  -> 0x3218 ( Copy floating point at M to FAC1 ) NOTE: DBL in
>> > M100, type of last var in PC-8201
>> > 0x31BB  -> NON EXISTENT ( Move floating point at M to (DE) )
>> > 0x31C1  -> 0x3215  ( Copy FAC2 to FAC1 )
>> > 0x31C4  -> 0x31D0  ( Move floating point at M to FAC1) NOTE: DBL in
>> > M100, SGL in PC-8201
>> > 0x31CA  -> 0x31EA  ( Move FAC1 to M)   NOTE: DBL in M100, SGL in PC-8201
>> > 0x31CD  -> 0x31ED  ( Move floating point at (DE) to M ) NOTE:  DBL in
>> > M100, SGL in PC-8201
>> > 0x3469  -> 0x31F7   ( Move B bytes from (DE) to M with increment )
>> > 0x3472  -> NON EXISTENT  ( Move B bytes from (DE) to M with decrement )
>> > 0x34D2  -> 0x326F   ( Double precision compare FAC1 with FAC2 )
>> > 0x3501  -> 0x329E   ( CINT function )
>> > 0x3510  -> 0x32BA   ( Load signed integer in HL to FAC1 )
>> > 0x3513  -> 0x32BD   ( Set type of last variable to INT )
>> > 0x35BA  -> 0x32FC   ( CDBL function )
>> > 0x35CF  -> 0x330D   ( Set type of last variable to DBL )
>>
>>


Re: [M100] Super ROM for NEC

2023-02-23 Thread Stephen Adolph
thanks Ken, this is very helpful.  I never like to quit something that is
part way done, so I'll take a look at it again.
Right now I am part way through the MVT100 PC terminal app, going well.

On Thu, Feb 23, 2023 at 12:11 AM Kenneth Pettit  wrote:

> Hey Steve,
>
> I don't know if you are still trying to get SuperROM ported to PC-8201
> or not, but I have merged in all of my M100 disassembly comments into
> the PC-8201 disassembly and was able to find *most* of the calls you
> identified below.
>
> Note however the following:
>
> 1.  The encoding for floating point numbers in PC-8201 is TOTALLY
> different than M100.
> 2.  Most of the routines in PC-8201 are using SGL precision vs. DBL in M100
> 3.  Three of the routines aren't available and would have to be dealt
> with in some other way.
>
> Ken
>
> On 2/18/23 12:07 PM, Stephen Adolph wrote:
> > If there is anyone motivated to help, It would be helpful to figure
> > out the equivalent calls PC-8201 calls for this list of M100 main ROM
> > calls.
> >
> > 0x30C2  -> NON EXISTENT ( Load FAC1 with zero).  Could use:  LXI B,
> > H  CALL 0x3DF7
> > 0x31B5  -> 0x321E ( Copy FAC1 to FAC2 )
> > 0x31B8  -> 0x3218 ( Copy floating point at M to FAC1 ) NOTE: DBL in
> > M100, type of last var in PC-8201
> > 0x31BB  -> NON EXISTENT ( Move floating point at M to (DE) )
> > 0x31C1  -> 0x3215  ( Copy FAC2 to FAC1 )
> > 0x31C4  -> 0x31D0  ( Move floating point at M to FAC1) NOTE: DBL in
> > M100, SGL in PC-8201
> > 0x31CA  -> 0x31EA  ( Move FAC1 to M)   NOTE: DBL in M100, SGL in PC-8201
> > 0x31CD  -> 0x31ED  ( Move floating point at (DE) to M ) NOTE:  DBL in
> > M100, SGL in PC-8201
> > 0x3469  -> 0x31F7   ( Move B bytes from (DE) to M with increment )
> > 0x3472  -> NON EXISTENT  ( Move B bytes from (DE) to M with decrement )
> > 0x34D2  -> 0x326F   ( Double precision compare FAC1 with FAC2 )
> > 0x3501  -> 0x329E   ( CINT function )
> > 0x3510  -> 0x32BA   ( Load signed integer in HL to FAC1 )
> > 0x3513  -> 0x32BD   ( Set type of last variable to INT )
> > 0x35BA  -> 0x32FC   ( CDBL function )
> > 0x35CF  -> 0x330D   ( Set type of last variable to DBL )
>
>


Re: [M100] Super ROM for NEC

2023-02-22 Thread Kenneth Pettit

Hey Steve,

I don't know if you are still trying to get SuperROM ported to PC-8201 
or not, but I have merged in all of my M100 disassembly comments into 
the PC-8201 disassembly and was able to find *most* of the calls you 
identified below.


Note however the following:

1.  The encoding for floating point numbers in PC-8201 is TOTALLY 
different than M100.

2.  Most of the routines in PC-8201 are using SGL precision vs. DBL in M100
3.  Three of the routines aren't available and would have to be dealt 
with in some other way.


Ken

On 2/18/23 12:07 PM, Stephen Adolph wrote:
If there is anyone motivated to help, It would be helpful to figure 
out the equivalent calls PC-8201 calls for this list of M100 main ROM 
calls.


0x30C2  -> NON EXISTENT ( Load FAC1 with zero).  Could use:  LXI B, 
H  CALL 0x3DF7

0x31B5  -> 0x321E ( Copy FAC1 to FAC2 )
0x31B8  -> 0x3218 ( Copy floating point at M to FAC1 ) NOTE: DBL in 
M100, type of last var in PC-8201

0x31BB  -> NON EXISTENT ( Move floating point at M to (DE) )
0x31C1  -> 0x3215  ( Copy FAC2 to FAC1 )
0x31C4  -> 0x31D0  ( Move floating point at M to FAC1) NOTE: DBL in 
M100, SGL in PC-8201

0x31CA  -> 0x31EA  ( Move FAC1 to M)   NOTE: DBL in M100, SGL in PC-8201
0x31CD  -> 0x31ED  ( Move floating point at (DE) to M ) NOTE:  DBL in 
M100, SGL in PC-8201

0x3469  -> 0x31F7   ( Move B bytes from (DE) to M with increment )
0x3472  -> NON EXISTENT  ( Move B bytes from (DE) to M with decrement )
0x34D2  -> 0x326F   ( Double precision compare FAC1 with FAC2 )
0x3501  -> 0x329E   ( CINT function )
0x3510  -> 0x32BA   ( Load signed integer in HL to FAC1 )
0x3513  -> 0x32BD   ( Set type of last variable to INT )
0x35BA  -> 0x32FC   ( CDBL function )
0x35CF  -> 0x330D   ( Set type of last variable to DBL )




Re: [M100] Super ROM for NEC

2023-02-19 Thread Kenneth Pettit
The floating point encoding in the NEC is much different than the other 
models.  The M100/102/200, etc. use BCD encoding, but I never could 
figure out how NEC was encoding it.


Some bizzare encoding where single precison ZERO is represented as 00h 
00h C7h 00h


Ken

On 2/19/23 12:33 PM, Stephen Adolph wrote:
Yah I'm not sure it is actually doable, in a reasonable amount of time 
effort.

It is hard to separate data tables from code.

I found one disassembler that was capable of labeling, and tracing 
code, but it did not support undoc opcodes, so it wasn't a good 
disassembly to use.


I think all the issues could be overcome, but it would be a sizable 
amount of effort indeed.


I did learn some python in the process.


On Sun, Feb 19, 2023 at 2:48 PM Gary Weber  wrote:

Hey Steve

So this is definitely going to be pretty involved.  As people have
already stated, the math subsystem of the Model 100's vs. NEC
8201's version of BASIC is pretty different.  Going through that
list of addresses and just looking at the instructions being done
by the M100 for each as yielded no results when trying to match
them up with NEC equivalents when looking at both of my master
disassemblies for each ROM.

I have documentation on a lot of the NEC's math functions, so if
there's a way to figure out *what* each of those M100 calls are
trying to do from SuperROM (and I'm guessing from the Lucid app),
then we may be able to find equivalents in *functionality*, and
then be able to add a bit of of code in order to get the calling
convention and result output translated back into what SuperROM
wants.  It would be a pretty daunting task, IMO.

Pretty much everything else in the machines are pretty similar,
except when it comes to BASIC.  I've even seen cases where math
calculations give results that are in a slightly different
precision between the Tandy & NEC flavors.  (This was something to
do with the ATN() function if I recall correctly.)

Gary



On Sat, Feb 18, 2023 at 5:39 PM Gary Weber  wrote:

Hi Steve,

Well first of all, it's awesome you've got a renewed interest
in this little project!

One resource you might also find helpful is the ModelT Memory
Map Database:

https://www.web8201.net/default.asp?content=modelt_memorymaps/mapview.asp
I'm also willing to assist with the conversions on those
addresses.  I'll take a first stab and finding the equivalents
for the NEC on your list.

Gary





On Sat, Feb 18, 2023 at 1:49 PM Kenneth Pettit
 wrote:

Hey Steve,

Looks like the NEC and M100 math routines are a fair
amount different.

I have started a task of annotating the NEC VirtualT
disassembly listing with the hand-coded changes I made to
the M100 disassembly.  We'll see how far I get along this
path (There are a LOT of additions I made by hand).

Ken

On 2/18/23 12:07 PM, Stephen Adolph wrote:

Reviving this thread.

SuperROM uses RST1 to make "trampoline" calls to the main
ROM.
I've gone through all of the RST1 calls that SuperROM
makes to the M100 main rom.
Most convert well.

The really big gap is that the math routines are very
different in PC-8201.

If there is anyone motivated to help, It would be helpful
to figure out the equivalent calls PC-8201 calls for this
list of M100 main ROM calls.

0x30C2
0x31B5
0x31B8
0x31BB
0x31C1
0x31C4
0x31CA
0x31CD
0x3469
0x3472
0x34D2
0x3501
0x3510
0x3513
0x35BA
0x35CF

Ideally requiring no major code rework on SuperROM to
make it all work.





On Mon, Jul 12, 2021 at 8:30 AM Stephen Adolph
 wrote:

Noting that SuperROM has never been found (or never
released?) for NEC, it seems to me given what I know
about making applications run on both platforms, that
it should be very straightforward to translate the
M100 SuperROM into an NEC variant. After all, the NEC
and M100 are so similar.

Does anyone have any thoughts on this?

Process could be:
- Disassemble
- find the trampoline, and adjust for NEC memory map
- look for "trampoline" calls to the main ROM, and
convert to NEC addresses
- look for upper RAM addresses, and convert to NEC
addresses
---> this could be a bit tricky I admit, 

Re: [M100] Super ROM for NEC

2023-02-19 Thread Stephen Adolph
Yah I'm not sure it is actually doable, in a reasonable amount of time
effort.
It is hard to separate data tables from code.

I found one disassembler that was capable of labeling, and tracing code,
but it did not support undoc opcodes, so it wasn't a good disassembly to
use.

I think all the issues could be overcome, but it would be a sizable amount
of effort indeed.

I did learn some python in the process.


On Sun, Feb 19, 2023 at 2:48 PM Gary Weber  wrote:

> Hey Steve
>
> So this is definitely going to be pretty involved.  As people have already
> stated, the math subsystem of the Model 100's vs. NEC 8201's version of
> BASIC is pretty different.  Going through that list of addresses and just
> looking at the instructions being done by the M100 for each as yielded no
> results when trying to match them up with NEC equivalents when looking at
> both of my master disassemblies for each ROM.
>
> I have documentation on a lot of the NEC's math functions, so if there's a
> way to figure out *what* each of those M100 calls are trying to do from
> SuperROM (and I'm guessing from the Lucid app), then we may be able to find
> equivalents in *functionality*, and then be able to add a bit of of code in
> order to get the calling convention and result output translated back into
> what SuperROM wants.  It would be a pretty daunting task, IMO.
>
> Pretty much everything else in the machines are pretty similar, except
> when it comes to BASIC.  I've even seen cases where math calculations give
> results that are in a slightly different precision between the Tandy & NEC
> flavors.  (This was something to do with the ATN() function if I recall
> correctly.)
>
> Gary
>
>
>
> On Sat, Feb 18, 2023 at 5:39 PM Gary Weber  wrote:
>
>> Hi Steve,
>>
>> Well first of all, it's awesome you've got a renewed interest in this
>> little project!
>>
>> One resource you might also find helpful is the ModelT Memory Map
>> Database:
>> https://www.web8201.net/default.asp?content=modelt_memorymaps/mapview.asp
>> I'm also willing to assist with the conversions on those addresses.  I'll
>> take a first stab and finding the equivalents for the NEC on your list.
>>
>> Gary
>>
>>
>>
>>
>>
>> On Sat, Feb 18, 2023 at 1:49 PM Kenneth Pettit 
>> wrote:
>>
>>> Hey Steve,
>>>
>>> Looks like the NEC and M100 math routines are a fair amount different.
>>>
>>> I have started a task of annotating the NEC VirtualT disassembly listing
>>> with the hand-coded changes I made to the M100 disassembly.  We'll see how
>>> far I get along this path (There are a LOT of additions I made by hand).
>>>
>>> Ken
>>>
>>> On 2/18/23 12:07 PM, Stephen Adolph wrote:
>>>
>>> Reviving this thread.
>>>
>>> SuperROM uses RST1 to make "trampoline" calls to the main ROM.
>>> I've gone through all of the RST1 calls that SuperROM makes to the M100
>>> main rom.
>>> Most convert well.
>>>
>>> The really big gap is that the math routines are very different in
>>> PC-8201.
>>>
>>> If there is anyone motivated to help, It would be helpful to figure out
>>> the equivalent calls PC-8201 calls for this list of M100 main ROM calls.
>>>
>>> 0x30C2
>>> 0x31B5
>>> 0x31B8
>>> 0x31BB
>>> 0x31C1
>>> 0x31C4
>>> 0x31CA
>>> 0x31CD
>>> 0x3469
>>> 0x3472
>>> 0x34D2
>>> 0x3501
>>> 0x3510
>>> 0x3513
>>> 0x35BA
>>> 0x35CF
>>>
>>> Ideally requiring no major code rework on SuperROM to make it all work.
>>>
>>>
>>>
>>>
>>>
>>> On Mon, Jul 12, 2021 at 8:30 AM Stephen Adolph 
>>> wrote:
>>>
 Noting that SuperROM has never been found (or never released?) for NEC,
 it seems to me given what I know about making applications run on both
 platforms, that it should be very straightforward to translate the M100
 SuperROM into an NEC variant.  After all, the NEC and M100 are so similar.

 Does anyone have any thoughts on this?

 Process could be:
 - Disassemble
 - find the trampoline, and adjust for NEC memory map
 - look for "trampoline" calls to the main ROM, and convert to NEC
 addresses
 - look for upper RAM addresses, and convert to NEC addresses
 ---> this could be a bit tricky I admit, because it may not always be
 apparent that a register pair value is being used as an upper RAM pointer
 - adjust the hardware interrupt  if needed


 cheers
 Steve




>>>


Re: [M100] Super ROM for NEC

2023-02-19 Thread Gary Weber
Hey Steve

So this is definitely going to be pretty involved.  As people have already
stated, the math subsystem of the Model 100's vs. NEC 8201's version of
BASIC is pretty different.  Going through that list of addresses and just
looking at the instructions being done by the M100 for each as yielded no
results when trying to match them up with NEC equivalents when looking at
both of my master disassemblies for each ROM.

I have documentation on a lot of the NEC's math functions, so if there's a
way to figure out *what* each of those M100 calls are trying to do from
SuperROM (and I'm guessing from the Lucid app), then we may be able to find
equivalents in *functionality*, and then be able to add a bit of of code in
order to get the calling convention and result output translated back into
what SuperROM wants.  It would be a pretty daunting task, IMO.

Pretty much everything else in the machines are pretty similar, except when
it comes to BASIC.  I've even seen cases where math calculations give
results that are in a slightly different precision between the Tandy & NEC
flavors.  (This was something to do with the ATN() function if I recall
correctly.)

Gary



On Sat, Feb 18, 2023 at 5:39 PM Gary Weber  wrote:

> Hi Steve,
>
> Well first of all, it's awesome you've got a renewed interest in this
> little project!
>
> One resource you might also find helpful is the ModelT Memory Map
> Database:
> https://www.web8201.net/default.asp?content=modelt_memorymaps/mapview.asp
> I'm also willing to assist with the conversions on those addresses.  I'll
> take a first stab and finding the equivalents for the NEC on your list.
>
> Gary
>
>
>
>
>
> On Sat, Feb 18, 2023 at 1:49 PM Kenneth Pettit  wrote:
>
>> Hey Steve,
>>
>> Looks like the NEC and M100 math routines are a fair amount different.
>>
>> I have started a task of annotating the NEC VirtualT disassembly listing
>> with the hand-coded changes I made to the M100 disassembly.  We'll see how
>> far I get along this path (There are a LOT of additions I made by hand).
>>
>> Ken
>>
>> On 2/18/23 12:07 PM, Stephen Adolph wrote:
>>
>> Reviving this thread.
>>
>> SuperROM uses RST1 to make "trampoline" calls to the main ROM.
>> I've gone through all of the RST1 calls that SuperROM makes to the M100
>> main rom.
>> Most convert well.
>>
>> The really big gap is that the math routines are very different in
>> PC-8201.
>>
>> If there is anyone motivated to help, It would be helpful to figure out
>> the equivalent calls PC-8201 calls for this list of M100 main ROM calls.
>>
>> 0x30C2
>> 0x31B5
>> 0x31B8
>> 0x31BB
>> 0x31C1
>> 0x31C4
>> 0x31CA
>> 0x31CD
>> 0x3469
>> 0x3472
>> 0x34D2
>> 0x3501
>> 0x3510
>> 0x3513
>> 0x35BA
>> 0x35CF
>>
>> Ideally requiring no major code rework on SuperROM to make it all work.
>>
>>
>>
>>
>>
>> On Mon, Jul 12, 2021 at 8:30 AM Stephen Adolph 
>> wrote:
>>
>>> Noting that SuperROM has never been found (or never released?) for NEC,
>>> it seems to me given what I know about making applications run on both
>>> platforms, that it should be very straightforward to translate the M100
>>> SuperROM into an NEC variant.  After all, the NEC and M100 are so similar.
>>>
>>> Does anyone have any thoughts on this?
>>>
>>> Process could be:
>>> - Disassemble
>>> - find the trampoline, and adjust for NEC memory map
>>> - look for "trampoline" calls to the main ROM, and convert to NEC
>>> addresses
>>> - look for upper RAM addresses, and convert to NEC addresses
>>> ---> this could be a bit tricky I admit, because it may not always be
>>> apparent that a register pair value is being used as an upper RAM pointer
>>> - adjust the hardware interrupt  if needed
>>>
>>>
>>> cheers
>>> Steve
>>>
>>>
>>>
>>>
>>


Re: [M100] Super ROM for NEC

2023-02-18 Thread Gary Weber
Hi Steve,

Well first of all, it's awesome you've got a renewed interest in this
little project!

One resource you might also find helpful is the ModelT Memory Map
Database:
https://www.web8201.net/default.asp?content=modelt_memorymaps/mapview.asp
I'm also willing to assist with the conversions on those addresses.  I'll
take a first stab and finding the equivalents for the NEC on your list.

Gary





On Sat, Feb 18, 2023 at 1:49 PM Kenneth Pettit  wrote:

> Hey Steve,
>
> Looks like the NEC and M100 math routines are a fair amount different.
>
> I have started a task of annotating the NEC VirtualT disassembly listing
> with the hand-coded changes I made to the M100 disassembly.  We'll see how
> far I get along this path (There are a LOT of additions I made by hand).
>
> Ken
>
> On 2/18/23 12:07 PM, Stephen Adolph wrote:
>
> Reviving this thread.
>
> SuperROM uses RST1 to make "trampoline" calls to the main ROM.
> I've gone through all of the RST1 calls that SuperROM makes to the M100
> main rom.
> Most convert well.
>
> The really big gap is that the math routines are very different in PC-8201.
>
> If there is anyone motivated to help, It would be helpful to figure out
> the equivalent calls PC-8201 calls for this list of M100 main ROM calls.
>
> 0x30C2
> 0x31B5
> 0x31B8
> 0x31BB
> 0x31C1
> 0x31C4
> 0x31CA
> 0x31CD
> 0x3469
> 0x3472
> 0x34D2
> 0x3501
> 0x3510
> 0x3513
> 0x35BA
> 0x35CF
>
> Ideally requiring no major code rework on SuperROM to make it all work.
>
>
>
>
>
> On Mon, Jul 12, 2021 at 8:30 AM Stephen Adolph 
> wrote:
>
>> Noting that SuperROM has never been found (or never released?) for NEC,
>> it seems to me given what I know about making applications run on both
>> platforms, that it should be very straightforward to translate the M100
>> SuperROM into an NEC variant.  After all, the NEC and M100 are so similar.
>>
>> Does anyone have any thoughts on this?
>>
>> Process could be:
>> - Disassemble
>> - find the trampoline, and adjust for NEC memory map
>> - look for "trampoline" calls to the main ROM, and convert to NEC
>> addresses
>> - look for upper RAM addresses, and convert to NEC addresses
>> ---> this could be a bit tricky I admit, because it may not always be
>> apparent that a register pair value is being used as an upper RAM pointer
>> - adjust the hardware interrupt  if needed
>>
>>
>> cheers
>> Steve
>>
>>
>>
>>
>


Re: [M100] Super ROM for NEC

2023-02-18 Thread Kenneth Pettit

Hey Steve,

Looks like the NEC and M100 math routines are a fair amount different.

I have started a task of annotating the NEC VirtualT disassembly listing 
with the hand-coded changes I made to the M100 disassembly. We'll see 
how far I get along this path (There are a LOT of additions I made by hand).


Ken

On 2/18/23 12:07 PM, Stephen Adolph wrote:

Reviving this thread.

SuperROM uses RST1 to make "trampoline" calls to the main ROM.
I've gone through all of the RST1 calls that SuperROM makes to the 
M100 main rom.

Most convert well.

The really big gap is that the math routines are very different in 
PC-8201.


If there is anyone motivated to help, It would be helpful to figure 
out the equivalent calls PC-8201 calls for this list of M100 main ROM 
calls.


0x30C2
0x31B5
0x31B8
0x31BB
0x31C1
0x31C4
0x31CA
0x31CD
0x3469
0x3472
0x34D2
0x3501
0x3510
0x3513
0x35BA
0x35CF

Ideally requiring no major code rework on SuperROM to make it all work.





On Mon, Jul 12, 2021 at 8:30 AM Stephen Adolph  
wrote:


Noting that SuperROM has never been found (or never released?) for
NEC, it seems to me given what I know about making applications
run on both platforms, that it should be very straightforward to
translate the M100 SuperROM into an NEC variant.  After all, the
NEC and M100 are so similar.

Does anyone have any thoughts on this?

Process could be:
- Disassemble
- find the trampoline, and adjust for NEC memory map
- look for "trampoline" calls to the main ROM, and convert to NEC
addresses
- look for upper RAM addresses, and convert to NEC addresses
---> this could be a bit tricky I admit, because it may not always
be apparent that a register pair value is being used as an upper
RAM pointer
- adjust the hardware interrupt  if needed


cheers
Steve





Re: [M100] Super ROM for NEC

2023-02-18 Thread lloydelmer
Steve,

Do you have a list or a link that describes what these calls do?I haven’t 
done any ML programming for the M100 but I’m hoping to try soon.Knowing 
what those calls do might be very useful if not essential.

 

Lloyd

 

From: M100  On Behalf Of Stephen Adolph
Sent: Saturday, February 18, 2023 2:07 PM
To: m...@bitchin100.com
Subject: Re: [M100] Super ROM for NEC

 

Reviving this thread.

 

SuperROM uses RST1 to make "trampoline" calls to the main ROM.

I've gone through all of the RST1 calls that SuperROM makes to the M100 main 
rom.

Most convert well.

 

The really big gap is that the math routines are very different in PC-8201.

 

If there is anyone motivated to help, It would be helpful to figure out the 
equivalent calls PC-8201 calls for this list of M100 main ROM calls.

 

0x30C2
0x31B5
0x31B8
0x31BB
0x31C1
0x31C4
0x31CA
0x31CD
0x3469
0x3472
0x34D2
0x3501
0x3510
0x3513
0x35BA
0x35CF

 

Ideally requiring no major code rework on SuperROM to make it all work.

 

 

 

 

 

On Mon, Jul 12, 2021 at 8:30 AM Stephen Adolph mailto:twospru...@gmail.com> > wrote:

Noting that SuperROM has never been found (or never released?) for NEC, it 
seems to me given what I know about making applications run on both platforms, 
that it should be very straightforward to translate the M100 SuperROM into an 
NEC variant.  After all, the NEC and M100 are so similar.

 

Does anyone have any thoughts on this?

 

Process could be:

- Disassemble

- find the trampoline, and adjust for NEC memory map

- look for "trampoline" calls to the main ROM, and convert to NEC addresses

- look for upper RAM addresses, and convert to NEC addresses

---> this could be a bit tricky I admit, because it may not always be apparent 
that a register pair value is being used as an upper RAM pointer

- adjust the hardware interrupt  if needed

 

 

cheers

Steve

 

 

 



Re: [M100] Super ROM for NEC

2023-02-18 Thread Stephen Adolph
Reviving this thread.

SuperROM uses RST1 to make "trampoline" calls to the main ROM.
I've gone through all of the RST1 calls that SuperROM makes to the M100
main rom.
Most convert well.

The really big gap is that the math routines are very different in PC-8201.

If there is anyone motivated to help, It would be helpful to figure out the
equivalent calls PC-8201 calls for this list of M100 main ROM calls.

0x30C2
0x31B5
0x31B8
0x31BB
0x31C1
0x31C4
0x31CA
0x31CD
0x3469
0x3472
0x34D2
0x3501
0x3510
0x3513
0x35BA
0x35CF

Ideally requiring no major code rework on SuperROM to make it all work.





On Mon, Jul 12, 2021 at 8:30 AM Stephen Adolph  wrote:

> Noting that SuperROM has never been found (or never released?) for NEC, it
> seems to me given what I know about making applications run on both
> platforms, that it should be very straightforward to translate the M100
> SuperROM into an NEC variant.  After all, the NEC and M100 are so similar.
>
> Does anyone have any thoughts on this?
>
> Process could be:
> - Disassemble
> - find the trampoline, and adjust for NEC memory map
> - look for "trampoline" calls to the main ROM, and convert to NEC addresses
> - look for upper RAM addresses, and convert to NEC addresses
> ---> this could be a bit tricky I admit, because it may not always be
> apparent that a register pair value is being used as an upper RAM pointer
> - adjust the hardware interrupt  if needed
>
>
> cheers
> Steve
>
>
>
>


Re: [M100] Super ROM for NEC

2021-07-19 Thread Chris Fezzler
 Exciting! (Said a nerd.)
On Monday, July 19, 2021, 12:40:36 PM EDT, Stephen Adolph 
 wrote:  
 
 Update for the list.
Making progress!Using a combination of tools - python, DASMX140, and excel, 
I've been able to get a pretty complete "structural disassembly" of the Super 
ROM.
>From here, it is apparent how the main ROM calls are used, and what memory 
>locations are used.There are about 450 or so main ROM calls, many of them the 
>same, so maybe 100 or so unique ROM calls.
I'm starting to do the work to "transform" the addresses for  both RAM and main 
ROM calls, and so far so good.
So while this is certainly a daunting task, progress seems possible and I think 
it is still achievable to have a version of Super ROM for NEC.  Time will tell.
Steve





















  

Re: [M100] Super ROM for NEC

2021-07-19 Thread Stephen Adolph
Update for the list.

Making progress!
Using a combination of tools - python, DASMX140, and excel, I've been able
to get a pretty complete "structural disassembly" of the Super ROM.

>From here, it is apparent how the main ROM calls are used, and what
memory locations are used.
There are about 450 or so main ROM calls, many of them the same, so maybe
100 or so unique ROM calls.

I'm starting to do the work to "transform" the addresses for  both RAM and
main ROM calls, and so far so good.

So while this is certainly a daunting task, progress seems possible and I
think it is still achievable to have a version of Super ROM for NEC.  Time
will tell.

Steve


Re: [M100] Super ROM for NEC

2021-07-14 Thread Stephen Adolph
hah, well... I did get a start and it is, at first glance, not what I
expected!
The trampoline is very different, so I am piecing together how that works
first.
Still, a useful mental exercise.  I think the end goal would be great.

On Wed, Jul 14, 2021 at 4:33 PM Gary Weber  wrote:

> I love this whole idea!The ROM address conversion would be the easy
> part, if we can call anything "easy" regarding this.  :)
> It's the upper RAM addresses that could be quite tricky.  There's some
> differences in the hook table and then even more differences that don't
> seem to be well documented.
>
> I'm with Brian on this -- if YOU think it can be done, then I think it can
> be done.   Let me know if I can help in any way.
>
> Gary
>
>
> On Mon, Jul 12, 2021 at 5:30 AM Stephen Adolph 
> wrote:
>
>> Noting that SuperROM has never been found (or never released?) for NEC,
>> it seems to me given what I know about making applications run on both
>> platforms, that it should be very straightforward to translate the M100
>> SuperROM into an NEC variant.  After all, the NEC and M100 are so similar.
>>
>> Does anyone have any thoughts on this?
>>
>> Process could be:
>> - Disassemble
>> - find the trampoline, and adjust for NEC memory map
>> - look for "trampoline" calls to the main ROM, and convert to NEC
>> addresses
>> - look for upper RAM addresses, and convert to NEC addresses
>> ---> this could be a bit tricky I admit, because it may not always be
>> apparent that a register pair value is being used as an upper RAM pointer
>> - adjust the hardware interrupt  if needed
>>
>>
>> cheers
>> Steve
>>
>>
>>
>>


Re: [M100] Super ROM for NEC

2021-07-14 Thread Gary Weber
I love this whole idea!The ROM address conversion would be the easy
part, if we can call anything "easy" regarding this.  :)
It's the upper RAM addresses that could be quite tricky.  There's some
differences in the hook table and then even more differences that don't
seem to be well documented.

I'm with Brian on this -- if YOU think it can be done, then I think it can
be done.   Let me know if I can help in any way.

Gary


On Mon, Jul 12, 2021 at 5:30 AM Stephen Adolph  wrote:

> Noting that SuperROM has never been found (or never released?) for NEC, it
> seems to me given what I know about making applications run on both
> platforms, that it should be very straightforward to translate the M100
> SuperROM into an NEC variant.  After all, the NEC and M100 are so similar.
>
> Does anyone have any thoughts on this?
>
> Process could be:
> - Disassemble
> - find the trampoline, and adjust for NEC memory map
> - look for "trampoline" calls to the main ROM, and convert to NEC addresses
> - look for upper RAM addresses, and convert to NEC addresses
> ---> this could be a bit tricky I admit, because it may not always be
> apparent that a register pair value is being used as an upper RAM pointer
> - adjust the hardware interrupt  if needed
>
>
> cheers
> Steve
>
>
>
>


Re: [M100] Super ROM for NEC

2021-07-12 Thread Stephen Adolph
I've disassembled and taken a quick look.  it is quite different than "MO"
would have done, but the trampoline is clear.

(using DASMX140, which seems to be a really good disassembler!)



On Mon, Jul 12, 2021 at 1:30 PM John R. Hogerhuis  wrote:

> I think it very doable. It comes down to the completeness and quality of
> the disassembly and identifying all jumps into the BASIC ROM including
> indirect or computed jumps and mapping them from M100 to NEC.
>
> The option ROM skeleton and trampoline stuff is probably the best
> understood and easiest part.
>
> Definitely worth it given SuperROM being the best ROM :-)
>
> -- John.
>


Re: [M100] Super ROM for NEC

2021-07-12 Thread John R. Hogerhuis
On Mon, Jul 12, 2021 at 11:02 AM Brian K. White 
wrote:

> On 7/12/21 1:30 PM, John R. Hogerhuis wrote:
>
> > Definitely worth it given SuperROM being the best ROM :-)
> >
> > -- John.
>
>
> I wish you wouldn't be so coy and cryptic about your stance on what the
> best option rom ever released was.
>
> --
> bkw
>

Oops.. my opinion escaped again

-- John.


Re: [M100] Super ROM for NEC

2021-07-12 Thread Brian K. White

On 7/12/21 1:30 PM, John R. Hogerhuis wrote:
I think it very doable. It comes down to the completeness and quality of 
the disassembly and identifying all jumps into the BASIC ROM including 
indirect or computed jumps and mapping them from M100 to NEC.


The option ROM skeleton and trampoline stuff is probably the best 
understood and easiest part.


Definitely worth it given SuperROM being the best ROM :-)

-- John.



I wish you wouldn't be so coy and cryptic about your stance on what the 
best option rom ever released was.


--
bkw


Re: [M100] Super ROM for NEC

2021-07-12 Thread John R. Hogerhuis
I think it very doable. It comes down to the completeness and quality of
the disassembly and identifying all jumps into the BASIC ROM including
indirect or computed jumps and mapping them from M100 to NEC.

The option ROM skeleton and trampoline stuff is probably the best
understood and easiest part.

Definitely worth it given SuperROM being the best ROM :-)

-- John.


Re: [M100] Super ROM for NEC

2021-07-12 Thread Brian K. White

I can only say that if you think you can do it, then I think you can do it.
It certainly would be cool.
--
bkw


On 7/12/21 8:30 AM, Stephen Adolph wrote:
Noting that SuperROM has never been found (or never released?) for 
NEC, it seems to me given what I know about making applications run on 
both platforms, that it should be very straightforward to translate 
the M100 SuperROM into an NEC variant.  After all, the NEC and M100 
are so similar.


Does anyone have any thoughts on this?

Process could be:
- Disassemble
- find the trampoline, and adjust for NEC memory map
- look for "trampoline" calls to the main ROM, and convert to NEC 
addresses

- look for upper RAM addresses, and convert to NEC addresses
---> this could be a bit tricky I admit, because it may not always be 
apparent that a register pair value is being used as an upper RAM pointer

- adjust the hardware interrupt  if needed


cheers
Steve







Re: [M100] Super ROM for NEC

2021-07-12 Thread Brad Grier
Interesting! Was discussing the availability of a SuperRom image for NEC
just this past weekend on Discord with @Fezzler and I was wondering how
difficult it would be to convert.

Your description of the process is somewhat 'greek' to me so I'm guessing
that I'd need to level up a bit to be able to contribute any useful
assistance - though I'd be happy to help, if I can :)

--Brad



On Mon, Jul 12, 2021 at 6:30 AM Stephen Adolph  wrote:

> Noting that SuperROM has never been found (or never released?) for NEC, it
> seems to me given what I know about making applications run on both
> platforms, that it should be very straightforward to translate the M100
> SuperROM into an NEC variant.  After all, the NEC and M100 are so similar.
>
> Does anyone have any thoughts on this?
>
> Process could be:
> - Disassemble
> - find the trampoline, and adjust for NEC memory map
> - look for "trampoline" calls to the main ROM, and convert to NEC addresses
> - look for upper RAM addresses, and convert to NEC addresses
> ---> this could be a bit tricky I admit, because it may not always be
> apparent that a register pair value is being used as an upper RAM pointer
> - adjust the hardware interrupt  if needed
>
>
> cheers
> Steve
>
>
>
>

-- 
-- 
Brad Grier