Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2 > #22274

Re: How Should I document Printing a DHGR image on an Apple II?

From scott@alfter.diespammersdie.us (Scott Alfter)
Newsgroups comp.sys.apple2, comp.sys.apple2.programmer
Subject Re: How Should I document Printing a DHGR image on an Apple II?
Date 2014-10-28 19:37 +0000
Organization USS Voyager NCC-74656, Delta Quadrant
Message-ID <m2ora1$f85$1@dont-email.me> (permalink)
References <m2ddsc$nbe$1@speranza.aioe.org> <m2e0q9$qqa$1@dont-email.me> <m2ftts$fkb$1@speranza.aioe.org>

Cross-posted to 2 groups.

Show all headers | View raw


In article <m2ftts$fkb$1@speranza.aioe.org>,
Bill Buckels <bbuckels@mts.net> wrote:
>Thanks for your thoughts. You can jump-in and write part of this anytime you 
>want. I may need some help with the ML routines for the BASIC examples when 
>I get to them. The C code I can easily manage after I get the printer output 
>routines fleshed-out.

Here's something I knocked together in the mini-assembler.  It takes a 7x8
block of pixels and rearranges them from row order to column order.  It uses
a little bit of self-modifying code to copy a block from the screen into
0x0380-0x0387, then rotates the bits into left-to-right order, LSB at top,
at 0x0388-0x038E.  Put the starting address of the pixel block at 0x0303. 

0300  A2 07     LDX #7
0302  18        CLC
0303  AD 00 20  LDA $2000
0306  9D 80 03  STA $380,X
0309  AD 05 03  LDA $305
030C  69 04     ADC #4
030E  8D 05 03  STA $305
0311  CA        DEX
0312  10 EF     BPL $303
0314  A2 F9     LDX #$F9
0316  A0 07     LDY #7
0318  B9 80 03  LDA $380,Y
031B  6A        ROR
031C  99 80 03  STA $380,Y
031F  7E 8F 02  ROR $28F,X
0322  88        DEY
0323  10 F3     BPL $318
0325  E8        INX
0326  30 EE     BMI $316
0328  60        RTS

To test, draw a short diagonal line:

HGR:HCOLOR=3:HPLOT 0,0 TO 7,8

Set up and execute:

POKE 772,0:POKE 773,32:CALL 768

Dump the result:

FOR I=904 TO 910:PRINT PEEK(I):NEXT

You should get this result set: 3 6 12 24 48 96 192.

  _/_
 / v \ Scott Alfter (remove the obvious to send mail)
(IIGS( http://alfter.us/            Top-posting!
 \_^_/                              >What's the most annoying thing on Usenet?

Back to comp.sys.apple2 | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How Should I document Printing a DHGR image on an Apple II? "Bill Buckels" <bbuckels@mts.net> - 2014-10-24 06:40 -0500
  Re: How Should I document Printing a DHGR image on an Apple II? scott@alfter.diespammersdie.us (Scott Alfter) - 2014-10-24 17:04 +0000
    Re: How Should I document Printing a DHGR image on an Apple II? "Bill Buckels" <bbuckels@mts.net> - 2014-10-25 05:26 -0500
      Re: How Should I document Printing a DHGR image on an Apple II? scott@alfter.diespammersdie.us (Scott Alfter) - 2014-10-28 18:16 +0000
      Re: How Should I document Printing a DHGR image on an Apple II? scott@alfter.diespammersdie.us (Scott Alfter) - 2014-10-28 19:37 +0000
  Re: How Should I document Printing a DHGR image on an Apple II? "Christopher G. Mason" <cgm1@my-deja.com> - 2014-10-24 17:19 -0400
  Re: How Should I document Printing a DHGR image on an Apple II? "Bill Buckels" <bbuckels@mts.net> - 2014-10-24 19:43 -0500
    Re: How Should I document Printing a DHGR image on an Apple II? Steve Nickolas <usotsuki@buric.co> - 2014-10-25 02:30 +0000
    Re: How Should I document Printing a DHGR image on an Apple II? "Christopher G. Mason" <cgm1@my-deja.com> - 2014-10-24 23:01 -0400
      Re: How Should I document Printing a DHGR image on an Apple II? "Bill Buckels" <bbuckels@mts.net> - 2014-10-25 05:12 -0500
      Re: How Should I document Printing a DHGR image on an Apple II? scott@alfter.diespammersdie.us (Scott Alfter) - 2014-10-28 19:20 +0000
        Re: How Should I document Printing a DHGR image on an Apple II? "Bill Buckels" <bbuckels@mts.net> - 2014-10-28 16:24 -0500
    Re: How Should I document Printing a DHGR image on an Apple II? gids.rs@sasktel.net - 2014-10-24 21:15 -0700

csiph-web