Jump to content
thorr

How to use paths on Smartport Hard Drive within programs?

Recommended Posts

Learning Assembly Language is the way to get Full Control of your System...

 

 

Top Porter is working on an AppleSoft Compiler that looks like it generates pretty fast code..

 

I am a long time Apple ][ user, ( since JAN-1982 ) and have just started getting into the Tandy Color Computer, which has the Motorola MC6809 ( or the Hitachi HD6309 ).

 

 

MarkO

I saw that new compiler. It looks pretty awesome. Right now it is limited in what it can compile, but he is still working on it and someday it might be fully compatible with Applesoft BASIC which would be truly amazing. That doesn't seem to be his plan for the moment, but who knows.

 

I also am a long time Apple II user (Apple IIe in school, friend's IIc, another friend's II+, and eventually our own Laser 128 EX). My mom sold our Laser 128 EX in a garage sale and I was very sad, but at least I ended up with our LC III which I wasn't very attached to at the time, but have been enjoying recently. When I got my new IIc recently, I was really happy that many of my old floppies still worked and I was able to retrieve most of my old programs. I am missing a few things, but I could always recreate them better than before.

 

If you know Apple II assembly, you will have no problem learning the Motorola 6809 if that is something you are looking to do. Those Tandy Color Computers were always a mystery to me. I didn't know if they were re-branded PC's or what. They seemed to have better graphics than PC's at the time from what I recall. I had no idea they had 6809's in them!

Mike

Share this post


Link to post
Share on other sites

I should also have mentioned that the $C054.C055 softswitches also affect the text screen ($400.7FF) for 80-col text and dbl-lo-res graphics. Most 80-col word processors probably also use this method. Happy programming.

Thanks! I played around with double lo-res graphics in the past and noticed it doesn't seem to work on all machines. If I recall correctly, it works on IIc's (which I now have), but not on IIe's or my old Laser 128 EX. It was there sort of, but didn't work well or at all from Basic and machine language was the only way to try to use it. For that reason, I have avoided it for compatibility's sake. However, that stinks because I think double lo-res is a great mode! It has lots of color, good enough resolution for many things and is easy to use.

Share this post


Link to post
Share on other sites
On 9/20/2017 at 5:44 AM, Iamgroot said:

No. There's no bug. It works fine on my computer. The vertical stripes means the Auxiliary part of memory is not being written to properly on your computer.

 

After some testing Applewin seems to have some issues with the move routine at $C311.

 

Insert and use this code instead.

 

300:A9 20 85 43 85 3D A9 3F 85 3F A0 FF 84 3E C8 84
310:3C 84 42 A2 20 B1 3C 2C 55 C0 91 42 2C 54 C0 C8
320:D0 F3 E6 3D E6 43 CA D0 EC 46 43 A9 5F 85 3F 4C
330:2C FE 00 00

Hello, I am back to working on this and decided that I wanted to also use page 2 of double hires so the above routine needs to be revised.  Here is a brief recap of what we did before:

 

Problem: bloading DHR files from the smart hard drive on my Apple IIc using traditional bload methods tries to read from the floppy drive when trying to bload to aux memory for no obvious reason.

 

Current work around: Bload the whole DHR file with one bload command to $2000 - $5FFF, then use the above routine to move the data around to the right places in main and aux memory (first move Main $2000-$3FFF to AUX $2000-$3FFF, then move Main $4000-$5FFF to Main $2000-$3FFF).

 

What I would like to do instead: Save the two halves of the DHR image to separate files ahead of time. To view the DHR image, bload the AUX file to MAIN $2000, use a routine to move it to AUX $2000, then bload the MAIN file to MAIN $2000.

 

I got this working with the two DHR files instead of one already reusing the above code, but the above code is doing a lot more than I want so it is slower than it needs to be and has visual anomalies and still won't let me use page 2 of DHR.  I tried replacing the end of the routine with 00's starting at $0329 so it wouldn't move the main $4000 to $2000, but it crashes to the monitor.  I still don't know how to program in Apple II assembly, so I am not sure how to do what I am trying to do.  There are notes on page 1 that explain the hex code.

 

Can you or someone else help me modify the above code so all it does is move the data in Main $2000 - $3FFF to Aux $2000 - $3FFF?

Thanks for your help!

Mike

Share this post


Link to post
Share on other sites

For reference, here is my basic code to load the DHR image from the two file halves (I loaded the assembly to $6000 instead of $300)

 

10 D$=CHR$(4): PRINT D$"PR#3": REM TURN ON 80 COLUMN MODE

20 PRINT D$"BLOAD /HD/DHRPICS/DHRHDLOADER,A$6000": REM LOADS THE ASSEMBLY TO MOVE DHR DATA

30 TEXT:HOME:PRINT D$"CAT": REM LISTS THE FILES IN THE CURRENT DIRECTORY

40 PRINT "ENTER FILENAME:"

50 INPUT A$ : REM ENTER THE FILENAME WITHOUT .BIN OR .AUX EXTENSION

60 HGR2 : REM TURN ON FULL SCREEN GRAPHICS

65 POKE 49236,0: POKE 49246,0: REM ACTIVATES PAGE 1 AND DHR

70 PRINT D$"BLOAD "A$".AUX,A$2000" : REM BLOADS AUX FILE (1 OF 2 FILES)

80 CALL 24576: REM MOVE DATA FROM MAIN $2000 TO AUX $2000 - CURRENTLY DOES MUCH MORE THAN JUST THIS

85 PRINT D$"BLOAD "A$".BIN,A$2000" : REM BLOADS MAIN FILE (2 OF 2 FILES)

90 INPUT A$ : REM PRESS ENTER TO LOAD ANOTHER FILE

100 GOTO 30

 

To save the DHR files into two halves:

BLOAD DHRPIC,A$2000
BSAVE DHRPIC.AUX,A$2000,L$2000
BSAVE DHRPIC.BIN,A$4000,L$2000

 

I could also then bload the .BIN file into A$2000 then BSAVE it again so it is bsaved to the correct location and I wouldn't need to specify it in my code.

 

Also, I see there is an AUXMOVE routine as found here on page 18 of the PDF but I don't know if it will work and how exactly to write the assembly to use it in my situation:  http://www.applelogic.org/files/AIIETECHREF2.pdf

 

Thanks again,
Mike

Share this post


Link to post
Share on other sites

Hello again.

 

Remind me again which OS you are using.  DOS 3.3 or Prodos?

 

Put a "60" at address to $0329 to exit properly without crashing into the monitor instead of zeroes.  This will move Main $2000 to Aux $2000.

 

When saving the Aux part, change the program slightly starting at $0315 to this:

 

0315: BIT $C055

 LDA ($3C),Y

 BIT $C054

 STA ($42),Y

 

0315:2C 55 C0 B1 3C 2C 54 C0 91 42

 

And lastly, you cannot use DHR page 2 from applesoft.  It takes special softswitch control only from machine language.  Change your HGR2 in line 60 to HGR.  To get full screen graphics use: POKE 49234,0 and to get split text/graphics use: POKES 49235,0

 

Share this post


Link to post
Share on other sites
12 hours ago, Iamgroot said:

Hello again.

Thanks again for your help!  I am using Prodos.  Using 60 at $0329 worked perfectly.  When I changed the program starting at $0315, it no longer worked.  It didn't affect Aux memory and left garbage on half the screen.  Previously you had suggested a different program that worked for you but when you tried it on AppleWin you saw the issues I was having with it.  It may be the same here. 

 

I am trying to follow what you are saying in the last paragraph.  Can you use DHR page 2 from applesoft if you use the HGR in line 60 along with Poke 49234,0 or Poke 49235,0?  I tried it but it just showed page 1. 

 

Also, I tried to create a routine to do the same aux move but on page 2 instead of page 1.  I bloaded the code to $300 for page 1 and again to $330 to duplicate it for page 2.  Then I changed $331 to 40 and $339 to 5F.  I don't know if this is correct and/or all I need to change because so far I can't display page 2.  I will read up on page 2 graphics and see if I can get it to display and then I can see if the routing is working.

 

Thanks again!

Mike

Share this post


Link to post
Share on other sites
Posted (edited)

Looking at this page: http://www.battlestations.zone/2017/04/apple-ii-double-hi-res-from-ground-up_70.html

It looks like $C054 is for page 1 and $C055 is for page 2, so it looks like your new code has something to do with page 2.  I am not sure though.

 

Ultimately what I am trying to do is bload a picture in page 1 and a different picture in page 2 and be able to display either one.  This is working now for page 1 with the old code and a 60 in $329.  I just need to figure out page 2.  Thanks again!

Edited by thorr

Share this post


Link to post
Share on other sites

Just a separate idea in case this is a nice workaround.  Is there a way to bload from machine code?  Maybe it would not try to use the floppy.  The tricky part would be passing it the file name.

Share this post


Link to post
Share on other sites

Also, I am thinking / wondering if my ROM version 3 is causing the issue.  ROM version 4 is supposed to fix some bugs that ROM 3 introduced.  I think I will go ahead and order a ROM 4x chip and see what happens.

Share this post


Link to post
Share on other sites

When dbl hi-res is being used or 80-col text, $C054 is for Main memory and $C055 is for Aux memory but only for the memory block of $2000.3FFF and not for $4000.5FFF.

When hi-res is being used or 40-col text, $C054 is for page 1 and $C055 is for page 2 in Main memory.

 

The softswitches needed to access the $4000.5FFF area of memory also affect the Prodos buffers when loading a file.  This is why applesoft cannot be used to load and view a dbl hi-res graphic on graphics screen #2.

 

I wrote a machine language program in another thread on this forum to show that dbl hi-res screem #2 can be drawn on while viewing screen #1, flipped to view screen #2, draw on screen #1, then flipped back view screen #1.

 

Scan the topics for that thread.  It was just last year, so shouldn't be too far down the list.

 

I also wrote a movie player that does dbl hi-res page flipping to view the movie.  A link was posted to a thread on this forum as well.  Check that thread to see if the link is still valid.  The movie player does not load an entire screen to screen #2, though, as it is not possible since the Prodos buffers will be unusable.  A compressed screen is loaded to memory, then decompressed to screen #2.

Share this post


Link to post
Share on other sites

Yikes, well that is sucky.  You explained it pretty well, but just to make sure I understand, are you saying you can use Double Hires screen 2 in its entirety if you draw on it, but you can't bload to it (because temporarily bloading is using the $4000.5FFF for Prodos buffers also)?  Then a workaround could be to always bload to screen 1, then you can move the data to screen 2 and bload to screen 1 again?

 

If that is a case, a very slow movie player could be made with the following algorithm:

Bload frame 1 to Screen 1, Copy Screen 1 to Screen 2, turn on DHR and show Screen 2 which has frame 1 on it

Bload frame 2 to Screen 1, Show Screen 1 with frame 2 on it, Copy Screen 1 to Screen 2, show Screen 2 with frame 2 on it

Bload frame 3 to Screen 1, Show Screen 1 with frame 3 on it, Copy Screen 1 to Screen 2, show Screen 2 with frame  3 on it

and so on...

 

This idea also could be used in general to always have nice graphics shown whenever manipulating the screen in the background.

 

I will look for your other threads.  At this point I need to figure out the following:

1) How to show Screen 2

