Custom Rom

ZX evolution software and hardware

Postby justine » 31 Dec 2011, 18:12

The custom rom option says 64K is that the maximum size ?
Can i just load an 8k rom image or do i have to make it 64K ?

Happy New Year :beer:
User avatar
justine
 
Posts: 101
Joined: 06 Jul 2011, 00:50
Location: Scotland
Group: Registered users

Postby lvd » 31 Dec 2011, 19:02

The reason is that ROM is only erasable in 64k blocks, so even if you want 1k ROM image, you have to erase total 64k. If flasher does not flash less than 64kb, just fill image up to 64kb with 0xFFs.
Многого нет здесь: http://lvd.nedopc.com
Image
User avatar
lvd
 
Posts: 1637
Joined: 07 Apr 2007, 22:28
Group: Registered users

Postby justine » 31 Dec 2011, 20:13

Thankyou LVD , one more thing does it have to be 0xFFs or can it be 0x00s ?
User avatar
justine
 
Posts: 101
Joined: 06 Jul 2011, 00:50
Location: Scotland
Group: Registered users

Postby нолька » 31 Dec 2011, 20:20

erased = 0xff
я проснулся среди ночи и понял, что всё...
всё идет по плану
User avatar
нолька
рОвный
 
Posts: 264
Joined: 08 Apr 2007, 21:12
Group: Registered users

Postby DDp » 01 Jan 2012, 11:37

some additions from http://www.nedopc.com/zxevo/rom/evo_reset_service.pdf

4. Updating FLASH ROM
...
Since version 0.46 is added feature updating user's "Custom ROM" by the size 64 KB. Order of pages in "Custom ROM": "Basic48", "TR-DOS", "Basic128", "Service". An obligatory condition - presence of 2 byte with codes #00, #C9 at offset #3D2F in "Service" page (the reset will be redirected into this page at an option choice "Custom ROM").
Updating is possible for whole ROM (512 kilobyte) or 64 kilobytes for "Custom ROM". Files panel will be displaying *.ROM file only is size 512K (in case whole ROM update) or 64K (in case "Custom ROM" update).
...
6. A choice of alternative ROM
...
Since version 0.46 is added feature of choice of user's "Custom ROM" (with independent update). The size of this ROM 64Кб. Order of pages in "Custom ROM": "Basic48", "TR-DOS", "Basic128", "Service". The reset will be redirected into "Service" page through entry point at offset #3D2F.
...


-------------
Oh, my English... :ohno:
D356 47C0 35F8 F55E 8A52 A88F F3F8 B003 03EB 3D7F
DDp
 
Posts: 103
Joined: 27 Oct 2007, 11:29
Group: Registered users

Postby lvd » 01 Jan 2012, 22:04

Its better to fill up with 0xFF rather than 0x00, doing so you decrease programming time (since erased state is 0xFF) and decrease wear to flash IC.
Многого нет здесь: http://lvd.nedopc.com
Image
User avatar
lvd
 
Posts: 1637
Joined: 07 Apr 2007, 22:28
Group: Registered users

Postby justine » 03 Jan 2012, 18:24

I'm trying to make a test rom 64k and i am using code supplied by others to try and put the evo nin text mode then print "A" at location x-20 , y-20 .
Why does this not work ?

Code: Select all
.ORG    $0000
   DI
   CALL settxtmode
   ld h,20   ;X cursor value
   ld l,20   ;Y cursor value
   call xy2txt_addr
   ld (hl),$41   ;Character A - 65
   HALT
settxtmode
      ld a,1   ;set shadow mode
      out ($BF),a
      ld bc,$ff77   ;set txt mode
      ld a,$26
      out (c),a
      ld a,5^$ff   ;set 5_ram_page to 1 bank z80
      ld bc,$77f7
      out (c),a
      ld a,1^$ff   ;set 1_ram_page to 2 bank z80
      ld b,$b7
      out (c),a
   xor a   ;close shadow ports
   out ($BF),a
   ret
   
xy2txt_addr   ;input h=x l=y symbol
      ld a,$07   ;output hl=address
   srl h
   jr nc,l1
   ld a,$87
l1     add a,l
     ld l,h
     ld h,a
     xor a
     srl h
     rr a
     srl h
     rr a
     add a,l
     ld l,a
     set 6,h
     ret
   
xy2attr_addr   ;input h=x l=y symbol
     ld a,$87    ;output hl=address
     srl h
     jr nc,l2
     ld a,$07
     inc h
l2     add a,l
     ld l,h
     ld h,a
     xor a
     srl h
     rr a
     srl h
     rr a
     add a,l
     ld l,a
     set 7,h
     ret

TXT2ATTR      ;input hl=txt_symb address
     ld a,%11100000      ;output hl=attr_symb address
     xor h
     ld h,a
     bit 5,h
     ret nz
     inc hl
     ret

   ; Fill rest of rom with $FF upto $FFFF
   .FILL $10000-$,$FF
        .END


Any help would be greatly appreciated.
I am compiling with tasm and saving the test.obj file as test.rom which is a 64k binary image.
I just see vertical lines and nothing else.
User avatar
justine
 
Posts: 101
Joined: 06 Jul 2011, 00:50
Location: Scotland
Group: Registered users

Postby savelij » 03 Jan 2012, 19:23

Сброс в custom rom производится в сервисную страницу. То есть этот код должен находится в rom по смещению $c000 от начала файла rom.
savelij
 
Posts: 520
Joined: 10 Jun 2008, 17:35
Group: Registered users

Postby justine » 03 Jan 2012, 19:43

savelij i think i am being stupid as i dont understand ?

I thought the custom rom was 64k in size and it would be loaded into the correct bank area of rom by the updater ?

Do i not just start code at $0000 ?

Anyway my code doesnt work i must be doing something very wrong.
Can anyone give me a code example to print some text in 80x25 mode for compiling into a custom 64k rom please ?
User avatar
justine
 
Posts: 101
Joined: 06 Jul 2011, 00:50
Location: Scotland
Group: Registered users

Postby lvd » 03 Jan 2012, 20:02

ROM page size is 16k, so there are 4 pages in 64kB custom rom.
At 0000-3FFF window there will be last 16k page from 64kb piece. So compile your code to begin at 0000, then move your binary to C000..FFFF part of 64kb rom image.
Многого нет здесь: http://lvd.nedopc.com
Image
User avatar
lvd
 
Posts: 1637
Joined: 07 Apr 2007, 22:28
Group: Registered users

Next

Return to Пентева - софт и железо

Who is online

Users browsing this forum: Google [Bot] and 4 guests

cron