+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 27
  1. #1
    Darendor is offline Uncommon
    Join Date
    Feb 2009
    Posts
    51

    Default Custom character sets problem

    I've been trying to figure out how I can move where I want to put my custom character set.

    The Programmer's Reference Guide states:

    "The best place to put your character set for use with BASIC while
    experimenting is beginning at 12288 ($3000 in HEX). This is done by
    POKEing the low 4 bits of location 53272 with 12. Try the POKE now, like
    this:

    POKE 53272,(PEEK(53272)AND240)+12"

    Suppose I need to put my character set at say 15000. What do I put into 53272 to make it read from there?

    Anyone?

  2. #2
    goonie's Avatar
    goonie is offline Common
    Join Date
    Dec 2008
    Posts
    40

  3. #3
    Darendor is offline Uncommon
    Join Date
    Feb 2009
    Posts
    51

    Default

    It dances around it, but doesn't actually address my problem.

  4. #4
    Zorch is offline Uncommon
    Join Date
    Dec 2008
    Location
    Germany
    Posts
    103

    Default

    I'm not much into coding, and probably this might be nonsense but I'll post it anyway

    What about placing your custom chars outside the basic memory ($0800 - $9FFF),
    e.g placing it at $C000? In this case you'll need to copy chars into RAM and switch the VIC bank, wich is ..............slow

    I don't know how big your basic program will be, but if you don't want to do bank-switching, I'd suggest to place your charset at $3800-$3FFF (POKE53272,30?).
    But if your programm gets bigger it will overwrite your chars.

  5. #5
    Darendor is offline Uncommon
    Join Date
    Feb 2009
    Posts
    51

    Default

    Quote Originally Posted by Zorch View Post
    I'm not much into coding, and probably this might be nonsense but I'll post it anyway

    What about placing your custom chars outside the basic memory ($0800 - $9FFF),
    e.g placing it at $C000? In this case you'll need to copy chars into RAM and switch the VIC bank, wich is ..............slow

    I don't know how big your basic program will be, but if you don't want to do bank-switching, I'd suggest to place your charset at $3800-$3FFF (POKE53272,30?).
    But if your programm gets bigger it will overwrite your chars.
    I don't suppose you'd be interested in having a look at it for yourself?

    So if I use POKE53272,30 it'll look between $3800 and $3FFF for all 256 characters?

  6. #6
    Zorch is offline Uncommon
    Join Date
    Dec 2008
    Location
    Germany
    Posts
    103

    Default

    Hmm, I can try (no warranty though)

    Regarding the full char set: at least the ProgRefGuide says so.

  7. #7
    Darendor is offline Uncommon
    Join Date
    Feb 2009
    Posts
    51

    Default

    Well the D64 image is here:
    PROJECT.d64

    The file on it is "DR.PRG". Have a look-see.

  8. #8
    Darendor is offline Uncommon
    Join Date
    Feb 2009
    Posts
    51

    Default

    I notice that the programmer's reference guide tells me to put in a certain set of POKEs to reduce available memory to prevent BASIC from overwriting my character set. If I move the location to the 14000 area will I avoid having to do this?

  9. #9
    Zorch is offline Uncommon
    Join Date
    Dec 2008
    Location
    Germany
    Posts
    103

    Default

    Yes, that should work.

  10. #10
    Darendor is offline Uncommon
    Join Date
    Feb 2009
    Posts
    51

    Default

    Quote Originally Posted by Zorch View Post
    Yes, that should work.
    Are you sure about this after having examined my code?

  11. #11
    Zorch is offline Uncommon
    Join Date
    Dec 2008
    Location
    Germany
    Posts
    103

    Default

    To be honest.............. no. I wasn't kidding saying "I'm not much into coding", you know

    But you can move the basic-start by using the zeropage adresses 43/44. I'd suggest using a C-64 memory map like "mapping the C64", wich should be available online.

    But I tried your programm and loaded 2 maps without any error messages.

  12. #12
    Darendor is offline Uncommon
    Join Date
    Feb 2009
    Posts
    51

    Default

    Quote Originally Posted by Zorch View Post
    To be honest.............. no. I wasn't kidding saying "I'm not much into coding", you know

    But you can move the basic-start by using the zeropage adresses 43/44. I'd suggest using a C-64 memory map like "mapping the C64", wich should be available online.

    But I tried your programm and loaded 2 maps without any error messages.
    You won't get any error messages, but check the amount of free ram after you load a map (RUN/STOP and RESTORE) and you'll see it's almost none left.

    I'm trying to figure out WHY I have so little memory left....

  13. #13
    Darendor is offline Uncommon
    Join Date
    Feb 2009
    Posts
    51

    Default

    Turns out the location of the character sets isn't the problem at all. I relocated everything 2048 bytes higher (to 14336 from 12288) and it made no difference; BASIC still thought I had 208 bytes left.

    So the only thing to do was to split the program into two files - the first one POKEs all the locations and sets up the character set, then loads the rest of the program afterwards.

    This makes for an annoying debugging process but it'll work out. I hope.


    If anyone out there has any other theories as to why I'm running out of memory so soon on this, please feel free to enlighten me.

  14. #14
    Darendor is offline Uncommon
    Join Date
    Feb 2009
    Posts
    51

    Default

    I declare my project impossible to complete.

  15. #15
    goonie's Avatar
    goonie is offline Common
    Join Date
    Dec 2008
    Posts
    40

    Default

    Seems like a very cool project, don't give up yet I'm sure you'll figure something out. Try experimenting with all sorts of memory locations and other ideas. I'll see if I can find any more articles online that might help.

  16. #16
    Darendor is offline Uncommon
    Join Date
    Feb 2009
    Posts
    51

    Default

    I split up one of the modules and that seems to have fixed it.

  17. #17
    goonie's Avatar
    goonie is offline Common
    Join Date
    Dec 2008
    Posts
    40

    Default

    So the project continues?

  18. #18
    Darendor is offline Uncommon
    Join Date
    Feb 2009
    Posts
    51

    Default

    Yes. I nearly have it sorted out, but not quite.

    For some reason, I can't get it to rewrite the edited dungeon back to disk properly.

  19. #19
    wheelbarrow's Avatar
    wheelbarrow is offline Uncommon
    Join Date
    Nov 2008
    Posts
    75

    Default

    How is it not rewriting it properly?

  20. #20
    Darendor is offline Uncommon
    Join Date
    Feb 2009
    Posts
    51

    Default

    Quote Originally Posted by wheelbarrow View Post
    How is it not rewriting it properly?
    I swear to God, if you can help me solve this problem I'll wire you $10, no word of a lie.

    The disk image that has the project is: btdungeoneditor.d64

    What you do is load "BOOT.PRG", then let it do its thing until the editor loads in.

    Now, you need a copy of the Bard's Tale dungeon disk - one you don't mind if it gets messed up, so make a copy in fact. Select a dungeon, say, the Wine Cellar, then follow the on-screen directions until you're staring at a render of the map.

    Next, press SHIFT-RETURN. The border should change red and the character set should swap out with a prompt asking you to hit SHIFT-RETURN again to confirm saving back to disk. Do so, and the drive should stop running after a minute or two while it writes the dungeon back. Hit F1 and you're back at the dungeon level screen. Load in the Wine Cellar again, and it'll show you what it saved it as...

    You'll see it's rather messed up.

    The code for loading in the dungeon is from lines 200-300 and the code for rewriting it is found from 1100 to 1250. The file is EDITOR.PRG.

    If you can help me out that'd be real swell of ya because I'm starting to lose my mind over this.

 

 

Similar Threads

  1. sto character custom
    By Guest 2452 in forum Guests
    Replies: 0
    Last Post: 04-28-2010, 05:58 AM
  2. wow minis same character problem
    By Guest 1030 in forum Guests
    Replies: 0
    Last Post: 04-27-2010, 02:29 AM
  3. Replies: 0
    Last Post: 04-06-2010, 01:04 PM




All times are GMT -7. The time now is 02:56 PM. Copyright (c) 2008 - 2011 RarityGuide, Inc. All rights reserved. All trademarks and copyrights are the property of their respective owners.