2) How to Copy Screen 1 to Screen 2

 

Also, I am getting more into the idea of using Assembly for everything.  Do you have a good reference on how to create bootable disks that are pure assembly and let you have full control over the hardware (like how commercial games work such as King's Quest or Ultima)?  If I did this I think I can bypass the problems of the Prodos buffers, but the very obvious issue with this is I would not be able to use the smartport hard drive as far as I know.  I assume most of these use Dos 3.3 unless they show Prodos during bootup.  Another option is to use CC65 along with Assembly.  I have already started down this path and wrote my first somewhat complex program, but not with graphics or any real assembly yet, just peeks and pokes here and there. 

 

Thanks again for your help!

Mike

 

 

 

 

Share this post


Link to post
Share on other sites
Posted (edited)

I checked out your movie player and it is quite impressive!  It just keeps going and going.  Also, I checked out your image loader with compression.  Neither one works correctly on my Apple IIc.  You mentioned the movie player would not work on a IIc.  That is strange to me because I thought the IIc was supposed to be compatible with the IIe.  The image loader is having the same issues I am having in this thread with the aux memory.  I am really hoping the Rom 4x chip I ordered will fix these issues.  I have my doubts.  I think the IIc smart port functionality is somehow conflicting with the aux memory.  I also ordered a no slot clock.

 

Just an update to my original method with Screen 1...  I got it to work with single files so I don't have to split the DHR images into two files.  I bload the file,A$2000,L$2000, run the machine routine, then bload the file,A$2000,B$2000.

Edited by thorr

Share this post


Link to post
Share on other sites

The Prodos buffer has nothing to do with being loaded to dbl hi-res screen #2.  The problem is that the $C054.C055 softswitches only work with the memory range $2000.3FFF.  Therefore, different softswitches are used to display screen #2.  These new softswitches switch in the entire 48 kb except page 0 and page 1.  When Prodos "BLOADS" a file it has to read and write some information from/to its buffers.  The problem is that it cannot find its buffers when Aux memory is switched in.  So a BLOAD can only be made to Main memory at $4000.5FFF and not to Aux memory at $4000.5FFF.

 

The Apple IIc's graphics are the same as a IIe with 80-col card, but the VBL (vertical blanking) is not the same.  The VBL is used for timing.  Our electricity is 60 Hz, which is 60 cycles per second.  The screen on your monitor is therefor refreshed 60 times per second.  To play a movie at 30 fps, the VBL is checked for 2 passes before the next frame is drawn.

 

I think I know how to program the VBL for a IIc, but my IIc is in storage and cannot test yet.  So haven't written the video player for the IIc yet.

 

Share this post


Link to post
Share on other sites

To view on dbl hi-res screen #2, you could BLOAD the entire graphic starting at $4000.  The end of the graphic will be at $7FFF.  Then use a memory move routine to move the graphic to Aux memory.

 

The huge disadvantage of using both dbl hi-res screens is that is takes up just about all available memory, so there is very little room for an applesoft program.  You can pack a lot of programming into the $2000 bytes starting at $4000, where screen #2 is.

Share this post


Link to post
Share on other sites

Thanks Rob!  I guess that means that I can use DBL Hi-Res Screen #2 exactly the same way I am currently using DBL Hi-Res Screen #1:

Screen1:

1) BLOAD SCREEN1,A$2000,L$2000 (load first half of picture to Main $2000)

