English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   support.WinUAE (http://eab.abime.net/forumdisplay.php?f=5)
-   -   Debugger changes (was: Some changes..) (http://eab.abime.net/showthread.php?t=87570)

ross 13 June 2017 12:54

Debugger changes (was: Some changes..)
 
Hi Toni,

- can be added a 'memory block fill' command in debugger? (maybe there is but I've not found it..)
- command xx doesn't act the same from GUI and CLI: from CLI you can switch to GUI without reactivating emulation, not the vice versa (better w/o reactivating!).
- it's possible to add a command to directly jump to 'properties window' (F12) from debugger, to change some emulation property without neither code executed, and return back?

Thanks! :)
ross

Toni Wilen 22 June 2017 12:11

Quote:

Originally Posted by ross (Post 1164697)
- can be added a 'memory block fill' command in debugger? (maybe there is but I've not found it..)

It does not exist. I never needed it.

Quote:

- command xx doesn't act the same from GUI and CLI: from CLI you can switch to GUI without reactivating emulation, not the vice versa (better w/o reactivating!).
GUI is not supported so anything related to it is also unsupported :)

Quote:

- it's possible to add a command to directly jump to 'properties window' (F12) from debugger, to change some emulation property without neither code executed, and return back?
I thought debugger already had command to inject config changes (like uae-configuration) or input events but it seems it is still unimplemented.

GUI is only opened during emulated vblank so it isn't going to be instant.

ross 23 June 2017 15:25

Thanks for reply :)

Quote:

Originally Posted by Toni Wilen (Post 1166835)
It does not exist. I never needed it.

It's useful, same as memcopy or even a little (raw) assembler..

Quote:

GUI is not supported so anything related to it is also unsupported :)
Understandable.

Quote:

I thought debugger already had command to inject config changes (like uae-configuration) or input events but it seems it is still unimplemented.
Ok.


Bye!
ross

Toni Wilen 25 June 2017 17:48

Quote:

Originally Posted by ross (Post 1167127)
It's useful, same as memcopy or even a little (raw) assembler..

Fill and mem copy added. (check help message)

Assembler would be nice but I have no idea how to make it from CPU emulator tables. I won't accept separate external assembler, it must be based on "gencpu" tables.

EDIT: table68k should have enough information to create assembler, someday..

Quote:

I thought debugger already had command to inject config changes (like uae-configuration) or input events but it seems it is still unimplemented.
Added. I <custom event string> (for example "I show_leds=false")

StingRay 25 June 2017 20:25

Quote:

Originally Posted by Toni Wilen (Post 1167493)
Fill and mem copy added. (check help message)

A useful addition, thanks! :)

ross 25 June 2017 21:19

Code:

Wf <addr> <endaddr> <bytes or string like above>, fill memory.
Wc <addr> <endaddr> <destaddr>, copy memory.
I <custom event> Send custom event string

:great


Thanks Toni!

Cheers,
ross

Toni Wilen 26 June 2017 22:21

Assembler seems to be very possible. Only need some annoying text parsing.

Warning: it probably will be a bit weird with some instructions, just like the disassembler..

ross 26 June 2017 22:55

This is a BIG news!

:)

Toni Wilen 29 June 2017 12:15

Assembler is now partially done.

- two modes, immediate ("a address instruction") and interactive mode ("a address", return. empty line exits)
- "weird" instructions like MOVEM not yet supported (Weird syntax "MVMEL #mask,EA" and "MVMLE #mask,EA" do work..)
- 68020+ addressing modes not yet supported (scale factor will be implemented, not sure if I bother with other 68020+ modes)
- MMU and FPU instructions are not supported
- Only accepts original Motorola syntax even if disassembler uses 68020+ syntax only.. (Both will be supported later)
- Out of range values are truncated, no errors reported.
- ADD x,An is not supported, it needs to be ADDA (and so on)
- And more?

Test and report all issues.

ross 29 June 2017 15:16

Quote:

Originally Posted by Toni Wilen (Post 1168303)
Assembler is now partially done.

:cool

Quote:

- two modes, immediate ("a address instruction") and interactive mode ("a address", return. empty line exists)
how to exit from interactive mode?[edit]: empty is a 'space', maybe better a special char?

Quote:

- "weird" instructions like MOVEM not yet supported (Weird syntax "MVMEL #mask,EA" and "MVMLE #mask,EA" do work..)
We need a glossary :)

Quote:

- 68020+ addressing modes not yet supported (scale factor will be implemented, not sure if I bother with other 68020+ modes)
..and bitfield instruction..

Quote:

- MMU and FPU instructions are not supported
not really a prob.

Quote:

- Only accepts original Motorola syntax even if disassembler uses 68020+ syntax only.. (Both will be supported later)
- Out of range values are truncated, no errors reported.
- ADD x,An is not supported, it needs to be ADDA (and so on)
Ok.

Quote:

- And more?
Test and report all issues.
- shift/rotate do not work
- absolute addressing work but without $ sign
- Bcc only relative to start of 'interactive mode' address
- bit instruction do not work
(maybe they works but I did not find the syntax :))

This new feature is really useful!

Thanks Toni,
ross

Toni Wilen 29 June 2017 15:32

Quote:

Originally Posted by ross (Post 1168351)
how to exit from interactive mode? [edit]: empty is a 'space', maybe better a special char?

Empty as in just press Return.

Quote:

We need a glossary :)
MOVEM will work normally later. It needs special handling. (It really is technically MOVEM #16-bit_immediate,EA)

Quote:

..and bitfield instruction..
Also have annoying encoding.. But these probably should be supported.

Quote:

- shift/rotate do not work
Lets check..

Quote:

- absolute addressing work but without $ sign
Hexadecimal is the default. (!val = decimal)

Quote:

- Bcc only relative to start of 'interactive mode' address
It is relative to current address, what else should it be? :)

Quote:

- bit instruction do not work
Same

ross 29 June 2017 15:49

Quote:

Originally Posted by Toni Wilen (Post 1168354)
Empty as in just press Return.

from CLI yes but not from GUI (i know, is unsupported ;), but a special char can solve both ambient)

Quote:

- Bcc only relative to start of 'interactive mode' address

It is relative to current address, what else should it be? :)
is not relative to current, is relative to initial
(ex. suppose in interactive mode you insert various instructions and then a bcc, the branch is relative from the first instruction..)

mmh no i'm wrong :)

:great
ross

Toni Wilen 29 June 2017 16:43

- "New" syntax (d16,An) and (d8,An,Xn) are now supported.
- Xn multiplier is supported (68020+ only)
- bit instruction/shifts with immediate value now work (any instruction that had immediate included with first opcode word and instruction was not somethingQ)

Note that btst and friends require .b or .l, it is not handled automatically. EDIT: automatic now.

EDIT2: ADD vs ADDA is now handled automatically.

ross 29 June 2017 17:51

Quote:

Originally Posted by Toni Wilen (Post 1168376)
- "New" syntax (d16,An) and (d8,An,Xn) are now supported.
- Xn multiplier is supported (68020+ only)
- bit instruction/shifts with immediate value now work (any instruction that had immediate included with first opcode word and instruction was not somethingQ)

Note that btst and friends require .b or .l, it is not handled automatically. EDIT: automatic now.

EDIT2: ADD vs ADDA is now handled automatically.

You are too fast :)

All is working.
There is an exception, one of the most strange instruction in 68k ISA:
BTST dx,#immediate

:great

Toni Wilen 29 June 2017 19:34

- BTST Dn,#x is now working (It didn't work because I forgot about that and I hardcoded destination immediate = word size instruction to make LINK working easily..)
- MOVEM is now sane :)

ross 29 June 2017 19:46

Awesome :)

Toni Wilen 29 June 2017 19:50

I guess it is good enough now?

ross 29 June 2017 20:25

Yes! I've to deep test it but is great.

Thanks!!!
ross

idrougge 29 June 2017 23:27

Quote:

Originally Posted by Toni Wilen (Post 1168303)
Assembler is now partially done.

I felt quite good having checked in two commits of roughly twenty lines today. Until I saw this.

How do you do it, Toni?

Toni Wilen 30 June 2017 08:06

Quote:

Originally Posted by idrougge (Post 1168538)
I felt quite good having checked in two commits of roughly twenty lines today. Until I saw this.

How do you do it, Toni?

It is just boring code..

Assembler is only couple of hundred lines of code and 2/3 of code is ugly text parsing. (Get source and possible destination opmode and other parameters)

Main code is more or less a big loop that iterates already existing opcode table, multiple times, trying to find single matching entry using parsed data. All the opcode data already existed, it only needed to be used to make an assembler.

Writing the code was the easy part, finding working logic was more difficult.


All times are GMT +2. The time now is 06:52.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.

Page generated in 0.04714 seconds with 11 queries