Previous Thread
Next Thread
Print Thread
Page 28 of 29 1 2 26 27 28 29
Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01] #114734
02/23/19 01:24 PM
02/23/19 01:24 PM
Joined: Mar 2001
Posts: 16,135
USA
R
R. Belmont Offline
Very Senior Member
R. Belmont  Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,135
USA
Here's a quality-of-life improvement for the 8-bit A2s: the disassembler now knows about Monitor ROM entry points, soft switches, and common zero-page locations. ProDOS MLI parsing is to come, as is full IIgs support for Toolbox and GS/OS calls and bank $E0/$E1 globals.

[Linked Image]

Last edited by R. Belmont; 02/23/19 01:26 PM.
Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01] #114737
02/23/19 05:03 PM
02/23/19 05:03 PM
Joined: Jun 2014
Posts: 78
P
peter ferrie Offline
Member
peter ferrie  Offline
Member
P
Joined: Jun 2014
Posts: 78
That's awesome. I'm always forgetting the names of some of those.
By the way, $FADA is RGDSP1.

Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01] #114738
02/23/19 07:15 PM
02/23/19 07:15 PM
Joined: Mar 2001
Posts: 16,135
USA
R
R. Belmont Offline
Very Senior Member
R. Belmont  Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,135
USA
$FADA wasn't in the lists I was using, but I'll add it.

The version going in also shows ProDOS 8 calls and lets you step over them cleanly.

Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01] #114742
02/23/19 08:08 PM
02/23/19 08:08 PM
Joined: May 1999
Posts: 550
Luxembourg
Carbon Offline
Senior Member
Carbon  Offline
Senior Member
Joined: May 1999
Posts: 550
Luxembourg
That's very cool. Out of curiosity, does this exist for other systems?

Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01] #114743
02/23/19 08:33 PM
02/23/19 08:33 PM
Joined: Mar 2001
Posts: 16,135
USA
R
R. Belmont Offline
Very Senior Member
R. Belmont  Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,135
USA
There's a few others (the Mac, Palm, and TRS-80 Color Computers), and it's pretty easy to add more. The downside is that as it's currently implemented, it's pretty low-level; your hook has the same power and responsibility as the CPU core disassemblers, except you can pass any opcode you don't want back to the core to deal with. It's probably easiest to do for A-line traps on 680x0 systems, which is why 2 of the existing 3 are 680x0.

Last edited by R. Belmont; 02/23/19 08:35 PM.
Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01] #114754
02/24/19 08:28 AM
02/24/19 08:28 AM
Joined: May 1999
Posts: 550
Luxembourg
Carbon Offline
Senior Member
Carbon  Offline
Senior Member
Joined: May 1999
Posts: 550
Luxembourg
A-Traps? Now, there's something that reminds me my active programming years. And now I think of Scott Knasters's Mac programming books ... 😊

Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: R. Belmont] #114760
02/25/19 04:49 AM
02/25/19 04:49 AM
Joined: Jun 2014
Posts: 78
P
peter ferrie Offline
Member
peter ferrie  Offline
Member
P
Joined: Jun 2014
Posts: 78
Originally Posted by R. Belmont
$FADA wasn't in the lists I was using, but I'll add it.


I have the original monitor ROM source. I can add more of the labels for the next version.
First, though, is to get II+ LC working properly. It's marked writable but writes are ignored until state is changed to read-only and then back to writable.

Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01] #114762
02/26/19 05:19 PM
02/26/19 05:19 PM
Joined: Jun 2014
Posts: 78
P
peter ferrie Offline
Member
peter ferrie  Offline
Member
P
Joined: Jun 2014
Posts: 78
RB, related to that, while I'm adding the missing labels from the monitor source, shall I change the zpage labels to their original names? e.g. CURSORHORZ -> CH, TXTWIDTH -> WNDWDTH...

Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01] #114763
02/26/19 05:34 PM
02/26/19 05:34 PM
Joined: Mar 2001
Posts: 16,135
USA
R
R. Belmont Offline
Very Senior Member
R. Belmont  Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,135
USA
If you have canonical names for them, go ahead. I was working primarily off of http://www.kreativekorp.com/miscpages/a2info/zeropage.shtml which gives what they are but not the canonical names.

Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01] #114788
03/03/19 12:45 AM
03/03/19 12:45 AM
Joined: Feb 2014
Posts: 192
G
Golden Child Offline
Senior Member
Golden Child  Offline
Senior Member
G
Joined: Feb 2014
Posts: 192
Some more silly fun:

I always thought that Altirra's enhanced text mode was pretty cool, so why not see if I could do a text overlay with lua?

Code

-- 80 column text overlay for Apple IIe

function calc(line,page) page=page or 0 return line % 8 * 1024 + math.floor(line / 64) * 40 + math.floor((line%64) / 8) * 128 + 8192* (page + 1) end

function iskeypressed(keycode) 
inp = manager:machine():input() return inp:code_pressed(inp:code_from_token(keycode))
end

function striphi(a) if type(a)=="number" then a=string.char(a) end local b="" for i=1,#a do b=b..string.char(string.byte(a,i)&0x7f) end return b end

mem=manager:machine().devices[":maincpu"].spaces["program"]
aux=emu.item(manager:machine().devices[":aux:ext80"].items["0/m_ram"])
scr=manager:machine().screens[":screen"]

function widthpct(c) if c==nil or c==string.char(0) then return 0 end return ((manager:ui():get_string_width(c,1.0)/manager:ui():get_string_width("A",1.0))) end
function widthoffset(c) if c==nil or c==string.char(0) then return 0 end return 3.5*(1-widthpct(c)) end


drawoverlay=true
keydelay=0

function print_80col()
for y=0,23 do for x=0,39 do offset=calc(y*8)-8192+x 
c1=striphi(aux:read(1024+offset)) c0=striphi(mem:read_u8(1024+offset))
io.write(c1..c0) end print() end
end

function draw_80col()
if keydelay > 0 then keydelay = keydelay - 1 end
if drawoverlay then 
scr:draw_box(0,0,559,279,0xff000000,0xffffffff)for y=0,23 do for x=0,39 do offset=calc(y*8)-8192+x 
c1=striphi(aux:read(1024+offset)) c0=striphi(mem:read_u8(1024+offset))
scr:draw_text((x*2+0)*7+widthoffset(c1),y*8,c1,0xffffffff,0xff000000) scr:draw_text((x*2+1)*7+widthoffset(c0),y*8,c0,0xffffffff,0xff000000) end end
end
if iskeypressed("KEYCODE_LSHIFT") and keydelay==0 then drawoverlay=not drawoverlay keydelay=20 end
end

draw80dispatchlist={draw_80col}

function draw80dispatch() for i,j in pairs(draw80dispatchlist) do j() end end

function drawon() draw80dispatchlist={draw_80col} end
function drawoff() draw80dispatchlist={} end

if not alreadyregistereddraw80 then
  emu.register_frame_done(draw80dispatch)
  alreadyregistereddraw80=true
end




With overlay:
[Linked Image]

Without overlay:
[Linked Image]


Just hit the shift key to toggle it on/off


It took me a while to figure out why it looks strange when it's scrolling in 80 columns. Reading with manager:machine().devices[":maincpu"].spaces["program"]:read_u8() gets the data from the auxiliary memory when the softswitches are set during the scroll.

Last edited by Golden Child; 03/03/19 01:42 AM.
Page 28 of 29 1 2 26 27 28 29

Who's Online Now
2 registered members (Duke, 1 invisible), 167 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,635
Posts112,994
Members4,842
Most Online324
Dec 20th, 2018
Powered by UBB.threads™ PHP Forum Software 7.6.1.1
(Release build 20180111)
Page Time: 0.056s Queries: 14 (0.033s) Memory: 5.7329 MB (Peak: 5.9569 MB) Zlib enabled. Server Time: 2019-03-24 15:11:23 UTC