2) Call Move Routine to move Main $2000 to AUX $2000

3) BLOAD SCREEN1,A$2000,B$2000 (load second half of picture to Main $2000)

 

Screen2:

1) BLOAD SCREEN2,A$4000,L$2000 (load first half of picture to Main $4000)

2) Call Move Routine to move Main $4000 to AUX $4000

3) BLOAD SCREEN2,A$4000,B$2000 (load second half of picture to Main $4000)


I started playing with DHR Page 2 and I ended up having to do things quite a bit differently with my basic program to set up DHR so it could use two pages (using the initialization methods in the example program described here: http://www.battlestations.zone/2017/04/apple-ii-double-hi-res-from-ground-up_70.html).  After poking the seven memory locations at the beginning of the example program, I can switch between the two DHR screens by poking 49236,15 and 49237,15.  Unfortunately trying to bload a picture and use the existing move routine does not work when setting up the DHR screen this way, even with screen 1.  I will dissect your code and see if I can rewrite it to work with this other initialization method with screen 1 and eventually screen 2.

 

That is interesting that the vertical blanking is different with the IIc.  Thanks for the information about that.

 

In other news, today I got my 4x rom (and no slot clock) and it did nothing to help with the bug of bloading the smart port hard drive into AUX memory.  I feel like it is the same issue you are referring to with screen 2 of double hires and the buffers.  While it is in AUX memory mode, the smart port hard drive is unavailable (like the buffers).  Do you think there is a way to copy all of the machine code routines that are used to access the smart port from main memory (from the ROM I guess) to aux memory at the appropriate memory addresses and then they would work while access AUX memory?

 

I also think I discovered a new bug with my Floppy Emu.  If I "CAT ,S5,D1" then "CAT ,S5,D2" I can no longer "CAT ,S5,D1".  Using S5,D2 screws it up.  Maybe, but I doubt it, this has something to do with my other issues trying to bload stuff into aux memory.

 

Thanks again,
Mike

 

Share this post


Link to post
Share on other sites

I have been working on this for quite a long time since my last post.  I totally understand how your machine routine works now, which is very cool, because it is helping me learn assembly.  Also, I found a totally alternate and very simple way to load a DHR image to page 1 from my smartport hard drive.  I still can't load anything to DHR page 2 and have it display page 1 and page 2 with separate images at will.

 

The new way to load single images using page 1 without using the extra machine code is to use the Apple IIc /RAM disk.  If you keep it empty, you can bsave a file with length $2000 and it will be the same as writing to AUX memory starting at $2000.  So I BLOAD the first $2000 of the DHR file (A$2000,L$2000), BSAVE it to /RAM, DELETE it from /RAM, BLOAD the second $2000 of the DHR file (A$2000,B$2000).

 

I tried several things to get Page 2 to work.  I tried BSAVING a second file to /RAM, and I also tried BSAVING a single file that is $4000 in length to /RAM that contains the AUX data for image 1 and 2.  Page 2 no matter what I do is always corrupt.  Also, flipping between page and and page 2 has been challenging.  I can do it really fast using the method here: http://www.battlestations.zone/2017/04/apple-ii-double-hi-res-from-ground-up_70.html but unless I do it in a loop, it won't switch the display back and forth.  I also am wondering if it is displaying all of page 2 or just half of it, which is why it is always corrupt.  

 

Can you tell me the poke commands to display page 1 and leave it showing, and then the poke commands to display page 2 and leave it showing?

 

Thanks again for your help,

Mike

Share this post


Link to post
Share on other sites
Posted (edited)

A bsave to /RAM is only mapped to $2000.3FFF of Aux memory for the first file.  After that the memory map is not contiguous for /RAM, so the second file is not saved to $4000.5FFF.  So that technique won't work for screen #2.

 

You cannot view dhr screen #2 from applesoft.  Viewing a dhr screen requires an 80-col card to be in effect.  The problem is that to view screen #2, one of the softswithces for 80-col card access has to be temporarily disabled.  Applesoft does not like this configuration and resets the softswitch for normal 80-col use.  You can view screen #2 from ML with this call, it waits for a keypress, but when it returns to applesoft, screen #1 is re-enabled.

 

CALL 768

 

300:8D 50 C0 8D 5E C0 8D 00 C0 8D 55 C0 2C 0 C0 10 FB 2C 10 C0 8D 1 C0 60

 

 

 

Edited by Iamgroot

Share this post


Link to post
Share on other sites
Posted (edited)
16 hours ago, Iamgroot said:

You can view screen #2 from ML with this call, it waits for a keypress, but when it returns to applesoft, screen #1 is re-enabled.

 

CALL 768

 

300:8D 50 C0 8D 5E C0 8D 00 C0 8D 55 C0 2C 0 C0 10 FB 2C 10 C0 8D 1 C0 60

 

 

 

Thanks again for your help.  That explains a lot why I am having so much trouble.  Unfortunately, I tried the above code and it appears to be showing Page 1 on my Apple IIc.  I verified this by loading an image the old way, and typing call 768 and it displayed the page 1 image I loaded.

 

Edit:  I modified the code and got it to display page 2 this way:

300:8D 50 C0 8D 57 C0 8D 52 C0 8D 5E C0 8D 0D C0 8D 00 C0 8D 05 C0 8D 55 C0 2C 00 C0 10 FB 2C 10 C0 8D 01 C0

 

However, half of it is blank.  I assume one of the STA's is wiping the screen or I am not loading it properly.  Also, with my code, it returns to Page 1 and hangs waiting for a Control Reset to fix it.  I will keep playing with it.  Thanks again!

Edited by thorr

Share this post


Link to post
Share on other sites
Posted (edited)

I eliminated some of the STA's and got the same result.  I can see page two, but half of it is missing the picture information and my code causes a hang after pressing a key and returning to page 1.

 

300:8D 50 C0 8D 5E C0 8D 00 C0 8D 05 C0 8D 55 C0 2C 00 C0 10 FB 2C 10 C0 8D 01 C0 60

 

I suspect the move routine may need some work.  I modified it to do 64 pages with a range of $2000 to $5FFF.  I first bload the two aux halves into main $2000 and $4000, then run the move routine to put it in aux memory.  Then I bload the two main halves into main $2000 and $4000.  Page 1 is fine.  Page 2 shows half of it.  Here is the latest move routine code:

 

6000:A9 20 85 43 85 3D A9 3F 85 5F A0 FF 84 3E C8 84 3C 84 42 A2 40 B1 3C 2C 55 C0 91 42 2C 54 C0 C8 D0 F3 E6 3D E6 43 CA D0 EC 60

 

Are there restrictions with moving to AUX $4000 using the methods in the above move routine?

Thanks again!

Edited by thorr

Share this post


Link to post
Share on other sites

As I already stated, you cannot use $C054 and $C055 for page 2.  Change those 2 softswitches to $C004 and $C005 instead.

 

You can remove the code 6006.600E and just replace with 6006:A0 00

 

My page 2 viewing code assumes you are already in 80-col mode and Hi-res is set with HGR so a lot of the softswitches can be eliminated.

 

From applesoft:

 

10 ? CHR$(4)"PR#3": HGR : POKE 49246,0: POKE 49234,0 : REM $C05E & $C052

20 ? CHR$(4)"BLOAD GRAPHIC1,A$2000,L$2000"

30 ? CHR$(4)"BLOAD GRAPHIC2,A$4000,L$2000"

40 CALL 24576 : REM MOVE ROUTINE

50 ? CHR$(4)"BLOAD GRAPHIC1,A$2000,B$2000"

60 ? CHR$(4)"BLOAD GRAPHIC2,A$4000,B$2000"

70 CALL 768 ; REM DISPLAY PAGE 2

 

 

 

Share this post


Link to post
Share on other sites
2 hours ago, Iamgroot said:

As I already stated, you cannot use $C054 and $C055 for page 2.  Change those 2 softswitches to $C004 and $C005 instead.

 

You can remove the code 6006.600E and just replace with 6006:A0 00

 

Using your original code to display page 2 now works to show page 2 with the applesoft code you provided:

 

300:8D 50 C0 8D 5E C0 8D 00 C0 8D 55 C0 2C 0 C0 10 FB 2C 10 C0 8D 1 C0 60

 

For Page 2, it is still only loading half of it.  I tried both of these, and neither one did the trick:

 

6000:A9 20 85 43 85 3D A9 3F 85 5F A0 FF 84 3E C8 84 3C 84 42 A2 40 B1 3C 2C 05 C0 91 42 2C 04 C0 C8 D0 F3 E6 3D E6 43 CA D0 EC 60

 

6000:A9 20 85 43 85 3D A0 00 84 3C 84 42 A2 40 B1 3C 2C 05 C0 91 42 2C 04 C0 C8 D0 F3 E6 3D E6 43 CA D0 EC 60

 

With either option, Page 1 is corrupt (when loading different pictures each time).  In both cases, page 2 only loads half the picture.

 

Using this code, Page 1 looks correct but it is using $C054 and $C055.  Page 2 still only shows half the picture correctly:

 

6000:A9 20 85 43 85 3D A9 3F 85 5F A0 FF 84 3E C8 84 3C 84 42 A2 40 B1 3C 2C 55 C0 91 42 2C 54 C0 C8 D0 F3 E6 3D E6 43 CA D0 EC 60

 

Sorry for all the problems.  I wish it would just work already.  ;-)

