Previous Thread
Next Thread
Print Thread
Page 6 of 6 1 2 3 4 5 6
#110830 - 09/24/17 01:22 AM Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: seanriddle]  
Joined: Feb 2014
Posts: 60
Golden Child Offline
Member
Golden Child  Offline
Member

Joined: Feb 2014
Posts: 60
Hi Sean,

Thanks for looking that up. I was totally bewildered why machine language would work, but Applesoft pokes would not. That may explain why the Third Millennium Arcade Board has its write register port at $C0C1 and $C0C3 and the read register port at $C0C1 so it could work from both machine language and also Applesoft BASIC POKEing. If you POKE to $C0C3, on the Arcade Board, the STA ($50),Y read is harmless.

I was trying to do a little demo with both the Third Millennium Arcade Board in slot 4 and the Super Sprite in slot 7 and both have them display something, Now I know why my POKEs were ineffective. Man, that was driving me bats.


Last edited by Golden Child; 09/24/17 01:40 AM.
#110835 - 09/24/17 01:03 PM Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: Golden Child]  
Joined: Feb 2014
Posts: 60
Golden Child Offline
Member
Golden Child  Offline
Member

Joined: Feb 2014
Posts: 60
I was using PR#1 along with specifying the ssc and a printer, but for some reason the DIP switches would reset themselves to "Communications Mode" along with "19200 baud". I'd set them to "Printer Mode / 9600" and that would disappear sometimes.

./mame64 apple2e -sl1 ssc -sl1:ssc:ssc_rs232 printer -printout myprintout.bin

What I discovered is that you have to keep specifying the "-sl1 ssc -sl1:ssc:ssc_rs232 printer -printout myprintout.bin" part on the command line.

If you don't, the DIP switches disappear from the UI menus and the next time you specify the ssc, those values will reset themselves to communications mode/19200 and your printout file will be scrambled eggs instead of sunny side up.


Is there a way to specify those settings from the command line?

Last edited by Golden Child; 09/24/17 01:04 PM.
#110836 - 09/24/17 02:08 PM Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01]  
Joined: Mar 2001
Posts: 15,711
R. Belmont Offline
R. Belmont  Offline

Very Senior Member

Joined: Mar 2001
Posts: 15,711
USA
Right, the switches are only saved if the card is present, because otherwise you could put a different card with different switches in slot 1 and really confuse things. Your best bet is probably to make a batch file that runs MAME with the -sl1 ssc and so on.

#110837 - 09/24/17 02:31 PM Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01]  
Joined: Feb 2004
Posts: 1,828
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,828
Sydney, Australia
There's no way to set DIP switches on the command line right now, and the options system is rather buggy and limited. It's being rewritten, it's just time-consuming. This will open up more possibilities.

#110838 - 09/24/17 03:53 PM Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01]  
Joined: Feb 2014
Posts: 60
Golden Child Offline
Member
Golden Child  Offline
Member

Joined: Feb 2014
Posts: 60
One last question for today: I was trying to edit my basic program in a text editor and paste it into the apple2e driver with UI Paste (Left Shift+Scroll Lock).

Some characters on the PC keyboard don't get typed properly:

" turns into @
* turns into nothing
() turns into *(
& turns into ^
@ turns into nothing

which makes it hard to paste programs.

pasting the following text into the apple2e driver:

Code
    exclaim!atsign@hash#dollarsign$percent%caret^amper&asterisk*leftparen(rightparen)
    dash-underscore_plus+equals=bracket[]curly{}backslash\verticalbar|
    tick`tilde~
    comma,period.lessthan<greaterthan>slash/question?semicolon;colon:singlequote'doublequote"
    abcdefghijklmnopqrstuvwxyz
    ABCDEFGHJIJKLMNOPQRSTUVWXYZ

[Linked Image]



so for instance:
Code
50 PRINT "ADDR WRITE SLOT=";S;" VALUE LO=";W0;" HI=";W1
51 SB = 49280:S0 = SB + 16 * S:S1 = S0 + 1:IP = 16384+20:I0=IP
52 POKE IP,160 + 13: POKE IP + 1, FN LO(S1): POKE IP + 2, FN HI(S1): IP = IP + 3 REM  AD LDA $C0C1

turns into:

Code
50 PRINT @ADDR WRITE SLOT=@;S;@ VALUE LO=@;W0;@ HI=@;W1
51 SB = 49280:S0 = SB + 16  S:S1 = S0 + 1:IP = 16384+20:I0=IP
52 POKE IP,160 + 13: POKE IP + 1, FN LO*S1(: POKE IP + 2, FN HI*S1(: IP = IP + 3 REM  AD LDA $C0C1




and a couple of things about UI Paste:

ALT+TAB to switch to my text editor, copy with CTRL+C, ALT+TAB to go back to the apple2e driver, ends up putting a CTRL+I into the text buffer so you have to hit enter to clear the input line.

if you type ? ASC(" then hit alt+tab then go back to mame with alt+tab then type ") you get a 9 (a CTRL+I).



You have to be really quick to hit Left Shift+Scroll Lock and let go of the Left Shift or 1234 PRINT turns into !@#$ PRINT.

It'd be cool if there was a delay before it actually started typing, and maybe even have a notification that comes on screen saying : UI Paste in progress. Perhaps even an abort mechanism that can stop a UI Paste in progress.


When a CR is encountered, the basic interpreter can't keep up with the keystrokes sometimes while it's processing the line and will sometimes drop the first character of the next line which can easily stomp other basic lines since the line number isn't right.

Note how the pasted text has missing characters at the beginning of the line.

Maybe there could be a CR delay that's longer than the normal character send time.


Upper and lowercase is a bit of a problem since caps lock is a must for Applesoft Basic programming, but if you were to paste UI lowercase text it wouldn't come out properly.

#110839 - 09/24/17 06:08 PM Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: Golden Child]  
Joined: Feb 2014
Posts: 60
Golden Child Offline
Member
Golden Child  Offline
Member

Joined: Feb 2014
Posts: 60
Silly fun with having both the Arcade Board and the Super Sprite active.

./mame64 apple2e -sl4 arcbd -sl7 ssprite

[Linked Image]

edit:

and even more silly fun:

./mame64 apple2e -sl4 arcbd -sl5 arcbd -sl7 ssprite

[Linked Image]

trying to do more gets me a segfault:

./mame64 apple2e -sl7 ssprite -sl4 arcbd -sl5 arcbd -sl2 arcbd
Segmentation fault (core dumped)

Last edited by Golden Child; 09/24/17 11:45 PM.
#110845 - 09/25/17 12:00 AM Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01]  
Joined: Mar 2001
Posts: 15,711
R. Belmont Offline
R. Belmont  Offline

Very Senior Member

Joined: Mar 2001
Posts: 15,711
USA
MAME has a hardcoded max of 4 screens. I'm not sure where it comes from, it limits my ability to put 6 NuBus video cards in a Mac II and have real fun frown

#110846 - 09/25/17 01:54 AM Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: rfka01]  
Joined: Feb 2004
Posts: 1,828
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,828
Sydney, Australia
The maximum screen count comes from the built-in layouts. MAME can't dynamically generate layouts for an arbitrary number of screens. Make a github issue and assign it to me - I'll get around to it at some point.

#110863 - 09/26/17 12:33 PM Re: 8bit Apples - Apple I, II, /// and the 16 bit GS [Re: Golden Child]  
Joined: Feb 2014
Posts: 60
Golden Child Offline
Member
Golden Child  Offline
Member

Joined: Feb 2014
Posts: 60
Some baby steps with lua: I thought I'd see if I could "dump" the Apple 2 text screen memory to the lua console.


./mame64 apple2e -plugin console


Code
cpu = manager:machine().devices[":maincpu"];mem = cpu.spaces["program"]

for i=0,23 do appletextaddress=0x400+(math.floor(i/8)*40+128*(i%8)); print(i.."  "..appletextaddress.."") end

for i=0,23 do appletextaddress=0x400+(math.floor(i/8)*40+128*(i%8)); a="";for k=0,39 do newchar = mem:read_i8(appletextaddress+k); newchar = newchar & 127 ; if newchar < 32 then newchar = newchar + 64; end; a=a..string.char(newchar); end; print (i.."  "..appletextaddress.." "..a); end



There's a minimal amount of character fixing, just take the char, strip the high bit and turn characters less than 32 into something recognizable by adding 64.


Running the little program:

100 HOME : FOR I = 1 TO 24: HTAB 1 : VTAB I: PRINT "Apple Text Line: ";I;: NEXT : VTAB 1

[Linked Image]


Code
0  1024 Apple Text Line: 1                      
1  1152 ]pple Text Line: 2                      
2  1280 Apple Text Line: 3                      
3  1408 Apple Text Line: 4                      
4  1536 Apple Text Line: 5                      
5  1664 Apple Text Line: 6                      
6  1792 Apple Text Line: 7                      
7  1920 Apple Text Line: 8                      
8  1064 Apple Text Line: 9                      
9  1192 Apple Text Line: 10                     
10  1320 Apple Text Line: 11                     
11  1448 Apple Text Line: 12                     
12  1576 Apple Text Line: 13                     
13  1704 Apple Text Line: 14                     
14  1832 Apple Text Line: 15                     
15  1960 Apple Text Line: 16                     
16  1104 Apple Text Line: 17                     
17  1232 Apple Text Line: 18                     
18  1360 Apple Text Line: 19                     
19  1488 Apple Text Line: 20                     
20  1616 Apple Text Line: 21                     
21  1744 Apple Text Line: 22                     
22  1872 Apple Text Line: 23                     
23  2000 Apple Text Line: 24                     


and my UI paste test becomes:

Code
0  1024                                         
1  1152 ]    EXCLAIM!ATSIGNHASH#DOLLARSIGN$PERCE
2  1280 NT%CARETAMPER^ASTERISKLEFTPAREN*RIGHTPAR
3  1408 EN(                                     
4  1536                                         
5  1664 ?SYNTAX ERROR                           
6  1792 ]ASH-UNDERSCORE_PLUS+EQUALS=BRACKET[]CUR
7  1920 LY{}BACKSLASH\VERTICALBAR|              
8  1064                                         
9  1192 ?SYNTAX ERROR                           
10  1320 ]TICK`TILDE~                            
11  1448                                         
12  1576 ?SYNTAX ERROR                           
13  1704 ]    COMMA,PERIOD.LESSTHAN<GREATERTHAN>S
14  1832 LASH/QUESTION?SEMICOLON;COLON:SINGLEQUOT
15  1960 E&DOUBLEQUOTE@                          
16  1104                                         
17  1232 ?SYNTAX ERROR                           
18  1360 ]BCDEFGHIJKLMNOPQRSTUVWXYZ              
19  1488                                         
20  1616 ?SYNTAX ERROR                           
21  1744 ]   ABCDEFGHJIJKLMNOPQRSTUVWXYZ         
22  1872                                         
23  2000                                         

Page 6 of 6 1 2 3 4 5 6

Who's Online Now
3 registered members (Pernod, Edstrom, ICEknight), 23 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,413
Posts108,956
Members4,757
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.033s Queries: 16 (0.010s) Memory: 5.0179 MB (Peak: 5.2340 MB) Zlib enabled. Server Time: 2017-09-26 21:35:03 UTC