Thanks again for your help.

 

 

Share this post


Link to post
Share on other sites

My understanding of what $C004.C005 controls may be off.

 

Try this move routine

 

6000:A9 20 85 3D A9 40 85 3F A0 00 84 3C 84 3E A2 20
6010:B1 3C 2C 55 C0 91 3C 2C 54 C0 B1 3E 8D 05 C0 91
6020:3E 8D 04 C0 C8 D0 E9 E6 3D E6 3F CA D0 E2 60

 

Share this post


Link to post
Share on other sites
Posted (edited)

Success!!!  The new move routine worked.  Now I can start doing stuff with Page 1 and Page 2 using assembly. 

 

Just to consolidate this for future reference, here is all the code:

 

300:8D 50 C0 8D 5E C0 8D 00 C0 8D 55 C0 2C 0 C0 10 FB 2C 10 C0 8D 1 C0 60

BSAVE DISPDHRPG2,A$300,L$18

 

6000:A9 20 85 3D A9 40 85 3F A0 00 84 3C 84 3E A2 20
6010:B1 3C 2C 55 C0 91 3C 2C 54 C0 B1 3E 8D 05 C0 91
6020:3E 8D 04 C0 C8 D0 E9 E6 3D E6 3F CA D0 E2 60 

BSAVE MOVEROUTINE,A$6000,L$2F

 

10 D$=CHR$(4): PRINT D$"PR#3":TEXT:HOME

20 PRINT D$"BLOAD MOVEROUTINE,A$6000"

30 PRINT D$"BLOAD DISPDHRPG2,A$300"

40 PRINT D$"CAT"

50 PRINT "ENTER DHR FILE1:": INPUT A$

60 PRINT "ENTER DHR FILE2:": INPUT B$

70 HGR:POKE 49246,0:POKE 49234,0

80 PRINT D$"BLOAD "A$",A$2000,L$2000"

90 PRINT D$"BLOAD "B$",A$4000,L$2000"

100 CALL 24576 : REM COPY MAIN $2000-$5FFF to AUX $2000-$5FFF

110 PRINT D$"BLOAD "A$",A$2000,B$2000"

120 PRINT D$"BLOAD "B$",A$4000,B$2000"

130 CALL 768 : REM DISPLAY DHR PAGE 2 AND WAIT FOR KEYPRESS THE DISPLAY PAGE 1

140 INPUT C$ : REM PRESS RETURN TO FLIP BACK AND FORTH OR Q-RETURN TO QUIT

150 IF C$="Q" THEN TEXT:END

160 GOTO 130

 

Eventually I will probably consolidate all the machine code together and BLOAD it all at once and just call the correct addresses for the various routines. 

 

Thanks again!

Mike

 

Edited by thorr

Share this post


Link to post
Share on other sites

I am baffled why $C004.C005 won't copy from Main $2000 to Aux $2000 with the move routine, but works fine if the data being read from main memory is from an address other than $2000.3FFF.  I will have to play around with this some more.

 

What computer or emulator are you using?

 

Share this post


Link to post
Share on other sites
Posted (edited)

An Apple IIc with a Floppy Emu in Smartport HD mode. 

Edited by thorr

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...